Yeah, another one of those "user-profile-threads" ;)

Well, have read all of them here and looked for info on other places, but still have not found the solution for me.

I need to put an application folder straight under Documents and settings\<user>
It cant be under Application data..

I just cant get the folder to the user folder. For example I have tried the Set Directory custom action, but it didnt work and i dont think its the way for me anyway. There is a big possibility that no user will be logged on when the application gets installed.

I have tried the variable USERPROFILE (for example creating and naming a folder under windows\profiles) but the result have only been a created folder in the windows directory(!).

Anyone with a soultion?
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


you need to find the components which contain the files you are attempting to drop

set a keypath to that component which is a dummy HKCU entry
Answered 05/02/2007 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
I have dummy keys for the files but that dont make a difference. If i put the folder with the files I want to the user profile under windows\profiles I get the hole folder structure under C:\Windows after installation.

When I use the custom action "Set Directory" to change the name of a dummy folder under windows\profiles to [%USERPROFILE] (After CostFinalize) i get internal error 2343, just as the msi-file is about to install all files in the right spot.

How difficult could this be really? ;)
It was a while ago I did this but I'm so sure I have got this to work before, without any trouble really.

ps. I'm using Wise Package Studio 7.0
Answered 05/02/2007 by: polkagris
Orange Belt

Please log in to comment
I have had the same problem in a package.
During the setupcapture (WPS 5.X) some files are installed in \username\cbt and some in \user\application data\ . The application data folder will be placed in "\windows\profiles\appliction data" while the "\username\cbt\" will be placed in "\windows\profiles\username\cbt".

First I copied the cbt folder to \profiles\ and changed Directory-table so it should take these files, the files installs in C:\Windows\cbt [:@]

Then a friend (credits to Martin N) helped me with the SetDirectory CA, go to Execute Immediate, high up but below InstallInitialize:

Custom Action Name: SETCBT
Directory: cbt
Directory Value: [%UserProfile]\cbt\

Be sure to have ]\ or else you will get a folder in documents and settings called usernamecbt.
As I will send this package to a very small group of people with GPO/AD I did not add any if / end condition to my package. It works very nice.

Hope this will help.

Answered 05/02/2007 by: Mackan75
Orange Belt

Please log in to comment
Tried it your way Mackan but still I get internal error 2343......this time when the installation begins creating folders.

An other thing:
What if no userprofile is available for the variable [%USERPROFILE]? Probebly no user will be logged on when this application is installed.
Answered 05/03/2007 by: polkagris
Orange Belt

Please log in to comment
Hi polkagris,
first of all, we need some clarification here:
From your posts, i try to imagine your scenario:
1. This app could be installed per computer (What if no userprofile is available...).
2. Some or all files of your app need to be in the profile, for whatever reason.

For this to work, install all files to a directory in the program files folder.
Then, use 'DuplicateFiles' or 'MoveFile' to copy the necessary files to the users profile.
Use self healing or Active Setup to trigger this process when the user logs in the first time after Installation
Read this post from John McFadyen carefully:幺

Hope, this gives you some ideas.
Regards, Nick
Answered 05/03/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
I've had this issue (where the MSI puts user profile stuff either directly beneath C:\Windows or beneath C:\Windows\Profiles with WPS at a previous client and now routinely include some CAs shamelessy lifted from InstallShield MSIs, which set the relevant properties using environment variables:

If VersionNT Then
If VersionNT = 400 Then
Set Property ALLUSERSPROFILE to [%SystemRoot]\Profiles\All Users
If VersionNT >=500 Then

Once you've done that, using 'Installation Expert' put your folder beneath C:\Windows\Profiles. When the MSI runs, the folder will be put beneath 'All Users' or '[username]' depending on whether you install per-machine or per-user.
Answered 05/04/2007 by: VBScab
Red Belt

Please log in to comment
I did some digging and here are the VERSION = from MS's website

System Version9X VersionNT WindowsBuild ServicePackLevel
Windows 2000 500 2195
Windows 2000 + Service Pack 1 500 2195 1
Windows 2000 + Service Pack 2 500 2195 2
Windows 2000 + Service Pack 3 500 2195 3
Windows 2000 + Service Pack 4 500 2195 4
Windows XP 501 2600
Windows XP SP1 501 2600 1
Windows XP SP2 501 2600 2
Windows Server 2003 family 502 3790
Windows Server 2003 SP1 502 3790 1
Windows Vista 600 greater than 5600

Answered 06/12/2007 by: opusboy
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity