Setting System Variable as a User

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

Hi Folks,
How can I set a system variable as an ordinary user?

I want to run a logon script that gets the username, sets it in a
variable, runs a script as a system user and then can query the system
variable for the username.

Reason for this is that I can't get the username (ordinary user) when I
am logged on as system user.

Cheers

J
 
A system variable is set by the operating system, and is
independent from user environment settings.

Win32_Environment
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_environment.asp

--
Carey Frisch
Microsoft MVP
Windows XP - Shell/User

Be Smart! Protect Your PC!
http://www.microsoft.com/athome/security/protect/default.aspx

--------------------------------------------------------------------------

:

| Hi Folks,
| How can I set a system variable as an ordinary user?
|
| I want to run a logon script that gets the username, sets it in a
| variable, runs a script as a system user and then can query the system
| variable for the username.
|
| Reason for this is that I can't get the username (ordinary user) when I
| am logged on as system user.
|
| Cheers
|
| J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top