Solved

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

Posted on 2014-04-27
12
1,082 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 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 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
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

932 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

15 Experts available now in Live!

Get 1:1 Help Now