Hi,
i need to install some file to C:\Documents and Settings\currentUser\SomeFolder.
I can't find some buildin function/variable for it.
Can someone help/tell me the <DirectoryRef Id="TARGETDIR"> structure or the solution for my problem?
Thanks.
Hi,
i need to install some file to C:\Documents and Settings\currentUser\SomeFolder.
I can't find some buildin function/variable for it.
Can someone help/tell me the <DirectoryRef Id="TARGETDIR"> structure or the solution for my problem?
Thanks.
First, are you sure that you want to do this? You will get a behavior where each user who logs in and starts up your program will attempt to do a repair and ask for the original install if not found. Also when you uninstall you won't be able to clean up all the users profiles.
Many people prefer the "first run" pattern where you have the installer install to C:\Documents and Settings\All Users\ and when you run your program it copies the files to the current user profile if needed ( usually only if you are overriding something that is set for all users ).
Otherwise, here is a list of available directories in Windows Installer / WiX
System Folder Properties: http://msdn.microsoft.com/en-us/library/aa370905(v=VS.85).aspx#system_folder_properties
You'll want to choose from AppDataFolderm, LocalAppDataFolder and CommonAppDataFolder
I believe the property you're looking for is PersonalFolder.
However, if you just need to install a few files to that location, I'd probably personally prefer using NSIS because since it's not based on MSI it can be a lot more flexible: for example, as already mentioned you shouldn't install to per-user locations when doing a per-machine installation via MSI. NSIS however is more like a fancy unarchiver with a scripting interface which can be configured to add entries to the Programs and Features control panel applet, so you can avoid the MSI rules.