So last night i just figured you could use pstart and run a batch hidden with this program and it worked.
I used resource hacker to change the icon of ShellExecute to the same icon as the app
used regapp for registry
feel free to make changes to the batch as needed and please tell me what could make it better
just figured that it's a simple easy way to make apps portable
Simple batch i made:
Code: Select all
::comment out or add more as needed
:: To comment out place :: in front of the line
::Backup Registry
cd "%~dp0\Data\backup"
regedit /e Backup1.reg HKEY_LOCAL_MACHINE\SOFTWARE
regedit /e Backup2.reg HKEY_LOCAL_MACHINE\SOFTWARE
regedit /e Backup3.reg HKEY_LOCAL_MACHINE\SOFTWARE
::Backup files
xcopy "Souce" "Destination\Foldername" /E /C /I /H /Y
cd %~dp0
::Copy Files usb To PC
cd "%~dp0\data\settings\Files"
xcopy "Souce" "Destination\Foldername" /E /C /I /H /Y
::apply delete Reg
cd "%~dp0\data\settings"
regedit /s Delete.reg
::Apply settings Registry
Regedit /s Settings1.reg
Regedit /s Settings2.reg
Regedit /s Settings3.reg
::Start and wait
cd "%~dp0\app"
start /wait Appname.exe
::Copy Registry to usb
cd "%~dp0\data"
rmdir /S /Q "settings"
md "settings"
cd settings
regedit /e Settings1.reg HKEY_LOCAL_MACHINE\SOFTWARE
regedit /e Settings2.reg HKEY_LOCAL_MACHINE\SOFTWARE
regedit /e Settings3.reg HKEY_LOCAL_MACHINE\SOFTWARE
::Copy files to usb
cd "location\of\file"
xcopy "Souce" "%~dp0\data\settings\Files\foldername" /E /C /I /H /Y
::apply delete reg
cd "%~dp0\data\settings"
regedit /s Delete.reg
::apply backup reg
cd "%~dp0\data\backup"
regedit /s Backup1.reg
regedit /s Backup2.reg
regedit /s Backup3.reg
::copy backup files
xcopy "Souce" "%~dp0\data\settings\Files\foldername" /E /C /I /H /Y
Exit
Files used:
Pstart:
http://www.pegtop.net/start/
Resource Hacker:
http://www.angusj.com/resourcehacker/
RegFromApp (or any app you prefer):
http://www.nirsoft.net/utils/reg_file_f ... ation.html
ShellExecute:
http://www.optimumx.com/download/#ShellExecute
Folder Layoutincludes a copy of Shellexecute and bat)
http://www.mediafire.com/?ltyzgl2yynn