Get Original Username
Gets the name of the user who has executed the installation file. Let's consider the following situation. The user named Usertest doesn't have administrative privileges, but he/she needs to install your software, which installs some files in the Application Data for the current user. When the user starts the installation, UAC asks for the administrator password. So, the administrator named Admin executes your installation created with the installer CreateInstall. Accordingly, variables username, appdata, apppath and others will refer to the Admin's subfolders. Your installed application will not work or will work wrong on Usertest's desktop. Insert this command at the beginning of the Install script to avoid such errors. It will determine the person who has started the installation. If his/her name is different from the current username, then this command will modify the values of the specified variables. In our case, the string Admin will be replaced to Usertest and all files will be unpacked to the correct folders. This command does nothing if your installation does not require administrative privileges or if the original user belongs to the Administrator’s group.
Optionally, you may add comments here describing the purpose of this element.
The name of the variable to which the name of the original user will be written. The original user is the end user who has started the installation.
Get Original Username command
Variables to be modified
Specify the list of variables to be modified by replacing the administrator's name with the original user's name. Variables must be separated by commas. Typically, these are predefined folders for the current user such as Application Data directories and shortcut folders.
appdata, apppath, userpath, desktop, progpath, startup
You can specify a condition that should be met for the action to be performed. If the condition is false then the command is skipped. See How to use If Condition for more details.