janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

Temporary files missing in quiet mode

Hi!

My installer uses the Temporary folder to house a file called InstallSQL.sql which is used by a custom action during the install execution stage. This all works fine when running the installer in full UI mode, but when I switch to quiet mode (using the /quiet flag) this file is no longer found in the temporary folder. Is this a bug in AI or intentional? Is there a a workaround to access this file from my custom action when running in /quiet mode?
Temporary.PNG
Temporary.PNG (10.68 KiB) Viewed 2531 times
Thank you,

Regards
Jan
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Temporary files missing in quiet mode

Hello Jan,

I have tested this and everything worked as expected on my machine - the file was available both during a full UI installation and during a silent installation.

Here is how I have tested this:

- new project

- added a .EXE as a temp file

- added a PowerShell custom action that starts the .EXE during installation

- the custom action is scheduled between "Add Resources" and "Finish Execution" action group, with immediate execution time

- launched the setup with full UI --> the .EXE was started during installation

- launched the setup silently --> the .EXE was started during installation

Have you brought any other changes upon the project between testing this (e.g. run the setup with full UI --> re-schedule the custom action --> run the setup silently)? Or you simply just ran the setup with full UI and then silently and you noticed this issue?

As Temporary Files are copied during the CostFinalize standard action, at the beginning of the setup and removed during the InstallFinalize standard action, please make sure that your custom action is not scheduled somewhere outside that time interval (e.g. before CostFinalize or after InstallFinalize actions).

If the above information is of no help for you, could you please forward me a copy of your .AIP file by e-mail at support at advancedinstaller dot com so I can further investigate this scenario?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janisito
Posts: 78
Joined: Thu Apr 09, 2015 6:28 am

Re: Temporary files missing in quiet mode

Hi Catalin,

Thank you for your invaluable help! It was spot on. I had made the mistake to put my custom action before CostFinalize. I moved my custom action after CostFinalize and it started working.

Is there any documentation regarding the different standard actions and what they do (for example what you just told me? Would be very useful. For me I'm often unsure where to exactly put the custom actions.

Regards
Jan
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Temporary files missing in quiet mode

Hello Jan,

You are always welcome!

It's always my pleasure to help.

In what regards your request, please have a look on the following articles for more information about:

- Windows Installer standard actions --> Windows Installer Standard Actions

- Temporary Files --> Temporary Files Operations in the Files and Folders Page

Please let me know if need help with anything else and I will be glad to assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”