/build/static/layout/Breadcrumb_cap_w.png

Folder and files to user profile

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

Answers (7)

Posted by: jmcfadyen 17 years ago
5th Degree Black Belt
0
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
Posted by: polkagris 17 years ago
Orange Belt
0
Hi
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
Posted by: Mackan75 17 years ago
Orange Belt
0
Hi.
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.

/M.N
Posted by: polkagris 17 years ago
Orange Belt
0
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.
Posted by: nheim 17 years ago
10th Degree Black Belt
0
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:
http://itninja.com/question/how-do-you-roll-out-new-machines?4146&mpage=1&key=active%2Csetup幺

Hope, this gives you some ideas.
Regards, Nick
Posted by: anonymous_9363 17 years ago
Red Belt
0
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:

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

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.
Posted by: opusboy 17 years ago
Senior Yellow Belt
0
I did some digging and here are the VERSION = from MS's website
http://msdn2.microsoft.com/en-us/library/aa370556.aspx

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

-Mike
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ