This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Executing a Batch file
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2009
03:35 AM
Executing a Batch file
Hi All,
I have a batch file which contents a pause command at the end of it. I used LauchAppAndWait to execute it but the batch just stays and does not close. I do know it's due to the pause command within the bacth file.
Is there any other command to launch the batch file and close on its own.
Thanks & Regards
Girish Katti
I have a batch file which contents a pause command at the end of it. I used LauchAppAndWait to execute it but the batch just stays and does not close. I do know it's due to the pause command within the bacth file.
Is there any other command to launch the batch file and close on its own.
Thanks & Regards
Girish Katti
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2009
05:06 AM
If you have a pause in batch file, it will wait for user input in all the cases. Even if its called from LauchAPP. Better would be is to remove it.
Other workaround would be to call lauch app with window status hidden. Now CMD will be running and will not be shown and once the installer is finished doing his work and exe goes down, even the cmd will go down.
Other workaround would be to call lauch app with window status hidden. Now CMD will be running and will not be shown and once the installer is finished doing his work and exe goes down, even the cmd will go down.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2009
06:16 AM
Thanks for the reply.
The installer will not continue untill the user closes the batch. I have 4 more batch files to be executed. I do know removing the pause command would work.
Any other work around to be done.
Thanks & Regards
Girish Katti
The installer will not continue untill the user closes the batch. I have 4 more batch files to be executed. I do know removing the pause command would work.
Any other work around to be done.
Thanks & Regards
Girish Katti
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2009
11:39 AM
You could use a batch wrapper. There is the "start" command that can be used for Windows machines.
Example:
Create a test1.bat file. Inside that batch file put:
-----------
@echo off
cls
start C:\test2.bat
-----------
Now create a test2.bat and put this inside it
-----------
@echo off
cls
echo.test 2 here..
pause
-----------
Test1.bat will execute Test2.bat without waiting and exit allowing the installer to continue.
Hope that helps.
Example:
Create a test1.bat file. Inside that batch file put:
-----------
@echo off
cls
start C:\test2.bat
-----------
Now create a test2.bat and put this inside it
-----------
@echo off
cls
echo.test 2 here..
pause
-----------
Test1.bat will execute Test2.bat without waiting and exit allowing the installer to continue.
Hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 19, 2009
02:09 AM
Hi,
Thanks for the reply.
I did try executing the example as posted.
When you executed the test1.bat, test2.bat execute's but wait for user to close the it.
Is there any other workround where we could close the batch having a pause.
I could remove the pause but I have been instructed to not to edit the source files.
any workaround!!
Thanks & Regards
Girish Katti
Thanks for the reply.
I did try executing the example as posted.
When you executed the test1.bat, test2.bat execute's but wait for user to close the it.
Is there any other workround where we could close the batch having a pause.
I could remove the pause but I have been instructed to not to edit the source files.
any workaround!!
Thanks & Regards
Girish Katti
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 19, 2009
09:34 AM
You could try:
nHwnd = FindWindow ("NotePad", "");
if (nHwnd != NULL) then
SendMessage (nHwnd, WM_SYSCOMMAND, SC_CLOSE, 0);
endif;
nHwnd = FindWindow ("NotePad", "");
if (nHwnd != NULL) then
SendMessage (nHwnd, WM_SYSCOMMAND, SC_CLOSE, 0);
endif;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 22, 2009
07:11 AM
hi,
Is it possible to send Enter Key Stroke message to the batch file having a pause.
I find the onlt difficulty when to get the enter key stroke to be passed in.
The way we do in Vb script
WshShell.SendKeys "{ENTER}"
Can we do the same using IS2009.
Is it possible to send Enter Key Stroke message to the batch file having a pause.
I find the onlt difficulty when to get the enter key stroke to be passed in.
The way we do in Vb script
WshShell.SendKeys "{ENTER}"
Can we do the same using IS2009.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2009
01:03 AM
Hi,
How can I get the handle for a command prompt window using FindWindow option.
I am using hWnd = FindWindow("cmd","");
This always returns 0.
Thanks & Regards
Girish Katti
How can I get the handle for a command prompt window using FindWindow option.
I am using hWnd = FindWindow("cmd","");
This always returns 0.
Thanks & Regards
Girish Katti