How do I get the 'Program Files' directory within WiseScript?
Updated: 21 May 2010 | 6 comments
This issue has been solved. See solution.
I'm using the WiseScript Editor to create a wrapper for a Wise Installation Express 7.0 MSI.
It works great. Now I want to add a search for a particular file on the user's computer, and if it's not there, copy it during the install.
I've checked the list of Automatic Compiler Variables, and the list of Automatic Run-Time Variables, and 'Program Files' isn't in either list.
It is in the list of Run-Time Variables, but if I try to use that, it says it's not been set. How do I set it?
I can't get it from:
Get System Information - It's not in the list of available info
Get Windows Installer Properties - WiseScript says I can only use that inside an install
How do I get various Windows directories for use within this wrapper script?
discussion Filed Under:
Comments
Program Files Folder
One easy way to get the Program Files folder into your script is to use Get Environment Variable. There is an environment varialbe called ProgramFiles that will point to that folder.
Hope that helps. Talk to you soon,
Scot
How about the CSIDL_COMMON_DOCUMENTS folder path?
This CSIDL_COMMON_DOCUMENTS folder is simply the All Users/Documents folder in XP ... or the Public Documents folder in Vista and Win7. How can I specifically get this CSIDL path? I can get a path from the registry here: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell Folders ... but prefer to get an environment variable using the CSIDL (or as it's now known in Vista and Win7 "KNOWNFOLDERID") path?
Is there an environment
Is there an environment variable you can use?
Otherwise, what's the issue with using the registry entry?
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Instead of reading the
End
Thanks for the Microsoft link.
Useful.....
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Re: How do I get the 'Program Files' directory within WiseScript
YES! That does it!
Get Environment Variable ProgramFiles into Variable PROGFILES
Display Message "Program Files Directory"
[which returned "C:\Program Files"]
Thanks Scot
--Victor
Would you like to reply?
Login or Register to post your comment.