Remotely execute script that logon....

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Morten Nissen
Newbie
Posts: 9
Joined: Thu Aug 25, 2005 12:46 pm

Remotely execute script that logon....

Post by Morten Nissen » Fri Apr 14, 2006 7:59 pm

Hi.

I have a big problem and that is because i can not get a script to run with autologon.

We have some applications that we have restart on a server and I don't want the users to have the admin password and then have to logon and close and restart the programs. The programs have some parameters in the icon file and I have tryed to put them into a commandline to restart the program from a bat file but it does not work. So now i have upgraded from v 7 Pro to V 8 Enterprise and was going to use the autologon feature to fix the problem but itt will not logon if it is not scheduled. If I run the script remotely when locked then it will not logon and run the script, it just run the script but without logging on, and that is no good.

I have tryed to schedule the script and then it works fine, but if i run it from a Citrix server using msNet then it will only run but not logon and I can see the mouse move around.

I want to execute the script so that it autologon and runs and the only way I find out is that it can only be done if it is scheduled.

Does someone know how i can make autologon work when running script from msNet (on another machine)?

Or is there somewhere that I can run a script in locked mode and make Macro Scheduler run the script like it was scheduled to run at the time the script is executed and then use autologon?

Can I send username and password to the service Auto Login Service that Macro Scheduler installs and get logon that way and then run the script?

Best regards
Morten

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Apr 14, 2006 9:12 pm

I have not used MsNet with Citrix, but I have done this with pcAnyWhere:


1. Created Macro Scheduler scripts, stored them on remote system with desktop icon link. This script logs out of remote system as last commands.

2. User logs out of system at end of day. pcAnyWhere is running in Host
mode.

3. Nightly Macro Scheduler routine runs here on a schedule. It starts pcAnyWhere making a connection to the remote system.

4. The script does the login, then double clicks the icon on the desktop, starting the local copy of the Macro Scheduler script, then breaks the pcAnyWhere connection.

5. The remote system continues to run its Macro Scheduler script, and logs out of the system at the end.

Net result is a scheduled login at the remote system and running of my Macro Scheduler script, then a logout at the remote system.

Don't know if this approach will work for you, but may at least stimulate some other techniques.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Morten Nissen
Newbie
Posts: 9
Joined: Thu Aug 25, 2005 12:46 pm

Post by Morten Nissen » Sat Apr 15, 2006 7:36 am

Hi Bob.

Thanks for the reply, but still I need some machine that is logged on all the time to run the first PCAnywhere login.

Bob Hansen wrote:I have not used MsNet with Citrix, but I have done this with pcAnyWhere:


1. Created Macro Scheduler scripts, stored them on remote system with desktop icon link. This script logs out of remote system as last commands.

2. User logs out of system at end of day. pcAnyWhere is running in Host
mode.

3. Nightly Macro Scheduler routine runs here on a schedule. It starts pcAnyWhere making a connection to the remote system.

4. The script does the login, then double clicks the icon on the desktop, starting the local copy of the Macro Scheduler script, then breaks the pcAnyWhere connection.

5. The remote system continues to run its Macro Scheduler script, and logs out of the system at the end.

Net result is a scheduled login at the remote system and running of my Macro Scheduler script, then a logout at the remote system.

Don't know if this approach will work for you, but may at least stimulate some other techniques.
Best regards
Morten

Morten Nissen
Newbie
Posts: 9
Joined: Thu Aug 25, 2005 12:46 pm

Remotely execute script that logon....

Post by Morten Nissen » Sat Apr 15, 2006 7:41 am

Does someone know if it's possible to only logon and not logoff again when the script is done?

If that is possible then I could just run a script every 5 sec to logon if it's not already logged on.

Is there anyway that I can have the script checking if the computer is locked and if it's not then do nothing but if it is locked then run the script?



Best regards
Morten

Danish_Ken
Junior Coder
Posts: 22
Joined: Mon Sep 12, 2005 1:34 am
Location: Melbourne - Australia

Remotely execute script that logon....

Post by Danish_Ken » Thu Apr 20, 2006 6:03 am

Hi Gurus,

Another question, somewhat related to above scenario.

I use WinXP "Remote Desktop Connection" on PC "Main" to control a "Robot" PC running a Macro Scheduler script (compiled .exe)

This works fine before, and while I'm remoted in. When I hang up from "Main", then "Robot" PC is left in a locked state, and script falls over, because it needs to see the program windows to edit, select, copy etc.

I have been googling all over the internet for a solution to prevent "Remote Desktop Connection" from locking the remote PC when you hang up, but found no answer.

Is there a way to make Macro Scheduler (preferably a compiled .exe) to:

Wait>10.0
LoginUser>user,password
or
UnLockDesktop>password

Has anyone found any other solution to this, without purchasing PcAnywhere, RAdmin, VNC or the likes?

Thanks
/Ken

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Apr 20, 2006 7:55 am

Macro Scheduler 8.0 has AutoLogon which does precisely what you describe. When the macro is scheduled and the machine is locked or logged out AutoLogon will log into windows before the macro is run and lock or log out of windows again when the macro has completed.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Danish_Ken
Junior Coder
Posts: 22
Joined: Mon Sep 12, 2005 1:34 am
Location: Melbourne - Australia

Post by Danish_Ken » Fri Apr 21, 2006 2:11 am

Thanks Marcus,

Can AutoLogon be rolled into a compiled .EXE as well?

/Ken
Macro Scheduler since Version 5.0 - 21/10/1998

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Apr 21, 2006 3:53 pm

No, because only a service can perform an autologon. AutoLogon works by way of a system level service.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Morten Nissen
Newbie
Posts: 9
Joined: Thu Aug 25, 2005 12:46 pm

Post by Morten Nissen » Wed Apr 26, 2006 5:01 pm

mtettmar wrote:Macro Scheduler 8.0 has AutoLogon which does precisely what you describe. When the macro is scheduled and the machine is locked or logged out AutoLogon will log into windows before the macro is run and lock or log out of windows again when the macro has completed.
I know that it will only run when itäs scheduled, that is why I äm asking for any soultion so it so I can get scheduled whhen I need to run the script or compiled exe.

I run a command from a Citrix server and itäs restarting some programs witch can nor be run as services and the server needs to be logged on fo it to close and restart the programs. All that is working good but I still need it to logon to the server if it is not logged on already, and for that to happen I need it to be scheduled. So Iäm looking for a solution to make the script scheduled from the Citrix server when I run a compiled exe.

Is that possible or not?

Thanks.

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