Bleile Datentechnik
Posts: 12
Joined: Mon Oct 11, 2010 3:13 pm

Temporary Files & Custom Actions

Hi,

If i start the setup under an user account who dont have sufficient rights, Windows shows an dialog where i will able to logon with an other user.
So if i i.e logon with the user Administrator, the setup extract his temporary files to "C:\Windows\temp\" (Windows 7 64Bit)

Now my problem.
I have an Custom Action (Deferred with no impersonation) under the Section PublishProduct. This Action calls rundll32exe with the path to my temporary DLL.
Now the MSI Setup says the path is "C:\Users\ADMIN~1\AppData\Local\temp\" but this is not right since the Setup extracted the Files in "C:\Windows\temp\"

While the installation an dialog pop up with an error message from RunDll with the reason it can't find the DLL

How can i solve this problem?
Why the setup is not able to find the correct path under PublishProduct?
Why the setup is ABLE to find the right path if i not logon with an other user?

best regards
Christian
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Temporary Files & Custom Actions

Hi Christian,

"Deferred with no impersonation" means that the custom action will run under the local system account, so the Temp folder is seen as "C:\Windows\temp\". If you are using a per-machine installation, the "Windows Volume\Temporary" folder from "Files and Folders" page is also resolved to "C:\Windows\temp\". So make sure that your temporary files are placed in "Windows Volume\Temporary".

If this is the case and the problem persists, please send us the .AIP (project) file and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Bleile Datentechnik
Posts: 12
Joined: Mon Oct 11, 2010 3:13 pm

Re: Temporary Files & Custom Actions

Hi,

-> Yes of course my file are in Windows Volume\Temporary.

I have solved my problem. If u use the property [TempFolder] u will have the problem i have mentioned.
The solution is to use the property name of the temporary file.

Faulty:
rundll32.exe "[TempFolder]\MyFile.dll",MyFunction MyParameters

Fully functional:
rundll32.exe "[&MY_TEMPFILE_PROPERTYNAME]",MyFunction MyParameters

The Path to the temporary file is always right, if u use the property name of the temp file.
-> good to know the it is so easy with AI :)

Best regards,
Christian
phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Re: Temporary Files & Custom Actions

Hello,

I don't understand the following part, but I have the same problem.
Faulty:
rundll32.exe "[TempFolder]\MyFile.dll",MyFunction MyParameters

Fully functional:
rundll32.exe "[&MY_TEMPFILE_PROPERTYNAME]",MyFunction MyParameters

The Path to the temporary file is always right, if u use the property name of the temp file.
-> good to know the it is so easy with AI :)
Can you explain this to me. Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Temporary Files & Custom Actions

Hi,

As described in the following article, Christian was referring to the formated reference of his temporary file:
http://www.advancedinstaller.com/user-g ... atted.html

You can get the temporary file's attached property by double-clicking it in the Files and Folders page or from its context menu:
http://www.advancedinstaller.com/user-g ... ialog.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Re: Temporary Files & Custom Actions

Ah, ok. But:
I don't use a temporary file. I create a installationlog like this:

Code: Select all

/L*V "[TempFolder]install.log"
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Temporary Files & Custom Actions

Hello,

In this case you don't have the same problem described in this thread. Can you please specify the issue you are encountering with this?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”