Solved

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

Posted on 2014-04-27
12
1,108 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 29

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 79

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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 29

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, EE MVE
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
 
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 29

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 29

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 29

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
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 setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
The viewer will learn how to count occurrences of each item in an array.

825 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