Used AutoLogon But Macro doesn't run

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

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

Post by Marcus Tettmar » Wed Aug 30, 2006 9:17 am

Where do you have Macro Scheduler installed? Is it installed under the same account that you are specifying for AutoLogon? Where are the macro files stored? Are they accessible to the account being used for AutoLogon?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Edwin.Schwartz
Newbie
Posts: 7
Joined: Fri Aug 25, 2006 1:00 pm

30 sec

Post by Edwin.Schwartz » Wed Aug 30, 2006 9:27 am

the wait does not help: exactly the same behaviour as before.
What seems really strange is that macro scheduler seems to
remember the scheduled task and starts it on NEXT login ...

installed in:
C:\Programme\MJT Net Ltd\Macro Scheduler
(German Windows)

script is in the same directory

yes, the login is for the same user, and the user is owner of
the directory and all files.

Perhaps I shout mention that I've installe all service packs an
security updates .....

setting the /noexecute option in boot.ini to "AlwaysOff" doesn't help either ...

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

Re: 30 sec

Post by Marcus Tettmar » Wed Aug 30, 2006 9:38 am

Edwin.Schwartz wrote:the wait does not help: exactly the same behaviour as before.
What seems really strange is that macro scheduler seems to
remember the scheduled task and starts it on NEXT login ...
Odd. Suggests the Scheduler Service wasn't able to write back to the file that the schedule took place. Either that or it didn't complete. But the fact Windows logged off again suggests it did complete.

Sounding like a permissions problem to me.

Do you have logging enabled for this script? Anything showing up in there?

Can you also try removing Macro Scheduler from the Startup folder so that it doesn't start after the log in. Just wonder if there's some conflict there.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Edwin.Schwartz
Newbie
Posts: 7
Joined: Fri Aug 25, 2006 1:00 pm

Re: 30 sec

Post by Edwin.Schwartz » Wed Aug 30, 2006 10:18 am

mtettmar wrote: Odd. Suggests the Scheduler Service wasn't able to write back to the file that the schedule took place. Either that or it didn't complete. But the fact Windows logged off again suggests it did complete.

Sounding like a permissions problem to me.

Do you have logging enabled for this script? Anything showing up in there?

Can you also try removing Macro Scheduler from the Startup folder so that it doesn't start after the log in. Just wonder if there's some conflict there.
I have to correct my statements:
I said the script will start automatically on the NEXT login; that seems only true, if the next login is within the scheduled MINUTE - and that would make sense I think.

I don't habe macro scheduler in the startup folder anyhow - removed it some days ago for test purposes

Here's the log file; it suggests that msched.chm is started and teminated immedately ...

30.08.2006 11:51:07:053 - Started Macro : C:\Programme\MJT Net Ltd\Macro Scheduler\Display Help File.scp
30.08.2006 11:51:07:053 - START: Wait>30
30.08.2006 11:51:37:063 - END: Wait>30
30.08.2006 11:51:37:063 - START: ExecuteFile>msched.chm
30.08.2006 11:51:37:110 - END: ExecuteFile>msched.chm
30.08.2006 11:51:37:110 - START:
30.08.2006 11:51:37:126 - END:
30.08.2006 11:51:37:126 - Finished Macro : C:\Programme\MJT Net Ltd\Macro Scheduler\Display Help File.scp

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

Post by Marcus Tettmar » Wed Aug 30, 2006 10:27 am

Ok, well, I don't expect you will see anything here - the macro simply starts the help file and then immediately exits, and of course AutoLogon will then log off straight away. So you are unlikely to see anything happen. It all happens too soon - there is no allowance for the time it takes for the help file to open before Windows is logged off again.

Try adding Wait>30 at the END of the script. This will give the system 30 seconds to open up the help file before it logs off again. You may even want to make it a full minute just as a test:

Wait>60

Put this at the end of the script. Alternatively add this line to the end of the script:

MessageModal>Click Me to Log Off

This will ensure that Windows will not log off until you OK the message box, since the message box is modal and the script won't finish until you click Ok.

If you still don't see anything on the screen open up task manager and see if process hh.exe is running. hh.exe is the process that runs the help file. Check to see if hh.exe is running during the 60 seconds before log off.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Edwin.Schwartz
Newbie
Posts: 7
Joined: Fri Aug 25, 2006 1:00 pm

hh.exe

Post by Edwin.Schwartz » Wed Aug 30, 2006 11:39 am

Thank you very much for your patience!

OK, the hh.exe service is NOT started. In the eventlog I find an entry
that (diffiult to translate) says something like
"the description of the event 1903 in HHCTRL was not found .....
perhaps you must use the flag /AUCSOURCE .... see http://go.microsoft.com/fwlink?LinkID=45839"

Well, that's beyond my understanding .... Any hint from YOUR side?

The good news: I tried a different script (the Notepad thing) and
after adapting the WaitWindowOpen to the German window title
it worked perfectly !

And there's another issue that someone mentioned in the forum:
sometimes (not always) i can't log out / shut down as long as macro scheduler is running. Have to exit it manually from the system tray.

Well, once again, thank you very much for your help!

Ed

CPUNeck
Newbie
Posts: 3
Joined: Fri Aug 18, 2006 1:11 pm

Post by CPUNeck » Thu Aug 31, 2006 5:26 pm

Well, seem's I have this issue too. Some differences are that I'm running the macro on a 2003' terminal server. I have some cool tools enabling me to see processes and other stuff remotely.

Looks like the user logs on, but not all the nessasary applications start. Like I can't confirm the logged on user has visiable windows. If I named the app (notepad.exe) I can see the app running remotely, but if I record steps needed to click various buttons, those apps do not show up.

What to do next?

davideckman
Newbie
Posts: 1
Joined: Thu Sep 21, 2006 1:59 am

Post by davideckman » Thu Sep 21, 2006 2:24 am

I am also having a similar problem

I'm using the Trial version 8.0.4 with Windows XP Pro SP2. We have Secure Login enabled.

I can create a schedule with auto-login and then lock my PC and the scheduler will unlock my PC, run the macro and then lock it again.

BUT, if I create the schedule and logout, the schedule never seems to run. I downloaded the updated autologonsvc.exe file, but a log is never created in the drive root, so it seems the schedule isn't running.

Is this something to do with the TRIAL version? This is the main reason I'm looking at Macro Scheduler, so that I can run macros while not logged into a system.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Thu Sep 21, 2006 2:46 am

Have you read this http://www.mjtnet.com/usergroup/viewtopic.php?t=3188

The trial should be fully functional.

Fitz1000
Newbie
Posts: 6
Joined: Wed Oct 18, 2006 11:35 pm

Similar problem, but not exactly the same...

Post by Fitz1000 » Wed Oct 18, 2006 11:46 pm

I am new to scripting and I have put together a solution that is probably not very "elegant" but it works (sort of). My main problem seems to center around using Application.Quit. I have to open and update a number of excel files with this one macro and then save 2 as tab delimited text files. At the end, I need the macro to close the whole shebang (all the files and the application). This works fine if I am logged in, but when I get locked out and use the autologin feature, the whole macro runs down to very last point, but it never closes the files. This is problem, because when it runs again (every 15 minutes) it will fail if the files are already open. Anybody have suggestions (and patience for the newby).

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Thu Oct 19, 2006 2:40 am

If you process runs every fifteen minutes, why not just set any "lock out" like a screen saver password, etc... to work every 20 minutes? As for the files being open, when the process runs again, just check to see if they are open and, if so, don't open them again. If you are opening them with a exe> then you can test to see if the specific WindowNames are open or not.

I hesitate to mention this, but in the past, I have written a script I call "StayActive" which could look like:

Label>WaitAgain
wait>30
mousemove>0,0
wait>30
mousemove>10,10
goto>WaitAgain

I use this if I have to work on a customers system where I haven't been given the password (they get me logged in and leave for the day and I'm connected with GoToMeeting or GoToMyPC)....and I may want to take a couple hours break and return to the work later. This way I don't need the password, can finish my work when I get to it, and DON"T NEED AUTOLOGON....because the system never logs off.

Talk about "not very elegant", but it works....

Fitz1000
Newbie
Posts: 6
Joined: Wed Oct 18, 2006 11:35 pm

Post by Fitz1000 » Thu Oct 19, 2006 4:32 am

I will have to try the script idea...but I am sure IT would rather just put my macro on one of their servers rather than keep my system in a state of "unlock" all the time. Regarding the macro itself, it will need to run every 15 minutes for the next couple of months, so changing my time out to 20 minutes won't do the trick in this case (but I have others that it might...). I also need to close the files, because I need to use the same files every 15 minutes, if only the darn Application.Quit would run while under Autologon. The only other thing I could think of would be to put something at the begining of my script to check if the files are open, and then close them, any ideas?

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Thu Oct 19, 2006 8:18 pm

Yes, checking for first to see if the files are open was what I meant. If you open them with Exe>SomeFile.xls, then you should be able to use IfWindowOpen>SomeFile* ...and then take some action or skip some action based on that If> statement.

...are you not allowed to change your own settings or does IT check to see if your time-out is set to 20 minutes? If you need to setting to last for 2 months, then why not change it permanently?

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