Solved

There is no script engine for the file extension ".cmd"

Posted on 2014-04-27
12
1,071 Views
Last Modified: 2014-05-10
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\deployment\buildear.cmd"
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?
0
Comment
Question by:rutgermons
12 Comments
 
LVL 28

Accepted Solution

by:
becraig earned 500 total points
ID: 40026018
Try removing the wscript and simply call the cmd file, I am not sure if wscript handles cmd files.


@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
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40026029
cmd.exe runs .cmd files equivalent to .bat files
0
 
LVL 45

Expert Comment

by:aikimark
ID: 40026062
Both Cscript and Wscript expect VBScript files.
0
 
LVL 28

Expert Comment

by:becraig
ID: 40026068
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\deployment\buildear.cmd"
CALL  cmd.exe /c "F:\A_IBMX64\IBMsync.cmd"
net start IBMWAS70Service-AppServer_1
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 40026078
Just CALL <other>.cmd will do just fine:

@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

Open in new window

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 )
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 3

Expert Comment

by:telczj9
ID: 40026118
What is the error you are getting?

What is the OS version?
0
 

Author Comment

by:rutgermons
ID: 40026149
wouldnt this be an option?

@echo off
set BuildearDir=F:\A_IBMX64\maximo\deployment
set SyncWebsphereDir=F:\A_IBMX64
net stop IBMWAS70Service-AppServer_1
CALL "%BuildearDir%\buildear.cmd"
CALL "%SyncWebsphereDir%\IBMsync.cmd"
net start IBMWAS70Service-AppServer_1
0
 
LVL 28

Expert Comment

by:becraig
ID: 40026150
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.
0
 
LVL 28

Expert Comment

by:becraig
ID: 40026257
Did my comment :

@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

Resolve this for you, or are you still having issues  ?
0
 

Author Comment

by:rutgermons
ID: 40039402
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
0
 
LVL 28

Expert Comment

by:becraig
ID: 40039403
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.
0

Featured Post

Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now