Question

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.

Was it helpful?

Solution

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 AppDataFolder, LocalAppDataFolder and CommonAppDataFolder.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top