This is an important step that determines the stable operation of the portable software, because if it lacks the required data, it will report an error when the program is not found or runs unstable.
Usually the program will be installed entirely on a certain folder (the path to the folder will be displayed during the installation process, or you can right-click the program's shortcut on the Desktop, select Properties , in The Shortcut tab clicks the Find Target button to find the folder containing the program). You should copy the entire file in this folder to another folder (eg saved in a folder named Resource ).
Some software, when installed, will export some files (usually * .DLL, * .OCX .) to the system folder (for example, Windows or System32 folder), so you need to copy these files to the same folder. item containing software.
Some software lists the files that are installed on the computer, the list is in a file named Uninstall.lst , you should open it with Notepad to find the data to be exported to the system directory (if any) to Add it fully (if you are not familiar with this, you can add them after packing the portable file). You should delete miscellaneous files (such as * .TXT files, Readme files . located in the software directory) and Uninstall.EXE files or similar files for a lighter folder size.
3. Get the configuration information from the Registry
For some software (like Winamp), most of the parameters are written to the configuration file in the * .INI file, it is not necessary to get information from the Registry. However, today's software often writes configuration parameters and activation code into the Registry, so getting the Registry parameters helps the program to operate safely and achieve the highest performance. Please pay attention to the software name (eg Photoshop) and the name of the issuer of the software (eg Adobe) to make searching easier.
Next, go to Start > Run type regedit and click OK to open the Registry Editor. Find the Software key of both HKEY_CURRENT_USER (HKCU) and HKEY_LOCAL_MACHINE (HKLM) branches, then find the organization name (here Adobe) and browse to the key containing the software name (Photoshop) and right click on it, select Export . The program will let you save the Registry parameters as * .REG files, save them in the same folder as the saved software (for example, HKCU.REG and HKLM.REG).
4. Edit the data taken from the Registry
With saved REG files, open them with Notepad, change the first line (Windows Registry Editor Version 5.00) to REGEDIT4 so that parameters in this REG file can be imported on the Registry of older Windows versions. You should also find the lines that contain the directory path and delete them. Then Save again.
5. Conduct software packaging
Select all files in the original Resource folder (including REG files), right-click them and select Add to archive (of WinRAR) in the right-click menu. A dialog box called Archive name and parameters appears, select the items as shown in the picture, then switch to the Advanced tab, select SFX options .
6. Customized in SFX
In the Advanced SFX options dialog box, in the General tab, in the Run after extraction box, enter the name of the main executable file (for example, Photoshop.exe ). Switch to the Mode tab, choose Unpack to temporary folder in the Temporary mode frame, in the Silent Mode frame, select Hide start dialog or Silent all , and Overwrite mode should choose Overwrite all files .
You can insert images (93x302px bitmap) and your own icon in the Text and icon tab. Click OK when done to return to the previous dialog. Switch to the Comment tab, here you need to insert it on the line with the Setup two other lines:
Setup = Regedit.exe / s HKLU.REG
Setup = Regedit.exe / s HKLM.REG
This helps to write parameters to the registry before running the main program. Now everything is done, click OK to WinRAR to package the software for you.
7. Test and test on another device
Before testing the portable software, you should remove the installed software to create the portable. Double-click the EXE file that WinRAR extracted. If the software runs, it looks like you're 90% successful.
You should copy this portable file to another computer that does not install the software to test compatibility. If another computer reports a missing file, look for the files you need to install separately to add it to the portable file. If you report a number of other errors, the reason may be that the machine has not installed some of the extra components that the program requires (such as .Net FrameWork, Flash Player or Java Runtime Environment .).
8. Search for additional files
If there is an error missing the file above, after collecting enough files to add, right-click on the portable file, select Open with WinRAR . Select additional files and drag to WinRAR window, select OK and wait for WinRAR to add data. To be sure, if additional files are in the form of * .DLL or * .OCX, click on the comment button, insert it above the lines of the form:
Setup = Regsvr32.exe / s ten_file.dll
Setup = Regsvr32.exe / s ten_file.ocx
Where ten_file.dll and ten_file.ocx are additional files. Done, click OK and close the WinRAR window. Then run the portable program again. If the same error message continues, you should add it until the error is gone. Here, you have completed 100% of the creation work.
A few notes for you:
- It is recommended to choose small software, simple structure to make portable because massive software if done in this way will be easy to error and start up quite slowly because of waiting for WinRAR to extract all data into temporary folder.
- The portable software in this way has the advantage of creating a single executable file, high compatibility, simple operation, but there are disadvantages that the information in the previous session will be erased if close the program (because WinRAR deletes it in the temporary folder).
- You can use an editor like ResHack or Restorator to edit the EXE file exported by WinRAR, make your Portable application have a unique feature, make your own mark (like inserting your logo term).