Consistently resolving %TEMP% path - Advanced Installer Community
LoadMike
Posts: 5
Joined: Thu May 30, 2013 4:17 pm

Consistently resolving %TEMP% path

Hi,
I have an installer that copies some utility programs to the windows tmp location for use during the installation and custom actions that attempt to access these utilities.
In the AI project, the utility files are placed in their respective location in the 'Files and Folders' pane and the custom actions are scheduled appropriately.

The installer works fine on my development machine but I'm seeing an issue (on another machine) where %TEMP% files are extracted to C:\users\Administrator\AppData\local\temp\ 1\ but the custom actions (vbscript)
which are using fso.GetSpecialFolder(TemporaryFolder) is resolving to C:\users\Administrator\AppData\local\temp\. I realize that this is a windows
policy issue for multiple sessions, however I would like to know if its possible to have the installer consistently use the same path?

The environment is Windows 2008 with terminal services.

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Consistently resolving %TEMP% path

Hi and welcome to Advanced Installer forums.

I'm not sure why you encounter this behavior. Have you added your utility files using the [ Temporary Files ] toolbar button?

Best Regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
LoadMike
Posts: 5
Joined: Thu May 30, 2013 4:17 pm

Re: Consistently resolving %TEMP% path

Yes,
I have placed the files on (Windows volume\Temporary\...)

I have a custom action that attempts to resolve %TEMP% using both environment variables and VBscript method call. It attempts to access ../temp/.. when in reality it needs to find files in ../temp/1/... or ../temp/2/...

I found this link which explains the issue:
http://support.microsoft.com/kb/272464

and this

http://stackoverflow.com/questions/1073 ... g-terminal
LoadMike
Posts: 5
Joined: Thu May 30, 2013 4:17 pm

Re: Consistently resolving %TEMP% path

to add to my last comment, I thought accessing the %temp% would be a transparent thing when using a terminal services environment, but apparently not.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Consistently resolving %TEMP% path

Hi,

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
jdorninger
Posts: 8
Joined: Mon Mar 31, 2014 11:51 am

Re: Consistently resolving %TEMP% path

Hi,
I run into the same problem as described above.
Attached is a log file where TempFolder , Object: C:\Users\ADMINI~1\AppData\Local\Temp\2\ which is then not working with my custom action looking at %temp% which is C:\Users\ADMINI~1\AppData\Local\Temp
Any help would be appriciated.
Br,
Jan
Attachments
MSI265c4.LOG
(186.77 KiB) Downloaded 276 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Consistently resolving %TEMP% path

Hello Jan,

In order to avoid this behavior you should proceed like this:
- add your file in "Files and Folders" page as a temporary file
- select the added file and from its context menu choose "Properties..." option
- get the property (associated with the temp file) from the "Edit Temporary File Dialog"; this property will be resolved at install time to the file extraction path
- use the temp file associated property in your custom action to access the temp file extraction path

If you have any question let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”