How to start a service with bat

Solved
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   -  
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   -
Hello everyone
I’m wondering how I would start a list of services in a bat file

for example with these
C:\Program Files (x86)\VMware\VMware Workstation\vmware-authd.exe
C:\Windows\system32\vmnetdhcp.exe


thanks for the help

14 réponses

NetPaggle Posted messages 366 Status Membre 93
 
With the start command.
For example
start notepad.exe

it launches notepad, you see the principle.

--
If you have found the answer to your question, feel free to mark the topic as resolved, as this could help others who encounter the same issue :)
0
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   190
 
Thank you for the helphttps://forums.commentcamarche.net/forum/affich-31939229-comment-faire-demarrer-avec-un-service-avec-bat

To continue with my example above

I have done

start vmnetdhcp.exe

also this

start C:\Windows\system32\vmnetdhcp.exe


but Windows tells me it can't find it, I must not put a path
0
NetPaggle Posted messages 366 Status Membre 93
 
Check that the path is correct, without errors, and that there are no mistakes in the names. Pay attention to accents.

--
If you have found the answer to your question, feel free to mark the topic as resolved, this could help people facing the same issue :)
0
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   190
 
Here I just checked and the software that shows me the services did not give me the correct name
so I searched in win8.1 and found the correct path

I then launched
start C:\Windows\SysWOW64\vmnetdhcp.exe


But it doesn't work, the dos command is executed properly but the service does not start
0
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   190
 
little bump please thanks
0
dsy73 Posted messages 9003 Registration date   Status Contributeur Last intervention   2 547
 
Hi
you need to retrieve the internal names of the services and then use the command: net start <service name>
For the internal names, check in the services manager.
0
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   190
 
Hi
thank you for the response
so in my case it would be

net start <vmnetdhcp.exe>
0
dsy73 Posted messages 9003 Registration date   Status Contributeur Last intervention   2 547
 
net start VMnetDHCP
0
flexi2202
 
thank you for the help
ok great, so I can put everything in a row one below the other?

it works
0
flexi2202
 
I'm trying with this process
 vmware-authd


the function starts and everything, but the DOS screen goes too fast for me to see, why is the service not starting?
0
dsy73 Posted messages 9003 Registration date   Status Contributeur Last intervention   2 547
 
start the console with elevated privileges (run as administrator) and run the batch from the console (otherwise add pause at the end of the batch)
0
flexi2202
 
Thank you for your help, everything is fine except for one service
which is
VMware NAT Service


where it tells me
to use NET START [service]

which I do, but it doesn't work ]
0
dsy73 Posted messages 9003 Registration date   Status Contributeur Last intervention   2 547
 
Find the internal name of the service in the Windows Services Manager.
0
flexi2202
 
Thank you for the response

but how do I get there please?
0
dsy73 Posted messages 9003 Registration date   Status Contributeur Last intervention   2 547
 
1st link provided by Google : https://support.microsoft.com/en-us/windows?ui=en-US&rs=en-001&ad=US
If the version of Windows does not match, then do a search ;)
0
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   190
 
thank you for the response
yes that's exactly where I went to get the name

and yet he doesn't want it
net start [VMware NAT Service]

here is a screenshot

http://www.hostingpics.net/viewer.php?id=251515ecran1.jpg
0
dsy73 Posted messages 9003 Registration date   Status Contributeur Last intervention   2 547
 
The internal name is in the service properties. The internal name has no spaces. You must not use [] or <>.
0
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   190
 
I just did it but he doesn't want it
I entered this
net start vmnat

http://www.hostingpics.net/viewer.php?id=951049ecran1.jpg

thanks for the replies
0
dsy73 Posted messages 9003 Registration date   Status Contributeur Last intervention   2 547
 
net start "VMware NAT Service"
I was wrong about the spaces.
0
flexi2202 Posted messages 3640 Registration date   Status Membre Last intervention   190
 
Hello
great thanks it works

a big thank you
0