G'Day All,

I have a setup capture which is writing to the:
C:\Documents and Settings\All Users\Documents

The msi is creating a folder in the Windows directory instead called All Users\Documents.

I'm at a loss as to why it is doing this.

Any help much appreciated. The app is Dymo Label Software Vers.7.6.

Regards
Wayne
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2
i had this problem a few months ago ... I used the ALLUSERSPROFILE property to resolve ....

looky here ... https://kb.altiris.com/display/1/kb/article.asp?aid=2919&n=1&s=
Answered 06/27/2007 by: msAiii
Senior Yellow Belt

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.

Answers

0
Nic, Your bloods worth bottlin' [:D]

It worked a treat.

Thanks for the help, hope I can return it one day.

Regards
Wayne

PS. I'll rate ya. Least I can do.

So as everyone doesn't have to search article ID 2919:

Unable to correctly install files to All Users\Documents\ folder


--------------------------------------------------------------------------------
Problem/Symptoms


How do I install files to the All Users Profiles\Documents directory? If I install the component to the directory Windows\Profiles\All Users\ Documents it goes to the wrong location of C:\Windows\Profiles\All Users\Documents instead of Documents and Settings\All Users\Documents.



Product: Wise Package Studio 5
Version: 5.10.0.54 and 5.6
Development operating system: Windows XP
Target operating system: Windows XP



--------------------------------------------------------------------------------
Cause


Windows Installer does not have a standard property that points to this directory.

Defect #41742 - FILES PAGE: Design issue (?)... files in All Users folder on files page don't go to AllUsers folder on NT target machine.

Steps to reproduce


Launch Windows Installer Editor.
Go to Product Details page and select a Default Directory by clicking the Change button when the empty field by this entry is highlighted.
Go to the Files Page and highlight the folder Windows\AllUsers on the lower left Pane.
Click the New button and enter a name.
Click OK and go to the upper left pane.
Select a folder and select a file from this folder in the upper right pane.
Click the Add File button to add a file to the bottom-right pane within the folder created in steps 3 through 5.
Compile and run installation.

--------------------------------------------------------------------------------
Resolution


There are two options to resolve this issue:

1. Add a Set Directory action to the Execute Immediate sequence after Cost Finalize that sets the directory for these files to [%ALLUSERSPROFILE]\Documents.

For the Set Directory custom action, enter the following:
Custom Action Name: Enter custom action name.
Directory: Browse to the folder that contains the files you want to get installed to
C:\Documents and Settings\AllUsers\Documents.
Directory Value: [%ALLUSERSPROFILE]\Documents

2. Create a WiseScript that does three things:

1. Retrieves the value of CommonAppDataFolder using the Get Registry Key Value action.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
2. Parses the Application Data\ portion from the value using the Parse String action.
3. Sets a Windows Installer Property to the value returned using the Set Windows Installer Property action.

Notice that the new folder and file are installed to Windows\ALLUSERS folder. This is the correct behavior based on the table entries (in the Directory Table, the All_Users property has ProfilesFolder which in turn has a parent of WindowsFolder).
Answered 06/27/2007 by: WayneB
Blue Belt

Please log in to comment
0
G'Day All,

I've just about got this licked, just a little tidying up to do.

What I'm now trying is to remove the said folders from the All Users\Documents but my custom script doesn't seem to be resolving the ALLUSERSPROPERTY.

Here is said wisescript:

item: Custom Script Item
Filename=Get Windows Installer Property.wse
Variable Name1=_PROPERTYNAME_
Variable Value1=[%ALLUSERSPROFILE]
Variable Name2=_PROP_VAR_
Variable Value2=ALLUSERSPROFILE
Variable Name3=HELPFILE

end
item: Set Variable
Variable=DYMO_LABELDIR
Value=ALLUSERSPROFILE\Documents\DYMO Label
end
item: If/While Statement
Variable=DYMO_LABELDIR
Value=DYMO Label
Flags=00000100
end
item: Delete File
Pathname=%DYMO_LabelDir%\*.*
Flags=00001100
end
item: End Block
end

In the log it returned value 1 for the CA when run manually with admin rights. CA type 3073.

Any advice/help appreciated,


Regards
Wayne
Answered 06/28/2007 by: WayneB
Blue Belt

Please log in to comment
0
G'Day All,

Just a followup. Abandoned the script and left it to the RemoveFiles table.
Under the Create Folder component (for the app) I created Remove Files entries for all the folders and subdirs in the All Users\Documents\%appfolder% on uninstall. This worked a treat.[:D]

Cheers
Wayne
Answered 07/04/2007 by: WayneB
Blue Belt

Please log in to comment
0
You guys are making this *way* too hard. Here's an easy no-script solution:

Delete the (not correctly resolving) captured folder in your WSI/MSI and manually create the target folder structure literally as "C:\Documents and Settings\All Users\Documents\<subdir>".

Problem solved. [;)]
Answered 03/03/2008 by: norexx
Orange Belt

Please log in to comment
0
So, are you really thinking this?
This maybe works in your environment, if you can guarantee, that no computer has a non default profile folder!
Things like this are very bad practice for an installer.
There are reasons why variables like ALLUSERSPROFILE exist.
Regards, Nick
Answered 03/03/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
- Find an InstallShield MSI. There is a group of Custom Actions in the UI and EI sequences that set these properties for different flavours of Windows:


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


- Paste these into a copy of the standard Windows Application package template supplied with your authoring tool. Use this new template for subsequent packages. I suggest using a copy because upgrades are likely to walk over the standard ones.
Answered 03/04/2008 by: VBScab
Red Belt

Please log in to comment
0
G'day, Wayne :-)
You mention something which I have noticed in Wise - if you don't do a CreateFolder entry for the profile subfolder, it won't be created even if you have everything else (directory table etc.) set up. The RemoveFile table also a good catch, it's good to keep everything within the MSI framework if you can!
Answered 03/04/2008 by: aogilmor
Ninth Degree Black Belt

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