Launch an executable and let the executable take over

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Computer TechEZ
Posts: 5
Joined: 16 Jun 2010 19:50

Launch an executable and let the executable take over

#1 Post by Computer TechEZ » 12 Jul 2012 13:17

Hey all!

I am trying to launch an executable and then allow the executable to continue on its own accord. I hope I am saying that right. For my test subject I am using VIPRE RESCUE SCANNER which is completely command-line based. When I launch the VIPRERESCUESCANNER.exe it loads up the cmd window and automatically starts scanning without even allowing user input. However If I load up cmd myself and launch

Code: Select all

VIPRERESCUESCANNER.exe /help
I get all the commands for user input and then I can start my scans. I basically want the help menu first and then I scan second. So far I have...

Code: Select all

VIPRERESCUESCANNER.exe /help
pause


Which displays the help menu but then If I press any keyboard stroke the cmd window closes. How do I let the batch file allow user input of the commands from the help menu? I figure it kind of like using the batch command just to start the executable in the right direction and then letting the executable take control from there. So in spaghetti code it would look something like this...

Code: Select all

VIPRERESCUESCANNER.exe /help
allow VIPRERESCUESCANNER.exe to take over from here


Look forward to replies! Thanks!

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Launch an executable and let the executable take over

#2 Post by Ed Dyreen » 12 Jul 2012 13:31

'
Having a hard time comprehending what it is u are asking, something like

Code: Select all

start "" VIPRERESCUESCANNER.exe
maybe :?

Computer TechEZ
Posts: 5
Joined: 16 Jun 2010 19:50

Re: Launch an executable and let the executable take over

#3 Post by Computer TechEZ » 12 Jul 2012 14:24

Thanks for the speed reply! I know I am having a hard time explaining in words what I am trying to do. The code you posted...

Code: Select all

start "" VIPRERESCUESCANNER.exe


starts the virus scanner but when it is started like that VIPRE goes into auto mode and scanns ALL drives and does everything by default automatically. What I am trying to accomplish is launch VIPRE with the help command like so...

Code: Select all

viprerescuescanner.exe /help
pause


and then I would get a window with all the help commands. Then I have full control over what I want to do from here because VIPRE does not kick in and start scanning everything if I add a command like /help. So now that I see the commands I want to type out a command THE SAME COMMAND WINDOW like...

Code: Select all

viprerescuescanner.exe /C


This will allow VIPRE to scan ONLY the C: drive and NOT ALL the drives.

HOWEVER, if I launch the batch file with the code...

Code: Select all

viprerescuescanner.exe /help
pause


I cannot continue with that window because it says "Press any key to exit." I don't want to exit that command window I want to continue using it.

I hope I explained a little better. :)

Squashman
Expert
Posts: 4487
Joined: 23 Dec 2011 13:59

Re: Launch an executable and let the executable take over

#4 Post by Squashman » 12 Jul 2012 14:45

So basically you want to launch a cmd prompt.
Launch the help screen for your utility and then be back at a cmd prompt so that the user can type in a command to Launch your utility.

Code: Select all

cmd /k viprerescuescanner.exe /help

Squashman
Expert
Posts: 4487
Joined: 23 Dec 2011 13:59

Re: Launch an executable and let the executable take over

#5 Post by Squashman » 12 Jul 2012 15:58

Squashman wrote:So basically you want to launch a cmd prompt.
Launch the help screen for your utility and then be back at a cmd prompt so that the user can type in a command to Launch your utility.

Code: Select all

cmd /k viprerescuescanner.exe /help

This works fine on Windows XP but I just tested on Windows 7 and there seems to be a UAC issue.

Computer TechEZ
Posts: 5
Joined: 16 Jun 2010 19:50

Re: Launch an executable and let the executable take over

#6 Post by Computer TechEZ » 12 Jul 2012 21:29

Squashman wrote:So basically you want to launch a cmd prompt.
Launch the help screen for your utility and then be back at a cmd prompt so that the user can type in a command to Launch your utility.

Code: Select all

cmd /k viprerescuescanner.exe /help


You da man Squashman! Who would of thought a simple "/k" would be it. About windows UAC...I turned it off LOOOOONG ago. It's basically the nag screen from hell.

Thanks again!

Post Reply