Sign in to follow this  
Followers 0
cappy2112

Automating the shutdown and "Switching of Users' in XP

9 posts in this topic

I'd like to make a simple program that will allow me to

1. Shutdown windows (power Off)

OR

2. Restart windows

OR

3. Switch User (Log off,switch user, go to the Multi-User login screen)

with one click

Can these "system menus" be automated via AutoIt ?

Share this post


Link to post
Share on other sites



hehe. yes this can be done.

I'll get you the script. (I've done this to my brother)

Just open notepad.

Put in.

Shutdown(6)  ;Force a reboot

Save it as .au3 compile it or .zip it and have someone run it! :whistle:


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites

I'd like to make a simple program that will allow me to

1. Shutdown windows (power Off)

OR

2. Restart windows

OR

3. Switch User (Log off,switch user, go to the Multi-User login screen)

with one click

Can these "system menus" be automated via AutoIt ?

Thanks this may help, but i was wondering if it could be done by automating the menus, not directly calling the APIS

Share this post


Link to post
Share on other sites

Probably. You mean after you click out of a msgbox?


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites

Probably. You mean after you click out of a msgbox?

What messagebox?

I'm talking about when you want to switch users in XP.

Start->Log Off->Switch User. I'd like to be able to do this with one click.

It looks like calling Shutdown(6) will let me reboot the system, so I'll take a look at the other args for shutdown to see what they do. But I'm curious if these menus Start->Log Off->Switch User can be automated, since they are not application menus, but system menus.

Share this post


Link to post
Share on other sites

I'd like to make a simple program that will allow me to

1. Shutdown windows (power Off)

OR

2. Restart windows

OR

3. Switch User (Log off,switch user, go to the Multi-User login screen)

with one click

Can these "system menus" be automated via AutoIt ?

I'm more interested in Switching Users with one click, because I can leave all my programs running, then just

log off (let someone else log on). When they are done, I can just log back in and all my programs are still running.

Share this post


Link to post
Share on other sites

Try with Send command to send these keys:

WIN UP LEFT ENTER

This will take you to Logoff dialog.

Continue trying keystrokes because I don't have Switch User function enabled.

i542


I can do signature me.

Share this post


Link to post
Share on other sites

Try with Send command to send these keys:

WIN UP LEFT ENTER

This will take you to Logoff dialog.

Continue trying keystrokes because I don't have Switch User function enabled.

i542

Thanks, but have you actually tried this?

When I run it, the four words in the Send arg list are displayed in the editor windows (Scite)

Share this post


Link to post
Share on other sites

When those menus are open, I believe that applications are temporarily paused. You will not be able to automate when AutoIt is paused.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0