Get User that is running the script

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
ajgtx
Posts: 25
Last visit: Thu Nov 20, 2008 5:07 am

Get User that is running the script

Post by ajgtx »

Is there an easy way to get the username of who is actually running the script?

I'd like to output this, and other information, to a log file.

Thanks!
User avatar
ajgtx
Posts: 25
Last visit: Thu Nov 20, 2008 5:07 am

Get User that is running the script

Post by ajgtx »

Hmm, that didn't work. That should work in vbs as-is?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Get User that is running the script

Post by jvierra »

Work fine for me on any system.

Perhaps you let in a typo.
This topic is 15 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked