Setup capture to All Users Documents
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
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
Answers (8)
Please log in to answer
Posted by:
msAiii
16 years ago
Posted by:
WayneB
16 years ago
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).
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).
Posted by:
WayneB
16 years ago
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
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
Posted by:
WayneB
16 years ago
Posted by:
norexx
16 years ago
Posted by:
nheim
16 years ago
Posted by:
anonymous_9363
16 years ago
- 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:
- 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.
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.
Posted by:
aogilmor
16 years ago
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!
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!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.