cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File name based on the LogonUser property

I need that Windows Installer installs a file with the name '%username%.pru' each time a user launch my repackaged application for the first time.

'%username%.pru' should be installed each time a user logs on the machine and launch the application for the first time. I'd like to use an advertised shortcut to invoque the windows installer and create the file. My opinion is that I need to create a component with a key in HKCU as keypath and the .PRU file. If the name of the file could be set according to the LogonUser property my problem will be solved.
(1) Reply
I don't believe Windows Installer will resolve %username%.pru to LogonUser property. FileName column in File Table is not of formatted type. If the content of the file remains unchanged, but filename needs to reflect logon user ID, you will probably have to use a Custom Action to copy and rename the file during self-repair. Depending on what you want during uninstallation, you may use MSI table or Custom Action to remove these custom files.