compiled scripts do not run from C:\

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
stepet
Newbie
Posts: 5
Joined: Mon Nov 13, 2006 2:36 pm

compiled scripts do not run from C:\

Post by stepet » Mon Nov 13, 2006 3:10 pm

I have a strange problem:
I created a bunch of scripts on my PC for setting up various things on another PC (both are Windows XP,SP2). I compiled my scripts, copied the exes to a USB stick and tested them on the target PC using the Run.. command.
After everything was runing ok, I copied the exes from the stick to their final location on C:. Now the exact scripts that worked when executed from E:\ do not work anymore from C:. The Icon in the Taskbar does appear, a filed named like 20061113*msrta1.tmp is created, and that's it. No logfile is created, even when requested to do so.
I'm still using Macro Scheduler Pro, Version 7.4.009.
I have reduced my script to

Msg>Hello world!
Wait>10

Can somebody help?

Regards

Stefan Peter

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

Post by Marcus Tettmar » Mon Nov 13, 2006 3:16 pm

I have no problem running from c:\

What do your scripts do? Feel free to post your code.

Is your PC locked down in some way? Some kind of security block to prevent things running from root?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Nov 13, 2006 3:18 pm

Did the files copy properly? Check the file size of the originals and compare to the copied files. Are the sizes exactly identical?

stepet
Newbie
Posts: 5
Joined: Mon Nov 13, 2006 2:36 pm

Post by stepet » Mon Nov 13, 2006 3:30 pm

All scripts I tried have the same size and checking them using comp suggests they are OK.

One example of such a misbehaving script is given above.

The OS is a simple WindowsXP, no additional SW is installed.

There are no entries in the event viever that may be relevant.

Regards

Stefan Peter

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Nov 13, 2006 3:38 pm

Sorry, I don't have version 7 at work anymore so I can't test. If there is no resolution I can try this at home but that will be 12 hours from now.

After the failure running from C: did you retry running from E:?

stepet
Newbie
Posts: 5
Joined: Mon Nov 13, 2006 2:36 pm

Post by stepet » Mon Nov 13, 2006 3:43 pm

Yes, beside anoter icon in the task bar (that simply vanishes when trying to click it), nothing happens.
I will try to re-install the target OS, but I simply can not understand why the location the script was callef from should make a difference.

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Nov 13, 2006 3:56 pm

Yes, beside anoter icon in the task bar (that simply vanishes when trying to click it), nothing happens.
That just means the script had completed and the taskbar had not yet refreshed to remove the icon from view.

My thought is that if the sequence of events is:

1) Run exes from E: = success

2) Run exes from C: = failure

3) Run exes form E: = failure

Perhaps something else occurred between running them from E: and running them from C:. For example:

Do you have virus scanning active on the target computer?

Have you checked Task manager to see if the exes are still running from the E: execution?

Perhaps some memory malady. Did you reboot the target computer?

stepet
Newbie
Posts: 5
Joined: Mon Nov 13, 2006 2:36 pm

Post by stepet » Mon Nov 13, 2006 4:28 pm

The sequence is
1) Run form E: = success
2) Run from C: = failure
3) Run from E: = success
4) Run from C: = failure
and so on

In case of failure, I can see no entry in the task manager.

There is no AV installed on the target. Even the on-board firewall is disabled.

I will run some memory tests over night on the target, but I doubt that his is the problem. However, one never knows ..

Thank you both very much for your support so far. I will let you know tomorrow morning if the memory test or the reinstallation of the OS has solved my problems.

Regards

Stefan Peter

stepet
Newbie
Posts: 5
Joined: Mon Nov 13, 2006 2:36 pm

Post by stepet » Tue Nov 14, 2006 1:38 pm

Ok, I found it

After detecting that "Run from E:" fails if all other files and directories are deleted, it was easy to restore the former content of E: and start to remove file by file until the test stopped working. Much to my shame, the culprit was a directory called Temp. This rang a bell, however, and, who would believe it, the TEMP environment variable was set to Temp!

It seems that compiled scripts are using %TEMP% or %TMP% for storing some stuff without checking if the path actually exists. Naturally, one would expect so, but in my case, this was the case only in every directory that had a subdirectory named Temp!

It is interesting to notice that the execution and debugging of uncompiled scripts are not influenced.

Sorry for the troubles I may have caused.

Regards

Stefan (with a brown paper bag over his head) Peter

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