How to start service and launch *.exe from desktop shortcut

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

How to start service and launch *.exe from desktop shortcut

#1 Post by alan_b » 18 Sep 2011 10:45

This is a DOS command that works for me

Code: Select all

net start VMUSBArbService & CD /D E:\VMWare & start E:\VMWare\vmplayer.exe

I can create two entities,
a *.BAT script for this somewhere plus a short-cut on the desktop.

I hate needless proliferation of entities and prefer to have just the one.
I envisage placing the BAT script on the desktop ready for a double click,
unless you can suggest a more elegant solution.

Background.
By installation default the service VMUSBArbService is Manual and I refuse to have it autostart on the many days VMPlayer is not launched.
Unfortunately VMPlayer is unable to start its own service so USB devices cannot be accessed.
Therefore I now need to start the service before starting VMPlayer.

Regards
Alan

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: How to start service and launch *.exe from desktop short

#2 Post by aGerman » 18 Sep 2011 11:17

Hi Alan,

try the following:

Create a shortcut with
-Target:
%comspec% /c "net start VMUSBArbService & CD /D E:\VMWare & start E:\VMWare\vmplayer.exe"
-Start in:
%systemroot%\system32

Regards
aGerman

alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

Re: How to start service and launch *.exe from desktop short

#3 Post by alan_b » 18 Sep 2011 12:40

Many thanks.
Solution works perfectly

Regards
Alan

Post Reply