Use the PortableApps.com Launcher instead: https://portableapps.com/development
It doesn't have the issues you mention and is the preferred (and supported) way for making apps portable. It's what we use.
New: Gopherus (Feb 14, 2023), Platform 24.1 (Feb 13, 2023)
450+ real apps (49GB), 1 billion downloads, Please donate.
Use the PortableApps.com Launcher instead: https://portableapps.com/development
It doesn't have the issues you mention and is the preferred (and supported) way for making apps portable. It's what we use.
Ive just stumbled across this after all these years lol.
I came across a AutoHotKey Script(.ahk) that does basically the same thing as this, but i cant remember where i got it ?
It uses RegShot, Icons from File and Nullsoft Scriptable Install System.
Here it is if its any good and its opensource not like AutoIt.
; Menu,Tray,NoStandard Menu,Tray,Add,E&xit,EXIT InputBox, ApplicationName, Portable Builder for Registered Software, What is the name of the application you wish to make portable?, , 450, 120, , , , , Application if ErrorLevel { Msgbox, 16, TERMINATION, CANCEL was pressed so Portable Builder will terminate ExitApp } IniRead, Absolute, Software\Absolute address.ini, Settings, Absolute, 0 IniRead, AbsoluteAddress, Software\Absolute address.ini, Settings, AbsoluteAddress, C:\Portable %ApplicationName%\Portable Builder Appdata IniRead, ShowRegShotPicture, Software\Absolute address.ini, Settings, ShowRegShotPicture, 1 FileCreateDir, %A_Desktop%\Portable %ApplicationName%\Portable Builder Script FileCreateDir, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files FileAppend, REGEDIT4`r`n`r`n, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\RegInfo.reg FileAppend, REGEDIT4`r`n`r`n, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\RegClean.reg FileDelete, Software\RegShot\regshot.ini FileAppend, ( [Setup] Flag=3 ExtDir=C:\ OutDir=%A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files UseLongRegHead=1 ) , Software\RegShot\regshot.ini If ShowRegShotPicture = 1 { IfNotExist, Software\RegShot\Using Regshot.gif { Msgbox, 262160, Regshot.gif is missing, Essential files are missing - application will terminate ExitApp } Run, Software\RegShot\Using Regshot.gif Sleep 100 } IfNotExist, Software\RegShot\regshot.exe { Msgbox, 262160, RegshotRunner.exe is missing, Essential files are missing - application will terminate ExitApp } popupmfk("Scan and track changes", "Take 1st shot`nInstall and Register`nTake 2nd shot`nCompare`nQuit", 500000, 0, 1) RunWait, Software\RegShot\regshot.exe, Software\RegShot\ popupmfk(0, 0, 0, 0, 0) IfExist, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\~res.txt { FileMove, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\~res.txt, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt } Else { FileSelectFile, RegShotFile, 3, , Where is the exported file from RegShot?, Text Documents (*.txt) if RegShotFile = { Msgbox, 262160, Can not track changes, We need the snapshot to identify what has changed - application will terminate ExitApp } FileCreateDir, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files FileCopy, %RegShotFile%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt } IfNotExist, Software\Portable Builder Icon.ico { Msgbox, 262160, Portable Builder Icon is missing, Essential files are missing - application will terminate ExitApp } popupmfk(" ", "Copying files - Please wait", 500000, "Software\Portable Builder Icon.ico") Sleep 1000 ReadLine := 1 Loop { FileReadLine, Line, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt, %ReadLine% if ErrorLevel break ReadLine := ReadLine + 1 IfInString, Line, Files added Gosub, FilesAdded IfInString, Line, Files [attributes?] modified Gosub, FilesModified IfInString, Line, Folders added Gosub, FoldersAdded } popupmfk("", "", 0, 0) popupmfk("Which application have you installed?", "Find your application`nIt must be within these sub-folders", 500000, 0, 0) FileSelectFile, SelectedFile, 3, %A_Desktop%\Portable %ApplicationName%\Portable Builder Appdata, What is the relative location of the EXE file? It is usually in the Program Files folder., popupmfk(0, 0, 0, 0, 0) if SelectedFile = { Msgbox, 262160, Application file is missing, We need a location to include in the script - application will terminate ExitApp } else StringGetPos, Pos, SelectedFile, Portable Builder Appdata StringLen, Length, SelectedFile StringTrimLeft, AddressEndBit, SelectedFile, %Pos% r = 0 Loop, parse, AddressEndBit, \, { r := r + 1 If r > 2 { DoubleBack = %DoubleBack%..\\ DoubleForward = %DoubleForward%..// SingleBack = %SingleBack%..\ SingleForward = %SingleForward%../ } } IfNotExist, Software\Portable Builder Icon.ico { Msgbox, 262160, Portable Builder Icon is missing, Essential files are missing - application will terminate ExitApp } popupmfk(" ", "Creating registry - Please wait", 500000, "Software\Portable Builder Icon.ico") Sleep 1000 ReadLine := 1 Loop { FileReadLine, Line, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt, %ReadLine% if ErrorLevel break ReadLine := ReadLine + 1 IfInString, Line, Values added Gosub, ValuesAdded IfInString, Line, Keys added Gosub, KeysAdded IfInString, Line, Values modified Gosub, ValuesModified } popupmfk("", "", 0, 0) IfNotExist, Software\Portable Builder Icon.ico { Msgbox, 262160, Portable Builder Icon is missing, Essential files are missing - application will terminate ExitApp } popupmfk(" ", "Creating your script - Please wait", 500000, "Software\Portable Builder Icon.ico") FileAppend, ( ;---Definitions---- !define SNAME "Portable %ApplicationName%" ;----Includes---- !include "Registry.nsh" ;-----Runtime switches---- CRCCheck off AutoCloseWindow True SilentInstall silent WindowIcon off XPSTYLE on ;-----Set basic information----- Name "${SNAME}" Icon "${SNAME}.ico" Caption "${SNAME} Launcher" OutFile "..\${SNAME}.exe" ;-----Version Information------ LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf" VIProductVersion "0.1.0.0" VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Portable %ApplicationName% Launcher" VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© Portable Builder" VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "%ApplicationName%" VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.1" Section "Main" ;-----Saving Local Registration Data------ ) , %A_Desktop%\Portable %ApplicationName%\Portable Builder Script\Portable %ApplicationName%.nsi FileAppend, %ForExtraClean%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Script\Portable %ApplicationName%.nsi FileAppend, ( Sleep 500 ;-----Importing Regkeys------ ${registry::RestoreKey} "$EXEDIR\Portable Builder Reg Files\Settings.reg" $R0 Sleep 300 ${registry::RestoreKey} "$EXEDIR\Portable Builder Reg Files\RegInfo.reg" $R0 Sleep 200 ${registry::RestoreKey} "$EXEDIR\Portable Builder Reg Files\DirSettings.reg" $R0 Sleep 200 ;-----Launching %ApplicationName%------ ExecWait "$EXEDIR\%AddressEndBit%" ;-----Cleaning up------ ${registry::RestoreKey} "$EXEDIR\Portable Builder Reg Files\RegClean.reg" $R0 DeleteRegKey /ifempty HKEY_CURRENT_USER "Software\%ApplicationName%" ) , %A_Desktop%\Portable %ApplicationName%\Portable Builder Script\Portable %ApplicationName%.nsi FileAppend, %KeysAdded%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Script\Portable %ApplicationName%.nsi FileAppend, ( Sleep 500 ;-----RestoringLocal Registration Data------ ${registry::RestoreKey} "$EXEDIR\Portable Builder Reg Files\LocalRegInfo.reg" $R0 Sleep 800 Delete "$EXEDIR\Portable Builder Reg Files\LocalRegInfo.reg" SectionEnd ) , %A_Desktop%\Portable %ApplicationName%\Portable Builder Script\Portable %ApplicationName%.nsi IfNotExist, Software\Icons from File\extraico.exe { Msgbox, 262160, Icons from File is missing, Essential files are missing - application will terminate ExitApp } RunWait, Software\Icons from File\extraico.exe -export -closewhendone -iconindex=1 -desttype=ICO "%SelectedFile%" "%A_Desktop%\Portable %ApplicationName%\Portable Builder Script\Portable %ApplicationName%.ico" IfNotExist, Software\NSIS\makensis.exe { Msgbox, 262160, Makensis.exe is missing, Essential files are missing - application will terminate ExitApp } RunWait, Software\NSIS\makensis.exe "%A_Desktop%\Portable %ApplicationName%\Portable Builder Script\Portable %ApplicationName%.nsi" popupmfk(0, 0, 0, 0, 0) FileDelete, Software\RegShot\regshot.ini FileDelete, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt FileRemoveDir, %A_Desktop%\Portable %ApplicationName%\Portable Builder Script, 1 MsgBox Portable %ApplicationName% has been created - click OK to open the folder Run, %A_Desktop%\Portable %ApplicationName% ExitApp ValuesAdded: Loop { ReadLine := ReadLine + 1 FileReadLine, Line, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt, %ReadLine% StringReplace, Line, Line, C:\\, %DoubleBack%, All StringReplace, Line, Line, C://, %DoubleForward%, All StringReplace, Line, Line, C:\, %SingleBack%, All StringReplace, Line, Line, C?\, %SingleBack%, All StringReplace, Line, Line, C:/, %SingleForward%, All StringGetPos, PosOfColon, Line, :, L StringGetPos, PosOfLASTColon, Line, :, R StringLen, Length, Line MoveRightFrom := Length - PosOfColon StringGetPos, PosOfSlash, Line, \, R, %MoveRightFrom% StringMid, StartOfKey, Line, %PosOfSlash%, , L StartOfMiddle := PosOfSlash + 2 EndOfMiddle := PosOfLASTColon - StartOfMiddle + 1 StringMid, MiddleOfKey, Line, %StartOfMiddle%, %EndOfMiddle% EndOfEnd := PosOfLASTColon + 3 StringMid, EndOfKey, Line, %EndOfEnd%, If Line = Return IfInString, Line, --------------------- Return StringRight, IsThisAQuote, EndOfKey, 1 If IsThisAQuote " { IfNotInString, EndOfKey, 0x { Comma = , StringReplace, EndOfKey, EndOfKey, %A_SPACE%, %Comma%, All EndOfKey = hex:%EndOfKey% } } IfInString, EndOfKey, 0x { StringReplace, EndOfKey, EndOfKey, 0x, dword: StringReplace, EndOfKey, EndOfKey, ", ,All } If MiddleOfKey = MiddleOfKey = @ Else MiddleOfKey = "%MiddleOfKey%" If Absolute = 1 { StringReplace, MiddleOfKey, MiddleOfKey, %DoubleBack%, %AbsoluteAddress%\\, All StringReplace, MiddleOfKey, MiddleOfKey, %DoubleForward%, %AbsoluteAddress%//, All StringReplace, MiddleOfKey, MiddleOfKey, %SingleBack%, %AbsoluteAddress%\, All StringReplace, MiddleOfKey, MiddleOfKey, %SingleBack%, %AbsoluteAddress%/, All StringReplace, EndOfKey, EndOfKey, %DoubleBack%, %AbsoluteAddress%\\, All StringReplace, EndOfKey, EndOfKey, %DoubleForward%, %AbsoluteAddress%//, All StringReplace, EndOfKey, EndOfKey, %SingleBack%, %AbsoluteAddress%\, All StringReplace, EndOfKey, EndOfKey, %SingleBack%, %AbsoluteAddress%/, All } FileAppend, `r`n[%StartOfKey%]`r`n%MiddleOfKey%=%EndOfKey%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\RegInfo.reg FileAppend, `r`n[-%StartOfKey%]`r`n%MiddleOfKey%=%EndOfKey%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\RegClean.reg ForExtraClean = %ForExtraClean%`r`n${registry::SaveKey} "%StartOfKey%" "$EXEDIR\Portable Builder Reg Files\LocalRegInfo.reg" "/G=1 /A=1" $R0 } Return KeysAdded: KeysAdded = Loop { ReadLine := ReadLine + 1 FileReadLine, Line, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt, %ReadLine% StringReplace, Line, Line, HKEY_CLASSES_ROOT\, DeleteRegKey /ifempty HKEY_CLASSES_ROOT " StringReplace, Line, Line, HKEY_CURRENT_USER\, DeleteRegKey /ifempty HKEY_CURRENT_USER " StringReplace, Line, Line, HKEY_LOCAL_MACHINE\, DeleteRegKey /ifempty HKEY_LOCAL_MACHINE " StringReplace, Line, Line, HKEY_USERS\, DeleteRegKey /ifempty HKEY_USERS " StringReplace, Line, Line, HKEY_CURRENT_CONFIG\, DeleteRegKey /ifempty HKEY_CURRENT_CONFIG " If Line = Return KeysAdded = %Line%"`n%KeysAdded% } Return ValuesModified: Loop { ReadLine := ReadLine + 2 FileReadLine, Line, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt, %ReadLine% StringReplace, Line, Line, C:\\, %DoubleBack%, All StringReplace, Line, Line, C://, %DoubleForward%, All StringReplace, Line, Line, C:\, %SingleBack%, All StringReplace, Line, Line, C?\, %SingleBack%, All StringReplace, Line, Line, C:/, %SingleForward%, All StringGetPos, PosOfColon, Line, :, L StringGetPos, PosOfLASTColon, Line, :, R StringLen, Length, Line MoveRightFrom := Length - PosOfColon StringGetPos, PosOfSlash, Line, \, R, %MoveRightFrom% StringMid, StartOfKey, Line, %PosOfSlash%, , L StartOfMiddle := PosOfSlash + 2 EndOfMiddle := PosOfLASTColon - StartOfMiddle + 1 StringMid, MiddleOfKey, Line, %StartOfMiddle%, %EndOfMiddle% EndOfEnd := PosOfLASTColon + 3 StringMid, EndOfKey, Line, %EndOfEnd%, If Line = Return IfInString, Line, --------------------- Return StringRight, IsThisAQuote, EndOfKey, 1 If IsThisAQuote " { IfNotInString, EndOfKey, 0x { Comma = , StringReplace, EndOfKey, EndOfKey, %A_SPACE%, %Comma%, All EndOfKey = hex:%EndOfKey% } } IfInString, EndOfKey, 0x { StringReplace, EndOfKey, EndOfKey, 0x, dword: StringReplace, EndOfKey, EndOfKey, ", ,All } If MiddleOfKey = MiddleOfKey = @ Else MiddleOfKey = "%MiddleOfKey%" If Absolute = 1 { StringReplace, MiddleOfKey, MiddleOfKey, %DoubleBack%, %AbsoluteAddress%\\, All StringReplace, MiddleOfKey, MiddleOfKey, %DoubleForward%, %AbsoluteAddress%//, All StringReplace, MiddleOfKey, MiddleOfKey, %SingleBack%, %AbsoluteAddress%\, All StringReplace, MiddleOfKey, MiddleOfKey, %SingleBack%, %AbsoluteAddress%/, All StringReplace, EndOfKey, EndOfKey, %DoubleBack%, %AbsoluteAddress%\\, All StringReplace, EndOfKey, EndOfKey, %DoubleForward%, %AbsoluteAddress%//, All StringReplace, EndOfKey, EndOfKey, %SingleBack%, %AbsoluteAddress%\, All StringReplace, EndOfKey, EndOfKey, %SingleBack%, %AbsoluteAddress%/, All } FileAppend, `r`n[%StartOfKey%]`r`n%MiddleOfKey%=%EndOfKey%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\RegInfo.reg FileAppend, `r`n[-%StartOfKey%]`r`n%MiddleOfKey%=%EndOfKey%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\RegClean.reg ForExtraClean = %ForExtraClean%`r`n${registry::SaveKey} "%StartOfKey%" "$EXEDIR\Portable Builder Reg Files\LocalRegInfo.reg" "/G=1 /A=1" $R0 } Return FilesAdded: FilesAdded = Loop { ReadLine := ReadLine + 1 FileReadLine, Line, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt, %ReadLine% if ErrorLevel break If Line = Return FilesAdded = %FilesAdded%`n%Line% Gosub, CopyFilesOrFolders } Return FilesModified: FilesModified = Loop { ReadLine := ReadLine + 1 FileReadLine, Line, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt, %ReadLine% if ErrorLevel break If Line = Return FilesModified = %FilesModified%`n%Line% Gosub, CopyFilesOrFolders } Return FoldersAdded: FoldersAdded = Loop { ReadLine := ReadLine + 1 FileReadLine, Line, %A_Desktop%\Portable %ApplicationName%\Portable Builder Reg Files\%ApplicationName% from RegShot.txt, %ReadLine% if ErrorLevel break If Line = Return FoldersAdded = %FoldersAdded%`n%Line% Gosub, CopyFilesOrFolders } Return CopyFilesOrFolders: AbsolutePosition = %Line% StringRight, CheckDot2, AbsolutePosition, 3 StringTrimRight, IsItDot2, CheckDot2, 2 If IsItDot2 = . { Gosub, WinC Return } StringRight, CheckDot3, AbsolutePosition, 4 StringTrimRight, IsItDot3, CheckDot3, 3 If IsItDot3 = . { Gosub, WinC Return } Gosub, WinF return WinF: StringTrimLeft, RelativePosition, AbsolutePosition, 3 FileCopyDir, %AbsolutePosition%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Appdata\%RelativePosition% Return WinC: StringTrimLeft, RelativePosition, AbsolutePosition, 3 { StringLen, pos_prev, AbsolutePosition StringGetPos, pos, AbsolutePosition, \, R1 length := pos_prev - pos StringTrimRight, FolderPosition1, AbsolutePosition, %length% StringTrimLeft, FolderPosition2, FolderPosition1, 3 } FileCreateDir, %A_Desktop%\Portable %ApplicationName%\Portable Builder Appdata\%FolderPosition2% FileCopy, %AbsolutePosition%, %A_Desktop%\Portable %ApplicationName%\Portable Builder Appdata\%RelativePosition% Return popupmfk(popTitle=0, popMsg=0, popTime=3000, icoPath=0, hasGoAway=0) { kInstanceGuiFcnPopupmfk = instance_gui_fcn_popupmfk_1 kTitleTypeFace = Tahoma kTitleStyle = s8 w700 c000000 kMessageTypeFace = Tahoma kMessageStyle = s8 w400 c000000 DetectHiddenText, On IfWinExist, ahk_class AutoHotkeyGUI, %kInstanceGuiFcnPopupmfk% { gosub lbl_fcn_popupmfk_DONE WinKill, ahk_class AutoHotkeyGUI, %kInstanceGuiFcnPopupmfk% } if popMsg { Gui, Add, Text, hidden, %kInstanceGuiFcnPopupmfk% if popTitle { if icoPath { Gui, Add, Picture, xm ym section glbl_fcn_popupmfk_DONE ,%icoPath% Gui, font, %kTitleStyle%, %kTitleTypeFace% Gui, Add, Text, ys glbl_fcn_popupmfk_DONE , %popTitle% } else { Gui, font, %kTitleStyle%, %kTitleTypeFace% Gui, Add, Text, xm ym section glbl_fcn_popupmfk_DONE , %popTitle% } Gui, font, s8 %kMessageStyle%, %kMessageTypeFace% Gui, Add, Text, xm glbl_fcn_popupmfk_DONE , %popMsg% } else { Gui, font, %kMessageStyle%, %kMessageTypeFace% if icoPath { Gui, Add, Picture, xm ym section glbl_fcn_popupmfk_DONE ,%icoPath% Gui, Add, Text, ys glbl_fcn_popupmfk_DONE, %popMsg% } else Gui, Add, Text, xm ym glbl_fcn_popupmfk_DONE, %popMsg% } if hasGoAway { Gui, font, s6 w450 Gui, Add, Button, ym glbl_fcn_popupmfk_DONE , X } Gui, font Gui, +AlwaysOnTop +toolwindow -resize -caption +border Gui, Color, ffffdd SysGet, popup_monWorkArea, MonitorWorkArea Gui, Show, x%popup_monWorkAreaRight% y%popup_monWorkAreaBottom% NoActivate WinWait , ahk_class AutoHotkeyGUI, %kInstanceGuiFcnPopupmfk% WinGetPos ,,, GuiWidth, GuiHeight, ahk_class AutoHotkeyGUI, %kInstanceGuiFcnPopupmfk% popup_x := popup_monWorkAreaRight-GuiWidth popup_y := popup_monWorkAreaBottom-GuiHeight Gui, Show, x%popup_x% y%popup_y% NoActivate WinWait , ahk_class AutoHotkeyGUI, %kInstanceGuiFcnPopupmfk% SetTimer, lbl_fcn_popupmfk_DONE, %popTime% } return lbl_fcn_popupmfk_DONE: SetTimer, lbl_fcn_popupmfk_DONE, Off Gui, Destroy return } EXIT: ExitApp
That script above is for Portable Builder for Registered Software or PBRS for short. There was 2 versions kicking about 1 full of unwanted crap and the other a clean version. Funny enough the original download from 2007/08 for the clean version still works.
http://rapidshare.com/files/157407239/PBRS_v1.0_SELF_EXTRACTOR.exe
All Rapidshare links have become unavailable.
Could someone may please refer the new PAC download location.
Thanks
Vikram
How about: use PAL?
check it all out in the development section
Hi,
Just two quick questions:
* Where I can download this useful tool? RS links are down.
*Is your "Portable App Creator" Open Source? If so, where can I to download the source code or your AutoIT scripts to learn it how it works?
Cheers,
Benny.
This project is outdated and I believe it has been abandoned. The developers here have been using the PortableApps.com Launcher for development.