The following folder constants may be used within Software Update Wizard scripts and expand to the corresponding folder on the user's computer at run time.
Important! Note that some Windows folders expand to
different locations for each user.
Therefore, if you are running the Software Update Wizard as a Windows
service the constant "<TEMPDIR>",
for example, expands to the temporary folder associated with the Windows
SYSTEM identity, which is different to the temporary folder for the
logged on user.
To address this issue the relevant expansion variables have two options:
Constant | Expands to... |
---|---|
<WINDIR> | The Windows folder of the client PC. |
<SYSDIR> | The System folder of the client PC. |
<USERNAME> | The name of the logged on user of the machine |
<COMPUTERNAME> | The name of the user's computer, as returned by the API function GetComputerName(). |
<TEMPDIR> <USER:TEMPDIR> |
The user's temp folder (as returned by the GetTempPath() Windows API function). |
<CLIENTFOLDER> | The folder containing the application which is hosting the Software Update Wizard wuw4.dll DLL. |
<PROGRAMFILES> | The Program Files folder (equating to the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ ProgramFilesDir".) |
<DESKTOPFOLDER> <USER:DESKTOPFOLDER> |
The Windows desktop folder on the client PC.
|
<FONTFOLDER>
|
Virtual folder containing installed fonts. A typical path is C:\WINNT\Fonts. |
<STARTMENU> <USER:STARTMENU> |
File system directory containing Start menu items. A typical path is C:\Documents
and Settings\ username \Start Menu.
|
<STARTUP>
<USER:STARTUP> |
File system directory that corresponds to the corresponding user's Startup program group. The system starts these programs whenever any user logs on. A typical path is C:\Documents and Settings\ username \Start Menu\Programs\Startup. |
<MYDOCUMENTS>
<USER:MYDOCUMENTS> |
The 'My Documents' folder.
|
<APPDATA> <USER:APPDATA> |
The equivalent of "<username>/Application Data" |
<COMMONAPPDATA> |
The equivalent of "All Users/Application Data" |
|
The equivalent of "All Users/Documents" |
<LOCALAPPDATA> <USER:LOCALAPPDATA> |
The equivalent of "<user name>/Local Settings/Application Data" (non-roaming) |
Any SubmitVariable defined in script | Substitutes specified registry key contents for the SubmitVariable constant. |
The Software Update Wizard keywords which can take advantage of folder expansion are:
Keyword | Expands to... |
---|---|
AdditionalFile= | Lets you specify an additional file to be downloaded and installed within a section. The file is additional to the principal file specified in the Filename or Zipfile keyword lines. |
Bitmap | Change the default dialog bitmap image to one of your own |
CheckFileExists | Update section will only be processed if file specified in this keyword exists on user's PC. The inverse behaviour is possible using the optional "<NOT>" syntax. |
DelTree | Deletes the specified folder tree. |
ExecAfter | Launch a process (e.g. a program) after the update file has been downloaded. Note that if you use the "<AsUser>" option then the expansion variables starting "<USER:" and their counterparts which do not start with "<USER:" expand to the same (logged on user) location and can be used interchangeably with this keyword. |
ExecBefore | Launch a process (e.g. a program) before the update file is downloaded. Note that if you use the "<AsUser>" option then the expansion variables starting "<USER:" and their counterparts which do not start with "<USER:" expand to the same (logged on user) location and can be used interchangeably with this keyword. |
FileDate | Checks the file specified in the Filename= or Zipfile= keyword and only processes the update if the version on the user's computer is older than the date specified in the 'FileDate' line |
FileVersion | Checks the file specified in the Filename= keyword and only processes the update if the version on the user's computer is earlier than the version specified in the 'FileVersion' line |
Icon | Change icon displayed on the Software Update Wizard dialog title area from its default icon |
MoveFileEx | In conjunction with Reboot, facilitates the update of in-use files. (N.b. The recommended method for replacing in-use files is using WindowTitle or KillProcess. Use MoveFileEx in situations where WindowTitle or KillProcess are inappropriate.) |
TargetFolder | Specify the target folder for the update file |
XML_FileVersion= | Used in 2-pass update scripts to add the version number of a specified file to the generated XML file. |