Error reading C:<temp>

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
tlc1026
Newbie
Posts: 4
Joined: Sun Feb 22, 2004 11:05 pm

Error reading C:<temp>

Post by tlc1026 » Sun Feb 22, 2004 11:16 pm

I having a problem when I call my Macro Schedule script (.exe) from another program (Batch or C++). I get a Macro Scheduler warning box stating "Error reading : C:\Temp" or the temp directory for the user under document and settings... This occurs on both NT and 2K. The script will run without any error when it is executed directly. However, that isn't what I need for it to do. The script finds MS Exchange 5.5 and open it. (Nothing more)

I will appreciate any assistance.

Lumumba

Post by Lumumba » Mon Feb 23, 2004 1:06 am

Some code? :roll:

tlc1026
Newbie
Posts: 4
Joined: Sun Feb 22, 2004 11:05 pm

Error Reading C:\temp (code)

Post by tlc1026 » Mon Feb 23, 2004 1:28 am

Additionally, the error reading c:\ occurs the first and sometimes the second attempt to execute the executeable. However, on the third attempt or fourth it works.

Note: If I call the batch file from the window run I don't get the error as frequently. It happens with more when used as a short cut. (Short cut to the batch file that calls the executeable.)

The batch file that is calling the executeable is below:
@echo off

REM putting the full path has caused the same error.
cd
openExchange.exe


The script used to create the exe being called is bellow:

////////////////////////////////////////////////////////////////////////////////////
//
//
//
// Author:
// Date: February 17, 2004
//
// History: 02-17-04 Created
//
//////////////////////////////////////////////////////////////////////////////////////



Let>logFileName=c:\dms\logs\ServerInstaller\TSIU.log

// Locate the exchange server's
WriteLn>%logFileName%,result,%logFileDate% 4000 Entering FindExchSrvr ....
WriteLn>%logFileName%,result,%logFileDate% 4000 Locate the exchange server location
RegistryReadKey>HKEY_LOCAL_MACHINE,Software\Microsoft\Exchange\Setup,Services,exchsrvrLoc
//MessageModal>%exchsrvrLoc% //Debug: displays drive letter of the exchange server
IfFileExists>%exchsrvrLoc%\bin\Admin.exe,StartExchange
WriteLn>%logFileName%,result,%logFileDate% 4000 Found exchange svr at: %exchsrvrLoc%\bin\

// add later: if file does not exists ask user to start up exchange server and maximize the windows

Label>StartExchange
// Start Exchange Server
Let>svrFileName=%exchsrvrLoc%\bin\Admin.exe

// suppress the windows error messages
// Let>RP_DISPLAYERROR=0
Run Program>%svrFileName%
WriteLn>%logFileName%,result,%logFileDate% 4000 Return value after launching server %RP_Result%
If>RP_Result>31,maxWin
WriteLn>%logFileName%,result,%logFileDate% 4999 Exchange Server did not launch correctly
WriteLn>%logFileName2%,result,%logFileDate% Exchange Server did not launch correctly. Unable to configure X.400 connectors.
Goto>end
Label>maxWin
WaitWindowOpen>Microsoft Exchange Administrator*
Wait>4
WindowAction>1,Microsoft Exchange Administrator*
WriteLn>%logFileName%,result,%logFileDate% 4000 Maximized exchange server window
Wait>4

// open a new window
Press Alt
Send>Wn
Release Alt
Wait>2
// Now display connectors in right window pane
Press Tab
Press Right
Press Down
Press Right
Press Down *3

WriteLn>%logFileName%,result,%logFileDate% 4000 Exiting FindExchSrvr ....
Exit


*******************************************************

Lumumba

Post by Lumumba » Mon Feb 23, 2004 1:27 pm

Why you use a batch to start the .exe :?:

If you set the system var PATH for the exchange.exe you should be able to call it without the need to "link" to its specific directory.

Run Program> CMD /K SET PATH=
@echo off

REM putting the full path has caused the same error.
cd
openExchange.exe
Is open a valid DOS/batch command (what about RUN, START) :?:

Would it make sense to be a little patient right after you've executed svrFileName (I guess there's a param for that ~ RP_WAIT ???)

Cause the error statement is about C:\Temp.
Are you triggering temp files (those phantom like done&gone type of files) ?

Guest

Post by Guest » Mon Feb 23, 2004 3:52 pm

Lumumba wrote:Why you use a batch to start the .exe :?:
We are automating an installation of Exchange. We need for Exchange to open so that the user can handle a few manual steps. The script opens Exchange and places the user at the proper point to begin there manual steps. The installation controller code calls the batch file, that contains the compiled script, at the proper point of the installation. We were calling the compiled script directly but it errored also.
Is open a valid DOS/batch command (what about RUN, START) :?:
OpenExchangeSvr.exe is the name of compiled script.
Would it make sense to be a little patient right after you've executed svrFileName (I guess there's a param for that ~ RP_WAIT ???)
I placed a 5 second wait in the controlled code prior to calling the batch file. No luck.
Cause the error statement is about C:\Temp.
Are you triggering temp files (those phantom like done&gone type of files) ?
I don't think so. I will be looking at this more today because this error will cause the installation tool to fail testing. I was wondering if Macro Scheduler created temp files that it needs access.

When this occurs a garbage file is create in the directory. Our earlier attempts got the same error but it was stating it couldn't read some file it created.

tlc1026
Newbie
Posts: 4
Joined: Sun Feb 22, 2004 11:05 pm

Post by tlc1026 » Mon Feb 23, 2004 4:15 pm

[quote="Lumumba"]
Would it make sense to be a little patient right after you've executed [b]svrFileName[/b] (I guess there's a param for that ~ RP_WAIT ???)
[/quote]

I will try this and see what happens.

Guest

Post by Guest » Tue Feb 24, 2004 4:20 pm

Trying the latest version to determine if that will fix my issue.

tlc1026
Newbie
Posts: 4
Joined: Sun Feb 22, 2004 11:05 pm

Post by tlc1026 » Thu Feb 26, 2004 10:00 pm

Error hasn't occured in over 10 attempts. Looks like the newer version fix my issue.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Feb 27, 2004 3:33 pm

Hi,

This issue was fixed in the latest version. Says so in the history list:

Version 7.2.043 19/11/2003

Fixed intermittent AVs when running compiled EXEs for good

Version 7.2.041 13/11/2003

Allow Escape to cancel Message/MessageModal boxes
Fixed issue with cancelling macro properties after saving from editor not cancelling changes
Fixed WLN_NOCRLF reset problem
Addressed potential AVs on running compiled EXEs
MJT Net Support
[email protected]

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