/build/static/layout/Breadcrumb_cap_w.png

Script for logged in user

Need a script to find the user logged into the machine. but i will be running this script as admin.

0 Comments   [ + ] Show comments

Answers (6)

Posted by: anonymous_9363 15 years ago
Red Belt
0
Can you keep a secret? There's a new-fangled thingy on the Web called 'Google'. You punch in words and it comes up with a list of sites whose pages contain those words. Now, not many people know about it at the moment so try to keep it between us, yeh?

If you have any problems using it, PM me your email address so I can send you my invoice for your training.
Posted by: SHRIRAMVEN 15 years ago
Senior Yellow Belt
0
Tried that out before posting this query. And found many that gives the output as the user loged in as default user(as i am running the script in Cmd as Admin). What i required is that of the user loged onto the system.
Anyway thanks for the reminder.
Posted by: anonymous_9363 15 years ago
Red Belt
0
...which means that your search term was likely to have been sub-optimal, because this one:

vbscript +"logged in"

produced a script as the first hit which, having made the changes outlined in the thread, I used to enumerate a selection of 8 machines picked at random from my current client's domain.

Try again.
Posted by: ditch_nz 15 years ago
Purple Belt
0
why don't you use a script that gets the "UserName" environment variable?

set objShell = CreateObject("WScript.Shell")
strUserName=objShell.ExpandEnvironmentStrings("%UserName%")
msgbox strUserName
Posted by: SHRIRAMVEN 15 years ago
Senior Yellow Belt
0
Thanks for the help guys. Issue is resolved now.
Posted by: anonymous_9363 15 years ago
Red Belt
0
why don't you use a script that gets the "UserName" environment variable?Because that would return the admin user's username. The OP wants to point a script at a machine and find out the username of the user who is logged-in to it.
Issue is resolved now. Perhaps you'd be good enough to share its resolution with the rest of the community?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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