Temporary file in odd folder - Advanced Installer Community
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Temporary file in odd folder

Hi
I added a temporary file (executable) with the 'Temporary Files' button in the menu list. Then in a 'Custom Actions' I like to run it. So there I used the Advanced Installer Properties/Folders and selected the [TempFiles] for the 'Working Directory' as well as for the path to run it. Unfortunately when I run the Installer I get an error with a generic/useless error msg "There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.", however I did find out that the Installer copied the temporary file ('my' executable) into the following folder:
C:\Users\ADMINI~1\AppData\Local\Temp\2\
but then when it calls the executable for the 'Custom Action' it tries to run it from the following folder:
C:\Users\ADMINI~1\AppData\Local\Temp\
Why are the two directories not identical, although I only use Advanced Installer Features/Properties to set up this action!

Any help would be appreciated.
Thanks

(using Enterprise edition 10.2 build 51488)
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Temporary file in odd folder

Hi and welcome to Advanced Installer forums.

I've tested your scenario, but I cannot reproduce the behavior. Can you please send us a verbose log of the installation so we can investigate it and also a step by step test case scenario so we can try to reproduce the problem?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: Temporary file in odd folder

Hi Eusebiu
thanks for the reply. Attached the log.

Here the steps:
- under 'Resources' -> 'Files and Folders': I added a file with the 'Temporary Files' toolbar button. No further changes/settings done on it. The file went automatically into the 'Windows Volume\Temporary' folder.
- under 'Custom Behavior' -> 'Custom Actions': here I added a 'Launch EXE with working directory' custom action as 'Add custom action with sequence'. See attached snapshot for the settings here.

I did the installation over a remote desktop connection (as is something very common these days) and as LoadMike mentioned it could be the root cause of the problem. However, it should still 'resolve' the Folders/Properties always to the same values.

Thanks for your help
Attachments
TempFolder-Snapshot.png
TempFolder-Snapshot.png (73.47 KiB) Viewed 10841 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Temporary file in odd folder

Hi,

Each temporary file has a related property which you can find by double-clicking it in the Files and Folders page (in your project the property name is AI_MOVEPDFTOOLS.CMD). This file contains the full path to the temporary file and you can use it in the custom action page in the "File Path" text field (i.e. [AI_MOVEPDFTOOLS.CMD] instead of [TempFolder]movePDFTools.cmd).

You can also follow the approach described in the How do I launch a CMD or BAT file article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: Temporary file in odd folder

Hi Eusebiu
thanks for the information but unfortunately that does not solve the issue. See also attached log.
Maybe I did something not exactly as you excepted but the executable in the temporary folder is still not running.
I also tried with the 'Launch file' options as mentioned in your provided article instead the 'Launch EXE with working directory' but same problem. However, I can see the file in that strange \2 folder and if I run the command "manually" in a cmd, copy/pasted from the log file (except for the corrected path) the executable runs just fine.
So there still must be an issue with that Folder/Properties, that are not consistent in all contexts.

I guess until that is resolved I need to try it with deploying my executable in the "normal' Application folder :(
Attachments
inst2.zip
(112.81 KiB) Downloaded 477 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Temporary file in odd folder

Hi,

In the log file you attached I can see the following rows which means that the "movePDFTools" custom action was executed correctly:

Code: Select all

MSI (s) (D8:CC) [16:50:17:761]: Doing action: movePDFTools
Action 16:50:17: movePDFTools. 
Action start 16:50:17: movePDFTools.
movePDFTools: 
Action ended 16:50:17: movePDFTools. Return value 1.
Can you please test the sample .AIP project that I attached and see if this works on your machine?

Best regards,
Eusebiu
Attachments
Temp file.rar
(2.7 KiB) Downloaded 477 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: Temporary file in odd folder

Hi
yes, I saw that too the in the log a return code 1 of was registered. I don't know what code 1 means but definitely know that the executable was not run.

The project you did send me can unfortunately not be built on my installation. An error occurred.
The following file could not be found: C:\ProgramData\Caphyon\Advanced Installer\Repository\dictionaries\ui_en.ail

This file exist but in an other folder ( Program (x86)\Caphyon\Advanced Installer 10.3\dictionaries )

Why does your project need that file from an other folder? Can I change that somewhere?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Temporary file in odd folder

Hi,

That is an entry related to a dialog from repository that I have on my machine and I forgot to remove it. Sorry about that!

You can go in the Translations page and remove it from the "Dictionaries" tab because the project does not need it. Can you try this and see if it works?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: Temporary file in odd folder

Hi
yes your project works. It opens the text file as first thing when starting the installation.

However, I tried to to the same as you did but still no success with an executable (yours was 'only' a text file which was opend). I also tried to run a simple standalone program (executable) instead of my script just to be sure it is nothing wrong with my script but this is not run either. See log file and snapshot.
If I run the executable or my script from the ...\temp\2 folder 'manually' (e.g. from the cmd) both run just fine but somehow the installer can't find then or run then.

Thanks
Attachments
LaunchFile.png
LaunchFile.png (63.72 KiB) Viewed 10688 times
inst.zip
(30.28 KiB) Downloaded 350 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Temporary file in odd folder

Hi,

I can see in your screenshoot that in the "File To Launch" field you used AI_IRFTEST.EXE, but the correct format is [AI_IRFTEST.EXE]. Can you try this and see if this works?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: Temporary file in odd folder

Hi
Thanks that was the last bit, now it seems to work!
So using the property name of the temporary file, in this case AI_IRFTEST.EXE but with the correct format [AI_IRFTEST.EXE] in the 'File Path' field and it launches.

Sorry for that I did overlook that small but important square brackets [ ] in your earlier post.
Thanks a lot for your help.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Temporary file in odd folder

You're welcome. I'm glad you got this working.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”