Error reading C:<temp>
Moderators: JRL, Dorian (MJT support)
Error reading C:<temp>
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.
I will appreciate any assistance.
Error Reading C:\temp (code)
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
*******************************************************
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
*******************************************************
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=
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) ?

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=
Is open a valid DOS/batch command (what about RUN, START)@echo off
REM putting the full path has caused the same error.
cd
openExchange.exe

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) ?
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.Lumumba wrote:Why you use a batch to start the .exe![]()
OpenExchangeSvr.exe is the name of compiled script.Is open a valid DOS/batch command (what about RUN, START)![]()
I placed a 5 second wait in the controlled code prior to calling the batch file. No luck.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 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.Cause the error statement is about C:\Temp.
Are you triggering temp files (those phantom like done&gone type of files) ?
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.
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
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]
[email protected]