Script to run 1 process and kill 2 services

Discuss and share scripts and script files...
swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: Script to run 1 process and kill 2 services

Post by swan_x »

ok people, new attempt:
on cmd i write: net start "apple mobile device service" and the service start!
but on XY i write: run "cmd /c net start "Apple Mobile Device Service" /F";
the service don't run and have a error: Impossible find specified file.File: "cmd /c net start "Parameters: Apple Mobile Device Service" /F"
run
"cmd /c net start "Apple Mobile Device Service" /F"

with run "cmd /c net start "Apple Mobile Device Service"; i have an error overflow 0 / 0
where is problem??

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Script to run 1 process and kill 2 services

Post by PeterH »

At least you must double quotes inside quotes:

"cmd /c net start ""Apple Mobile Device Service"" /F"

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Script to run 1 process and kill 2 services

Post by highend »

General comments:
net start / stop don't know the parameter "/F"?

Normally starting / stopping services requires admin permissions so
does XY run with admin permissions?

Otherwise your command will fail anyway...
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: Script to run 1 process and kill 2 services

Post by swan_x »

Ok tanxs, now i try with ""...and XY with the admin privilegis!

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: Script to run 1 process and kill 2 services

Post by swan_x »

Ok Work correctly with ""
Tanxs to everybody for support!

Post Reply