could somebody double check me on aome autoit script?
Posted: Tue Apr 26, 2011 10:37 am
Just wondering if somebody could look over my script for making MyPaint portable.
The folder layout can be found here:
http://www.mediafire.com/?xsf2ubd223cfeus
which also includes the program and full script.
The program fully works, I just wanted to make sure I didn't miss anything.
The folder layout can be found here:
http://www.mediafire.com/?xsf2ubd223cfeus
which also includes the program and full script.
The program fully works, I just wanted to make sure I didn't miss anything.
Code: Select all
;If Running Quit
If ProcessExists("Mypaint.exe") Then
MsgBox(0, "Warning", "Mypaint is already running!")
Else
;Splash Screen
SPLASHIMAGEON("MyPaint Portable",@ScriptDir &"\app\info\splash.jpg",600,300 )
SLEEP(0x05DC)
SPLASHOFF()
;Backup Files
FileCopy(@userprofiledir &"\.recently-used.xbel", @ScriptDir &"\data\backup\files", 1)
DirMove(@userprofiledir &"\Local Settings\Application Data\MyPaint", @userprofiledir &"\Local Settings\Application Data\MyPaint1")
;Copy Settings Files
FileCopy(@ScriptDir &"\data\settings\files", @userprofiledir &"\.recently-used.xbel", 1)
DirMove(@ScriptDir &"\data\settings\files\MyPaint", @userprofiledir &"\Local Settings\Application Data\MyPaint")
;Run the App
RunWait ( @ScriptDir &"\app\app\mypaint.exe" )
;Delete Settings
DirRemove (@ScriptDir &"\data\settings", 1 )
DirCreate (@ScriptDir &"\data\Settings")
DirCreate (@ScriptDir &"\data\Settings\Files")
DirCreate (@ScriptDir &"\data\Settings\Reg")
;Backup Settings Files
FileCopy(@userprofiledir &"\.recently-used.xbel", @ScriptDir &"\data\settings\files", 1)
DirMove(@userprofiledir &"\Local Settings\Application Data\MyPaint", @ScriptDir &"\data\settings\files\MyPaint")
;Apply Delete Reg
FileDelete ( @userprofiledir &"\.recently-used.xbel" )
;Copy Backup Files
FileCopy(@ScriptDir &"\data\backup\files", @userprofiledir &"\.recently-used.xbel", 1)
DirMove(@userprofiledir &"\Local Settings\Application Data\MyPaint1", @userprofiledir &"\Local Settings\Application Data\MyPaint")
;Delete Backup
DirRemove (@ScriptDir &"\data\Backup", 1 )
DirCreate (@ScriptDir &"\data\Backup")
DirCreate (@ScriptDir &"\data\Backup\Files")
DirCreate (@ScriptDir &"\data\Backup\Reg")
EndIf