How to copy a file to user profiles for win 7 and xp machines?
I have an application that I have created msi with adminstudio where I need to copy a file to,
Win7: %USERPROFILE%\AppData\Roaming\Oracle\SmartView\
XP: %USERPROFILE%\Application Data\Oracle\SmartView\
I copied that file to C:\program data and created an active setup to copy that file from program data to %USERPROFILE%\AppData\Roaming\Oracle\SmartView\. This works for win 7. But I want the same to do in Xp too.
Answers (3)
Boom!
http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/IHelpPropReference.htm
Check out the "System Folders Set by the Installer" in the above link.
In short..
You need [AppDataFolder] which is the users "AppData" (Win7) or "Application Data" (Wixp) folder. The installer works out where to put it since its a system property.
You need to do this in the folder view in Installshield, the [AppDataFolder] gets converted automacticly.
See below for example.
>created an active setup to copy that file
Another kludge from The Man Who Will Not Learn.
Do the job properly! You're obviously dealing with an Oracle product which has to have at least *one* advertised entry-point. Therefore, you should be building a user feature which contains the file destined for the user profile and then making the feature which contains the advertised entry-point a child of yoiur new feature. That way, you get self-healing/repair for the file, rather than the one-off execution you get using Active Setup.