/build/static/layout/Breadcrumb_cap_w.png

env variable for username + domain

Hi

does anyone know the env variable for username + domain?

i need to install something but it susing sys account so need this variable instead of just %username% or %userdomain%

i did it ages ago and cant find it now!

Thanks


1 Comment   [ + ] Show comment
  • It sounds like you're trying to install something to the currently logged-in user's profile. To do that using the System account is inordinately harder than using self-healing (if you're deploying an MSI) or Active Setup. - anonymous_9363 11 years ago

Answers (1)

Posted by: pesek72 11 years ago
Senior Yellow Belt
0

Default Values on Microsoft Windows

Variable

Windows XP

Windows Vista/7

 %ALLUSERSPROFILE% (%PROGRAMDATA%)

C:\Documents and Settings\All Users

C:\ProgramData

 %APPDATA%

C:\Documents and Settings\{username}\Application Data

C:\Users\{username}\AppData\Roaming

 %COMPUTERNAME%

{computername}

{computername}

 %COMMONPROGRAMFILES%

C:\Program Files\Common Files

C:\Program Files\Common Files

 %COMMONPROGRAMFILES(x86)%

C:\Program Files (x86)\Common Files

C:\Program Files (x86)\Common Files

 %COMSPEC%

C:\Windows\System32\cmd.exe

C:\Windows\System32\cmd.exe

 %HOMEDRIVE%

C:

C:

 %HOMEPATH%

\Documents and Settings\{username}

\Users\{username}

 %LOCALAPPDATA%

C:\Documents and Settings\{username}\Application Data\Local

C:\Users\{username}\AppData\Local

 %LOGONSERVER%

\\{userdomain}

\\{userdomain}

 %PATH%

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths}

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths}

 %PATHEXT%

.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.WSF;.WSH

.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc

 %PROGRAMFILES%

C:\Program Files

C:\Program Files

 %PROGRAMFILES(X86)%

C:\Program Files (x86) (only in 64-bit version)

C:\Program Files (x86) (only in 64-bit version)

 %PROMPT%

Code for current command prompt format. Code is usually $P$G

Code for current command prompt format. Code is usually $P$G

 %SYSTEMDRIVE%

C:

C:

 %SystemRoot%

The Windows directory, usually C:\Windows, formerly C:\WINNT

C:\Windows

 %TEMP% and %TMP%

C:\Documents and Settings\{username}\Local Settings\Temp

C:\Users\{username}\AppData\Local\Temp

 %USERDOMAIN%

{userdomain}

{userdomain}

 %USERNAME%

{username}

{username}

 %USERPROFILE%

C:\Documents and Settings\{username}

C:\Users\{username}

 %WINDIR%

C:\Windows

C:\Windows

 %PUBLIC%

 

C:\Users\Public

 %PSModulePath%

 

 %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules

 


Comments:
  • as far as i know there is no env variable to do it, the only thing i can image to work is to combine %USERDOMAIN%\%USERNAME% - anonymous_89761 11 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ