Something like this (in AutoIt)
Code:
; Name of application executable
$AppName = "BridgeApp.exe"
; Name of temp folder to be created under %TEMP%
$AppTempDirName = "BridgeTemp"
; Path to save app data to/from
$AppDataPath = "H:\BridgeData"
; Construct path to temp folder
$AppTempFolder = @TempDir & "\" & $AppTempDirName
; Check for and delete and existing temp folder
If FileExists($AppTempFolder) then DirRemove($AppTempFolder, 1)
; Copy the app into the temp folder
FileCopy(@ScriptDir & "\" & $AppName, $AppTempFolder, 1 + 8)
; Check for and copy down any application data
If FileExists($AppDataPath) then FileCopy($AppDataPath & "\*.*", $AppTempFolder, 1)
; Run the app and wait for it to exit
RunWait($AppTempFolder & "\" & $AppName, $AppTempFolder)
; Delete the app
FileDelete($AppTempFolder & "\" & $AppName)
; Copy app data back to the data path
FileCopy($AppTempFolder & "\*.*", $AppDataPath, 1 + 8)