11/04/2009 5462 views
I've repackaged an application (WPS) which should install files in C:\Documents and Settings\All Users\Documents
But it copies the files in C:\Windows\All Users\Documents.
First I thought it had something to do with ALLUESER=1 so I changed it to ALLUSERS=2
But still the files are copied to the wrong location.

(In WPS the location is shown as C:\windows\Profiles\All Users\Documents)

I'm sure the solution is very simple, but I can't find it....yet.

Any help would appreciated!
0 Comments   [ + ] Show comments


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

All Answers

This is a well-known issue with WPS, wherein it fails to resolve the profile folders properly.

Grab an InstallShield-authored MSI and pinch the profile property-setting CAs (SetUserProfileNT, SetAllUsersProfileNT and SetAllUsersProfile2K) from it and paste them into your 'Windows Application' template. Make sure you have them set to execute at least once.
Answered 11/04/2009 by: VBScab
Red Belt

Hi VBScab, after I saw this post, I am also trieng to achive the same functionality.
After setting these properties, do we need to write a customaction, or we can achive the same through msi tables?
Answered 11/04/2009 by: Yaduveer
Orange Senior Belt

The idea is to set the properties using the Custom Actions. Grabbing them from an InstallShield-authored MSI is the shortest route. If one wanted to roll one's own, there's no problem with that.

I'm confused by your last question. Adding CAs and setting properties ultimately involve changes to the relevant tables...
Answered 11/04/2009 by: VBScab
Red Belt

Yes, you are right. I missed that point totally :)
Answered 11/04/2009 by: Yaduveer
Orange Senior Belt

Ok. I've added de Custom Actions from a Vendor MSI. I used the extracted AcroRead.MSI (v. 9.2)
I injected thes CA's as following: (Copied using Orca)

In WPS: Custom Actions --> Set property

Set Property ALLUSERSPROFILE to [%ALLUSERSPROFILE] (SetAllUsersProfiles2K)
Set Property ALLUSERSPROFILE to [%SystemRoot\Profiles\All Users (setallusersProfileNT)
Set Property USERPROFILE to [%USERPROFILE] (setUserProfileNT)

ps, Note the missing "]" at line 2

All Type 51

Location TAB:
No Sequence

Properties TAB:
In-Script Options: (Immediate Execution) --> greyed out
Processing: (Synchronous) --> greyed out
Scheduling Options: Always Execute

Description TAB:

Still the MSI copies the files to C:\Windows\All Users\.....

What am I overlooking here?
Answered 11/05/2009 by: subsense
Purple Belt

Is AcroRead.MSI the one you're trying to edit or the MSI you got the Custom Actions from?

Because, if Acrobat Reader is the package you're trying to capture, I'd really suggest to stop using Wise and just use the Adobe Customization Wizard. If that's just the one you took the CA's from, I've said nothing.... (Still not sure any Adobe MSI is a good example though)
Answered 11/05/2009 by: Rheuvel
Brown Belt

ps, Note the missing "]" at line 2It's required. Add it back.

Did you remember to set the CA to 'Always execute', so that it gets runs if the install is run with no UI?
Answered 11/05/2009 by: VBScab
Red Belt

This is a tidier way to have it.

If VersionNT Then
If VersionNT = 400 Then
Set Property ALLUSERSPROFILE to [%SystemRoot]\Profiles\All Users
If VersionNT >=500 Then
Answered 11/05/2009 by: reds4eva
Second Degree Blue Belt

@Rheuvel, I've just used this MSI for the CA's, very trange though there's a real bug in it.
The missing (]).

@Red4eve, Thanks, I will note this down for future issues.

But, because of some time pressure I've solved it the dirty way.

I created 2 CA's
The first VBS will make the folder C:\Documents and Settings\All Users\Documents and sets the security (with setacl)
The second wil copy the files to this location.

Not the nicest wat, but it works!

Thanks all, for your help
Answered 11/05/2009 by: subsense
Purple Belt

You can club the scripts to one. that is one script which will create the folders and copy the files.
Answered 11/05/2009 by: jinxngoblins
Senior Yellow Belt