Running Multiple files at a time in batch.

Jacob Keese

New Member
Joined
Mar 15, 2014
Messages
1
Hello.

This is my first time posting here so I am sorry if I am not posting in the correct spot.

I am trying to write a batch file. I have a folder with 333 Hotfix Msu Updates in it. Currently I have a command that will check the folder in a loop and update every computer with those hotfixes. What i want to do is while the system is updating I want to run another file simultaneously iexplore -k. Which will display a webpage in kiosk mode while the computer is updating, currently I use the | in command but the problem is this command runs when the computer shuts down and when the hotfixes are done the iexplore -k command won't terminate and the computer won't shutdown. I have already tried using the start command and adding a taskkill command at then end but it still won't work.

Any ideas?
 


Solution
It's great that you're working on automating updates and displaying a webpage simultaneously on your computers. To address your issue with the iexplore command not terminating after the hotfix updates finish, you can modify your batch script to handle this scenario efficiently.

Here's a revised approach for your batch file:

1. Separate Running iexplore Command: Run the iexplore -k command separately without chaining it using | to the hotfix installation command.

2. Use START Command: Start the iexplore -k command as a separate process so that it doesn't prevent the shutdown when the script finishes.

3. Wait for Processes to Complete: After running both commands, wait for all processes to...
It's great that you're working on automating updates and displaying a webpage simultaneously on your computers. To address your issue with the iexplore command not terminating after the hotfix updates finish, you can modify your batch script to handle this scenario efficiently.

Here's a revised approach for your batch file:

1. Separate Running iexplore Command: Run the iexplore -k command separately without chaining it using | to the hotfix installation command.

2. Use START Command: Start the iexplore -k command as a separate process so that it doesn't prevent the shutdown when the script finishes.

3. Wait for Processes to Complete: After running both commands, wait for all processes to complete before shutting down the computer.

Here is an example batch script structure that you can use:

Code:
@echo off
echo Updating the computer with Hotfix MSU Updates...

REM Command to update computers with Hotfix MSU Updates
REM Replace the following line with your actual update command
REM Example: update_computer_hotfixes.bat

:: Start the iexplore command in kiosk mode in a separate window
start "" iexplore -k "http://yourwebpage.com"

:: Wait for some time to allow the processes to run (adjust timing as needed)
timeout /t 60 /nobreak

:: Taskkill the iexplore process after the specified timeout
taskkill /im iexplore.exe /f

echo All tasks completed. Shutting down the computer...
shutdown /s /f /t 10

In this script:
  • The iexplore command is started separately using the start command to run it in a new window.
  • After waiting for a specified time (adjust the timeout /t value), the script forcefully terminates the iexplore process using taskkill.
  • Finally, the script initiates the shutdown command after all tasks are completed.

Remember to replace update_computer_hotfixes.bat with the actual command that updates the computers with the hotfixes.

Adjust the timings and commands based on your specific requirements. This revised structure should help ensure that the iexplore process terminates correctly when the updates finish, allowing the computer to shut down as intended. Let me know if you need further assistance!
 


Solution
Back
Top