Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute batch file(in turn executes exe) from powershell

I am trying to execute a install activeMq service from powershell, for which I am trying to call a batch file (which inturn calls the wrapper.exe) using:

& "C:\apache-activemq-5.6.0\bin\win64\InstallService.bat"

I am getting '"wrapper.exe"' is not recognized as an internal or external command,or batch file'

But when I execute InstallService.bat from command prompt I am able to run the service

Any help would be appreciated

Thanks, Anandh

like image 926
Anandh Avatar asked Jul 14 '26 03:07

Anandh


1 Answers

try this

& "cmd.exe /c C:\apache-activemq-5.6.0\bin\win64\InstallService.bat"
like image 71
CB. Avatar answered Jul 15 '26 22:07

CB.