1. Download and install thinstall vs 3.2 trial at http://www.thinstall.com/products/virtuali...on_suite_dl.php (must signup first)
2. Download nLruntimeR3.exe at nliteos.com
3. I presume you already have nLite 1.4 beta
4. After you setup Thinstall VS go to c:\program files\Thinstall.VS create folder named Captures and inside create folder named 'nLite'
5. In nLite folder create following folders:
- %ProgramFilesDir%
- %SystemRoot%
- %SystemRoot%\winsxs
- %SystemRoot%\winsxs\Manifests
- %SystemRoot%\winsxs\Policies
- %SystemSystem%
6. Install nLruntimeR3.exe in your nLite-1.4.beta and move nLite-1.4.beta folder to %ProgramFilesDir%.
Note that .net2 should not be installed otherwise use universal extractor to extract nLruntimeR3.
7. nLruntimeR3 installed gdiplus.dll and mscoree.dll to system32 folder.
Copy gdiplus.dll to nLite-1.4.beta and mscoree.dll to %SystemSystem%
8. Check your C:\WINDOWS\WinSxS folder and see if you have VC8 runtimes:
x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
if yes then continue otherwise move to step 9.
copy folder
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
to
Captures\nLite\%SystemRoot%\winsxs
copy folder
C:\WINDOWS\WinSxS\Policies\x86_policy.8.0.Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_x-ww_77c24773
to
Captures\nLite\%SystemRoot%\winsxs\Policies
copy files
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.SystemCompatible_6595b64144ccf1df_5.1.0.0_x-ww_fc342b0b.Manifest
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.SystemCompatible_6595b64144ccf1df_5.1.0.0_x-ww_fc342b0b.cat
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd.manifest
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd.cat
to
Captures\nLite\%SystemRoot%\winsxs\Manifests
9. Only if you finished step 8 continue otherwise move to step 10.
The following files appear in nLite-1.4.beta and v2.0.50727 folders so delete them from both locations
msvcm80.dll
msvcp80.dll
msvcr80.dll
Microsoft.VC80.CRT.manifest
you could also delete unnecessary language files from Lang folder
10. You also need comctl32.exe v. 6.0.2800.1106 search for it in your C:\WINDOWS\WinSxS folder since it was probably installed with some other application if you cant find it download it microsoft.com or google it.
Put this file in %SystemSystem% folder.
Note that it must be v. 6.0.2800.1106
11. Create .ini file named ##Attributes.ini containing following text:
[Isolation]
DirectoryIsolationMode=Full
now copy this file to following folders:
- Captures\nLite-1.4.beta
- Captures\nLite-1.4.beta\Presets
- Captures\nLite-1.4.beta\Lang
- Captures\nLite-1.4.beta\v2.0.50727
- Captures\%SystemRoot%\winsxs
- %SystemRoot%\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
- Captures\%SystemRoot%\winsxs\Manifests
- Captures\%SystemRoot%\winsxs\Policies
-%SystemRoot%\winsxs\Policies\x86_policy.8.0.Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_x-ww_77c24773
Your project tree should look like this
untitled.JPG (12.69K)
Number of downloads: 16
12. Create file Package.ini in folder nLite(your project root folder) containing following text:
[BuildOptions]
CapturedUsingVersion=3.207
OutDir=bin
SandboxName=nLite
AddPageExecutionPermission=1
ChildProcessEnvironmentDefault=External
;ExternalCOMObjects={8BC3F05E-D86B-11D0-A075-00C04FB68820};{7D096C5F-AC08-4F1F-BEB7-5C22C517CE39}
;Enable this option if you want Out-of-process COM objects to be loaded outside of the virtual environment
;By doing this, the application may indirectly modify the machine - for example the MSI installer service COM object
;The default is to create all Out-of-process COM objects inside the virtual environment
;VirtualizeExternalOutOfProcessCOM=0
[Compression]
;CompressionType=None
CompressionType=Fast
[Isolation]
;DirectoryIsolationMode=WriteCopy
DirectoryIsolationMode=Merged
[nLite.exe]
Source=%ProgramFilesDir%\nLite-1.4.beta\nlite.exe
ReadOnlyData=bin\Package.ro.tvr
RetainAllIcons=1
;;cmd.exe shortcut can be used to launch system apps in the virtual environment
;[cmd.exe]
;Source=%SystemSystem%\cmd.exe
;ReadOnlyData=bin\Package.ro.tvr
;;regedit.exe can be used to inspect the virtual registry
;[regedit.exe]
;Source=%SystemRoot%\regedit.exe
;Shortcut=nlite.exe
13. Create 3 empty txt files in nLite folder (project root) named
HKEY_CURRENT_USER.txt
HKEY_LOCAL_MACHINE.txt
HKEY_USERS.txt
edit HKEY_LOCAL_MACHINE.txt to look like this:
@echo off set PROJECT_DIR=%PROJECT_PATH% if exist %PROJECT_PATH% goto haspath set PROJECT_DIR=%CD% :haspath if exist "%THINSTALL_BIN%\vregtool.exe" goto found set THINSTALL_BIN=%PROJECT_DIR%\..\.. if exist "%THINSTALL_BIN%\vregtool.exe" goto found set THINSTALL_BIN=c:\program files\Thinstall.VS if exist "%THINSTALL_BIN%\vregtool.exe" goto found echo Could not find vregtool.exe, please set the environment variable THINSTALL_BIN or install to c:\program files\ThinstallVS goto failed :found if not exist "%THINSTALL_BIN%\vftool.exe" goto failed if not exist "%THINSTALL_BIN%\tlink.exe" goto failed if not exist "%PROJECT_DIR%\bin" mkdir "%PROJECT_DIR%\bin" if exist "%PROJECT_DIR%\bin\*.exe" del /f /q "%PROJECT_DIR%\bin\*.exe" "%THINSTALL_BIN%\vregtool" "%PROJECT_DIR%\bin\Package.ro.tvr" ImportDir "%PROJECT_DIR%" IF ERRORLEVEL 1 GOTO failed "%THINSTALL_BIN%\vftool" "%PROJECT_DIR%\bin\Package.ro.tvr" ImportDir "%PROJECT_DIR%" IF ERRORLEVEL 1 GOTO failed "%THINSTALL_BIN%\tlink" "%PROJECT_DIR%\Package.ini" -OutDir "%PROJECT_DIR%\bin" IF ERRORLEVEL 1 GOTO failed goto done :failed echo *** Build failed *** goto final :done del "%PROJECT_DIR%\bin\*.tvr" del "%PROJECT_DIR%\bin\*.tvr.thfd" echo --------------------------------------------- echo Build complete :final
Now just execute build.bat and after it's done you will find your portable nLite.exe in bin folder in the root of your project.
That's it, all done.
You could apply this same tutorial for most .NET applications just put that apps folder in %ProgramFilesDir%\ and edit Package.ini accordingly, and put ##Attributes.ini in that apps folder and all subfolders.
For example you could create portable WMP11Slipstreamer
create folder named WMP11S and put WMP11Slipstreamer.exe in.
and just edit Package.ini
replace
SandboxName=nLite
[nLite.exe]
Source=%ProgramFilesDir%\nLite-1.4.beta\nlite.exe
ReadOnlyData=bin\Package.ro.tvr
RetainAllIcons=1
with
SandboxName=wmpslipstreamer
[WMP11Slipstreamer.exe]
Source=%ProgramFilesDir%\WMP11S\WMP11Slipstreamer.exe
ReadOnlyData=bin\Package.ro.tvr
RetainAllIcons=1
and build.
This post has been edited by degradacija: 05 October 2007 - 09:07 PM



Help
Back to top










