How to start a service with bat

Solved
flexi2202 Posted messages 3640 Registration date   Status Member Last intervention   -  
flexi2202 Posted messages 3640 Registration date   Status Member 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 answers

  1. NetPaggle Posted messages 366 Status Member 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
  2. NetPaggle Posted messages 366 Status Member 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
  3. flexi2202 Posted messages 3640 Registration date   Status Member 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
  4. flexi2202 Posted messages 3640 Registration date   Status Member Last intervention   190
     
    little bump please thanks
    0
  5. dsy73 Posted messages 9003 Registration date   Status Contributor 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
  6. flexi2202 Posted messages 3640 Registration date   Status Member Last intervention   190
     
    Hi
    thank you for the response
    so in my case it would be

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

    it works
    0
  8. 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
    1. dsy73 Posted messages 9003 Registration date   Status Contributor 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
  9. 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
    1. dsy73 Posted messages 9003 Registration date   Status Contributor Last intervention   2 547
       
      Find the internal name of the service in the Windows Services Manager.
      0
  10. flexi2202 Posted messages 3640 Registration date   Status Member 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
    1. dsy73 Posted messages 9003 Registration date   Status Contributor Last intervention   2 547
       
      The internal name is in the service properties. The internal name has no spaces. You must not use [] or <>.
      0
  11. flexi2202 Posted messages 3640 Registration date   Status Member 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
    1. dsy73 Posted messages 9003 Registration date   Status Contributor Last intervention   2 547
       
      net start "VMware NAT Service"
      I was wrong about the spaces.
      0
  12. flexi2202 Posted messages 3640 Registration date   Status Member Last intervention   190
     
    Hello
    great thanks it works

    a big thank you
    0