Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
guilv14
- Posts: 2
- Joined: 13 Dec 2012 11:17
#1
Post
by guilv14 » 13 Dec 2012 11:27
Hi guys, I am new in here and I am wondering if it is possible to launch a program after closing another.
I'll explain: Where I work, I have a problem of compatibility with VLC and SmartboardInk, so I have a script that taskkill SmartInk.exe and then launch VLC (to play the movie). I would like to re-open SmartInk.exe when VLC is getting close.
Here's my script:
Code: Select all
@echo off
echo Deleting applications needed.
echo .
echo .
echo .
taskkill /f /im SMARTInk.exe
echo .
echo .
echo .
echo VLC will be launched.
echo .
echo .
IF %PROCESSOR_ARCHITECTURE%==x86 (goto x86) else (goto amd64)
:x86
"C:\Program Files\VideoLAN\VLC\vlc.exe"
goto END
:amd64
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
goto END
:END
So, is it possible to re-launch SmartInk.exe when I close VLC?
Thanks alot,
William.
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#2
Post
by foxidrive » 13 Dec 2012 12:58
Maybe something like this will work: it will leave an extra msdos window open until smartink runs.
Code: Select all
:x86
start /w "" "C:\Program Files\VideoLAN\VLC\vlc.exe"
start "" c:\location\smartink.exe"
goto END
:amd64
start /w "" "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
start "" c:\location\smartink.exe"
goto END
:END
-
guilv14
- Posts: 2
- Joined: 13 Dec 2012 11:17
#3
Post
by guilv14 » 13 Dec 2012 14:27
Thanks you rock!
William.