Sign in to follow this  
Followers 0
Zeca

Running a scheduled script

11 posts in this topic

Hi, I need help.

My script must run without assistance. So I scheduled it on Windows 2003 R2 using the native scheduler.

But if the desktop is not opened ( it is on the screen saver ), the script does not execute. When I log on the Windows, the putty window opened but the Win/Send functions did not work. Below the initial lines of the script

Run( "c:\hp\autoit\putty.exe -X 192.168.200.110" )

WinWaitActive( "192.168.200.110 - PuTTY" )

Sleep( 5000 )

Send( "root{ENTER}" )

Sleep( 1000 )

Send( "telnet{ENTER}" )

Sleep( 3000 )

Neither the login was sent nor the password.

I appreciate any help

Regards

Jose

Share this post


Link to post
Share on other sites



Does it need to run at a specific time? or would putting it in the group policy (GPEDIT.MSC) as a logon script work ok?

Share this post


Link to post
Share on other sites

Does it need to run at a specific time? or would putting it in the group policy (GPEDIT.MSC) as a logon script work ok?

Thanks for your reply. What does this mean, "putting it in the group policy (GPEDIT.MSC)", how can I do it

Regards

Share this post


Link to post
Share on other sites

goto START>RUN and type GPEDIT.MSC (that will open up your group policy), then under COMPUTER CONFIGURATION> WINDOWS SETTINGS> SCRIPTS (startup/shutdown), you can specify what files should be run at shutdown and what should be run at startup.

Share this post


Link to post
Share on other sites

goto START>RUN and type GPEDIT.MSC (that will open up your group policy), then under COMPUTER CONFIGURATION> WINDOWS SETTINGS> SCRIPTS (startup/shutdown), you can specify what files should be run at shutdown and what should be run at startup.

Thanks for your reply.

Unfortunatelly, that it is not enough. Normally this server does not have anyone logged in. That is the reason I must use a scheduler.

Regards

Share this post


Link to post
Share on other sites

Oh ok. I think (and you may want to test or verify) that if you run a script as a service it will load even if no user is logged in. For more info on running as a service please see the FAQ

Share this post


Link to post
Share on other sites

Oh ok. I think (and you may want to test or verify) that if you run a script as a service it will load even if no user is logged in. For more info on running as a service please see the FAQ

Thnks for your reply.

I saw how to run as a service in the FAQ, and I will try it.

Regards

Share this post


Link to post
Share on other sites

Hi, I need help.

My script must run without assistance. So I scheduled it on Windows 2003 R2 using the native scheduler.

But if the desktop is not opened ( it is on the screen saver ), the script does not execute. When I log on the Windows, the putty window opened but the Win/Send functions did not work. Below the initial lines of the script

Run( "c:\hp\autoit\putty.exe -X 192.168.200.110" )
WinWaitActive( "192.168.200.110 - PuTTY" )
Sleep( 5000 )
Send( "root{ENTER}" )
Sleep( 1000 )
Send( "telnet{ENTER}" )
Sleep( 3000 )

Neither the login was sent nor the password.

i believe that the problem is caused by the following line:

WinWaitActive( "192.168.200.110 - PuTTY" )

If no user is logged in, then your activate window will always be login (or press CAD to login), thus you script will hang at this point.

how did you go with the service automation ???

i will post a STDOUT, STDERR & STDIN script that may help you with your putty login problems. I will post it into this post (http://www.autoitscript.com/forum/index.php?act=findpost&pid=466131) to solve the problem i found earlier (and i hope to help others looking for a solution)

also, take a look in the SVN @ http://sf.net/projects/vnc2me/. That project uses Autoit to automate VNC connections using SSH tunneling via plink.exe (and/or PuTTY.exe)

hope this helps


ask a silly question and remain a fool for 5 minutes...don't ask, and remain a fool for life__JD - YTS | VNC2Me - Secure remote Desktop Support Solutions

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