rutgermons
asked on
There is no script engine for the file extension ".cmd"
folks, getting error when invoking the below script
There is no script engine for the file extension ".cmd"
@echo off
net stop IBMWAS70Service- AppServer_1
CALL wscript "F:\A_IBMX64\IBM\maximo\de ployment\b uildear.cm d"
CALL wscript "F:\A_IBMX64\IBMsync.cmd"
net start IBMWAS70Service-AppServer_ 1
any ideas? or an alternative solution to invoking the above from a windows server?
There is no script engine for the file extension ".cmd"
@echo off
net stop IBMWAS70Service- AppServer_1
CALL wscript "F:\A_IBMX64\IBM\maximo\de
CALL wscript "F:\A_IBMX64\IBMsync.cmd"
net start IBMWAS70Service-AppServer_
any ideas? or an alternative solution to invoking the above from a windows server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
cmd.exe runs .cmd files equivalent to .bat files
Both Cscript and Wscript expect VBScript files.
Which was my suspicion so you can either run your file as indicated above or:
@echo off
net stop IBMWAS70Service- AppServer_1
CALL cmd.exe /c "F:\A_IBMX64\IBM\maximo\de ployment\b uildear.cm d"
CALL cmd.exe /c "F:\A_IBMX64\IBMsync.cmd"
net start IBMWAS70Service-AppServer_ 1
@echo off
net stop IBMWAS70Service- AppServer_1
CALL cmd.exe /c "F:\A_IBMX64\IBM\maximo\de
CALL cmd.exe /c "F:\A_IBMX64\IBMsync.cmd"
net start IBMWAS70Service-AppServer_
Just CALL <other>.cmd will do just fine:
net stop IBMWAS70Service- AppServer_1
(a space after the dash -> you need to remove that space )
@echo off
net stop IBMWAS70Service-AppServer_1
CALL "F:\A_IBMX64\IBM\maximo\deployment\buildear.cmd"
CALL "F:\A_IBMX64\IBMsync.cmd"
net start IBMWAS70Service-AppServer_1
Note you have a error in your net stop command:net stop IBMWAS70Service- AppServer_1
(a space after the dash -> you need to remove that space )
What is the error you are getting?
What is the OS version?
What is the OS version?
ASKER
wouldnt this be an option?
@echo off
set BuildearDir=F:\A_IBMX64\ma ximo\deplo yment
set SyncWebsphereDir=F:\A_IBMX 64
net stop IBMWAS70Service-AppServer_ 1
CALL "%BuildearDir%\buildear.cm d"
CALL "%SyncWebsphereDir%\IBMsyn c.cmd"
net start IBMWAS70Service-AppServer_ 1
@echo off
set BuildearDir=F:\A_IBMX64\ma
set SyncWebsphereDir=F:\A_IBMX
net stop IBMWAS70Service-AppServer_
CALL "%BuildearDir%\buildear.cm
CALL "%SyncWebsphereDir%\IBMsyn
net start IBMWAS70Service-AppServer_
Anything that calls the actual cmd file without wscript, (which is what your initial issue was)
If you call the .cmd file with full path or setting the dir as a param would more or less be the same.
If you call the .cmd file with full path or setting the dir as a param would more or less be the same.
Did my comment :
Resolve this for you, or are you still having issues ?
@echo off
net stop IBMWAS70Service- AppServer_1
CALL "F:\A_IBMX64\IBM\maximo\deployment\b uildear.cm d"
CALL "F:\A_IBMX64\IBMsync.cmd"
net start IBMWAS70Service-AppServer_1
Resolve this for you, or are you still having issues ?
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for rutgermons's comment #a40026149
for the following reason:
i was able to solve the problem myself
Accepted answer: 0 points for rutgermons's comment #a40026149
for the following reason:
i was able to solve the problem myself
This issue was fixed with the first comment.
#40026018
A subsequent question was open based on the information here where rutgermons added the additional step of changing the execution path.
The solution was the removal of wscript from the command and this was clearly indicated even accepted as can be seen in the thread.
#40026018
A subsequent question was open based on the information here where rutgermons added the additional step of changing the execution path.
The solution was the removal of wscript from the command and this was clearly indicated even accepted as can be seen in the thread.