2.6 Custom installations

The installer allows for command-line options so that scripted installs can be created.

The command-line options are covered in the table below.

NB: Where folder paths contain spaces then surround the path with quotes. EG: “\\server\path”.

Command-line Option

Default Values

Notes

/SILENT

 

Installs program with the minimum of prompts and messages.

/VERYSILENT

 

Installs program with no prompts or messages.

/ALLUSERS

 

Installs in Program Files (requires Admin user authorization or the /RUNASUSER option to be set).

/CURRENTUSER

 

Installs for the current user only.

/RUNASUSER={username | domain\username | username@domain)

 

This requires the RUNASPASSWORD option to be set.

/RUNASDOMAIN={domain)

 

Required if the domain is not specified as part of the username.

/RUNASPASSWORD={required}

 

Required for the /RUNASUSER option.

/LicenseFile=

 

This MUST be specified when using a command-line install.

 

Macro

Description

Example data

@AppDataCommonDir

Path to Shared Application Data

C:\ProgramData

@AppDataDir

Path to current user's Roaming Application Data

C:\Users\steve\AppData\Roaming

@CommonFilesDir

Path to Common Files folder

C:\Program Files (x86)\Common Files

@ComputerName

Workstation ID

STEVE-LAPTOP

@ComSpec

Value of %COMSPEC%, the SPECified secondary COMmand interpreter;

C:\Windows\system32\cmd.exe

@DesktopCommonDir

Path to Shared Desktop

C:\Users\Public\Desktop

@DesktopDir

Path to current user's Desktop

C:\Users\steve\Desktop

@DocumentsCommonDir

Path to Shared Documents

C:\Users\Public\Documents

@FavoritesCommonDir

Path to Shared Favourites

C:\Users\steve\Favorites

@FavoritesDir

Path to current user's Favourites

C:\Users\steve\Favorites

@HomeDrive

Drive letter of drive containing current user's home directory.

C:

@HomePath

Directory part of current user's home directory. To get the full path, use in conjunction with @HomeDrive.

\Users\steve

@HomeShare

Server and share name containing current user's home directory.

 

@HOUR

Current Hour (24 hour format)

13

@LocalAppDataDir

Path to current user's Local Application Data

C:\Users\steve\AppData\Local

@LogonDNSDomain

Logon DNS Domain.

 

@LogonDomain

Logon Domain.

STEVE-LAPTOP

@LogonServer

Logon server.

\\MicrosoftAccount

@MDAY

Day of month (2 digits)

01

@MIN

Current minute (2 digits)

58

@MON

Current Month (2 digits)

05

@MSEC

Current millisecond

124

@MyDocumentsDir

Path to My Documents target

C:\Users\steve\Documents

@ProgramFilesDir

Path to Program Files folder

C:\Program Files (x86)

@ProgramsCommonDir

Path to Shared Start Menu's Programs folder

C:\ProgramData\Microsoft\Windows\Start Menu\Programs

@ProgramsDir

Path to current user's Programs (folder on Start Menu)

C:\Users\steve\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

@SEC

Current second (2 digits)

09

@StartMenuCommonDir

Path to Shared Start Menu folder

C:\ProgramData\Microsoft\Windows\Start Menu

@StartMenuDir

Path to current user's Start Menu

C:\Users\steve\AppData\Roaming\Microsoft\Windows\Start Menu

@StartupCommonDir

Path to Shared Startup folder

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

@StartupDir

current user's Startup folder

C:\Users\steve\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

@SystemDir

Path to the Windows' System (or System32) folder.

C:\Windows\SysWOW64

@TempDir

Path to the temporary files folder.

C:\Users\steve\AppData\Local\Temp

@UserName

Current logged-on user-name

Steve.johnson

@UserProfileDir

Path to current user's Profile folder.

C:\Users\steve

@WDAY

Current day of week. 1-7, with Sunday being day 1

1

@WindowsDir

Path to Windows folder

C:\Windows

@WorkingDir

Current/active working directory. Only includes a trailing backslash when the script is located in the root of a drive.

C:\temp

@YDAY

Day of year

365

@YEAR

4 digit year

2020