Request for Windows Log on / Log off commands

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
buzz
Newbie
Posts: 12
Joined: Wed Aug 03, 2005 5:09 pm

Request for Windows Log on / Log off commands

Post by buzz » Wed Aug 03, 2005 10:36 pm

I am currently trying out your new product MSnet and ran into a situation where I need to issue a command to log in and/or log off from different remote machines. Do you plan to add this command which I think is vital? Thanks.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Aug 04, 2005 6:27 am

Logging off can be achieved with the ShutDownWindows command:

ShutDownWindows>shutdown_type

Use this command to shutdown or reboot the machine. Set shutdown_type appropriatly as follows:

0: Shutdown
1: Reboot
2: Logoff
3: Forced Shutdown
4: Forced Reboot
5: Forced Logoff

Logging on cannot be achieved as Microsoft do not allow macro programs to simulate a log in, for security reasons. A workaround is to run a macro which sets the AutoLogon value in the registry to force the machine to automatically logon next time, and then do a reboot using the above command. Then disable AutoLogon again.
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts