Page 1 of 1

Launch an executable and let the executable take over

Posted: 12 Jul 2012 13:17
by Computer TechEZ
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!

Re: Launch an executable and let the executable take over

Posted: 12 Jul 2012 13:31
by Ed Dyreen
'
Having a hard time comprehending what it is u are asking, something like

Code: Select all

start "" VIPRERESCUESCANNER.exe
maybe :?

Re: Launch an executable and let the executable take over

Posted: 12 Jul 2012 14:24
by Computer TechEZ
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. :)

Re: Launch an executable and let the executable take over

Posted: 12 Jul 2012 14:45
by Squashman
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

Re: Launch an executable and let the executable take over

Posted: 12 Jul 2012 15:58
by Squashman
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.

Re: Launch an executable and let the executable take over

Posted: 12 Jul 2012 21:29
by Computer TechEZ
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!