Requirements
1. Copy Folder APPDIR with contents from CD to %ProgramFiles% <----- Main Files
2. Copy Folder System with contents (that includes a folder APPNAME) from CD to %ALLUSERSPROFILE%\Start Menu\Programs <----- Shortcuts
3. Run the app thats now in %ProgramFiles%\APPNAME Application.exe <----- The app is self contained ie. a single file. It only needs to be run from its final location, and itll register to Add/Remove.
4. terminate the app <----- can use taskkill
And thats it.
This is what I have till now
Code: Select all
@ECHO
REM ----- Copying Folders
[color=red]REM ----- No Problems with Copying Anymore[/color]
XCOPY AppDir %ProgramFiles%\[color=yellow]AppDir[/color] /i
XCOPY System\* %ALLUSERSPROFILE%\Start Menu\Programs\[color=yellow]System[/color] /s /i
[color=red]REM ----- No Problems with Copying Anymore[/color]
REM ----- Installing the App
CD %ProgramFiles%\AppDir
App.exe
taskkill /f /IM App.exe
EXIT
Cant seem to spawn an app and then taskkill it as well, from the same script. Same result with notepad too... anybody know why this happens???
Appreciate all the help.
EDIT: Solved with using Start without the /wait
Code: Select all
start notepad.exe
taskkill /f /im notepad.exe
