11/6/2017

Run Vbs File From Cmd Peru

Give More FeedbackSee More On Stackoverflow

Hello, I am using third application called Streamserve, there is one customized command of Streamserve which can be run from command prompt in following way, ---------------------------------------------------------------------------------------------------------------------- C: Users Mukund Sawant Desktop VBScript>C: Program Files OpenText StreamServe Platform Core 1.5. Bin ss_scm.exe -user Administrator -pass XYZ -cert 'C: ManagementGateway CERT.crt' -servicename app1 -action stop Above command can be run manually from command successfully. You have too many syntax errors.

Can't run vbscript from cmd. Nothing was changed and yes the extension is. Cummins Incal December 2012 Minnesota more. vbs, what exactly do you mean by file. Run VBScript from cmd and send input to. Run a CMD batch file. To run a batch script from the CMD shell, save the file as plain ASCII text with the file extension.CMD, then from the command line, enter the.

Try it this way: command = 'cmd /c 'C: Program Files OpenText StreamServe Platform Core 1.5.2 bin ss_scm.exe' -user ' & userid & ' -pass ' & passwd & ' -cert ' & cert & ' -servicename ' & strs_svc & ' -action stop >logfile.log' Set WshShell = CreateObject('WScript.Shell') ReturnCode = WshShell.Run(command, 0, True) Any command-line parameters that contain spaces need to be quoted for cmd.exe. VBscript uses ' inside a string to mean a single '. You are correct that you have to run the command using cmd.exe, because output redirection (>at end of line) is a cmd.exe feature. -- Bill Stewart [Bill_Stewart].

Hi, Now, Log file doesn't show anything, it's of 0 kb and command has not been fired. Below is the modified command, sub Stopapp(user,pass,cert,strs_svc) WScript.Echo 'Application ' & er & ' will be stopped ' command = 'cmd /c 'C: Program Files OpenText StreamServe Platform Core 1.5.2 bin ss_scm.exe' -user ' & userid & ' -pass ' & passwd & ' -cert '' & cert & '' -servicename ' & strs_svc & ' -action stop >logfile.log' set WshShell = CreateObject('wscript.shell') 'set ReturnCode = ReturnCode = WshShell.Run(command, 0, True) Regards, Mukund. Hi Bill, I could run the commands with your help but now script gets stuck after execution, it automatically doesn't stop.

Manual running of script automatically terminates itself from command prompt. Below is the output of above command and I also want to log the standard output/error of the script output, C: Users sawanmuk Desktop>Cscript Debug_script2.vbs Microsoft (R) Windows Script Host Version 5. Australian Shepherd Puppy there. 8 Copyright (C) Microsoft Corporation. All rights reserved. Value of i is0 Value of i is1 Value of i is2 Application Testphase1 will be stopped cmd /K ss_scm.exe -user Administrator -pass XYZ -cert 'C: Program Files Op enText StreamServe Platform Core 1.5.2 bin security certificatestore trusted aut horities demo.crt' -servicename Testphase1 -action stop Thanks. Regards, Mukund.

Going out on a limb I would suspect that the batch script requires its own parent folder to be the working directory. You can set the working directory accordingly by changing your code to this: Set shell = CreateObject('WScript.Shell') shell.CurrentDirectory = 'C: Users js Desktop createIndex' shell.Run 'createindex.bat' If the above doesn't help you need to provide more information about what should happen and what actually does happen. Running the external command/script in visible mode and without automatically closing CMD usually helps with debugging: shell.CurrentDirectory = 'C: Users js Desktop createIndex' shell.Run 'cmd /k createindex.bat', 1, True. I've 4 simple scripts for what kind of calls.