How to install an application to Windows PE
#1
Posted 16 March 2011 - 11:54 AM
I am trying to find a way how to offline install an application to Windows PE.
I was thinking about using Process Monitor to capture installation process and then offline attach registry file of Windows PE and manually make the changes (+ copy program files to win pe image). But this seems to me very uncomfortable and tough way (because of many registry entries) to do this. Is there a way how to do it better ? Or how to generate registry file (which will then be added to registry in win pe) automatically ?
Thank you, TomasK
#2
Posted 16 March 2011 - 04:19 PM
1.If you know how to make .bat/.com files you can add a start-up program to run a batsh script then add entries to your PE system on start-up (complicated to pull off)
2.You can convert *.reg files to script files using Reg2WBS (is easier)
You can capture registry changes whit RegShot (this detects some file changes to)then save it to *.REG files
Edited by DarkPhoeniX, 16 March 2011 - 04:24 PM.
#3
Posted 05 May 2011 - 08:45 PM
There are 2 ways it just depends on your app your trying to add:
1.If you know how to make .bat/.com files you can add a start-up program to run a batsh script then add entries to your PE system on start-up (complicated to pull off)
2.You can convert *.reg files to script files using Reg2WBS (is easier)
You can capture registry changes whit RegShot (this detects some file changes to)then save it to *.REG files
#4
Posted 05 May 2011 - 09:03 PM
Brian
#5
Posted 05 May 2011 - 10:50 PM
If your program installs fine into running PE
You can use this method, Installing into Virtual Machine
For example I am going to use the program name of Ghost
[Variables]
%ProgramFolder%=Ghost
%ProgramEXE%=Ghost.exe
%ProgramTitle%=Ghost
[Interface]
pCheckBox1="Run from ram (boot.wim)",1,3,16,50,183,18,False
pCheckBox2="Create Startmenu Shortcut",1,3,18,195,185,18,True
pTextBox1="Start menu folder (blank for none):",1,0,33,125,168,21,"HD Tasks\Imaging"
[Process]
Echo,".....Starting %ProgramTitle%...",WARN
// RUN FROM RAM
If,%pCheckBox1%,Equal,True,Begin
SET,"%LinkDir%","%SystemDrive%\Program#$sFiles\%ProgramFolder%"
SET,"%DestDir%","%TargetDir%\Program#$sFiles"
End
// RUN FROM CDDRIVE
If,%pCheckBox1%,Equal,False,Begin
SET,"%DestDir%","%TargetDir%\Programs"
SET,"%LinkDir%","%PE_Programs%"
End
Unpack,Folder,"%ProgramTitle%.7z",True,"%DestDir%"
If,%pCheckBox2%,Equal,True,Add_Shortcut,StartMenu,%pTextBox1%,%LinkDir%\%ProgramFolder%\%ProgramEXE%,%ProgramTitle%,%LinkDir%\%ProgramFolder%
Run,%ScriptFile%,REGISTRY
Echo,".....Ending %ProgramTitle%...",WARN
[REGISTRY]
*** Add registry entries from RegCPE here ***
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The two Echo lines may be removed later.
They help with troubleshooting your build in the log file
be sure to check log file after your first build to
see that everything went fine.
Step 1
Start PE in Virtual Machine
Start RegShot2 Unicode before install of Ghost, saving to x:\
Install your app (Ghost) into running PE in Virtual Machine.
After install, it is usually a good idea to start the app
some apps generate more registry entries upon startup.
Take your second shot with regshot and then compare.
In X:\ you will find ~RedoReg0001.txt or similar written by Regshot
Step 2
Navigate to the folder you installed your app into.
(i.e.) x:\Program Files\Ghost
Select all files inside that folder and 7zip.
7zip will suggest Ghost.7z "This is what you want"
Step 3
Move ~RedoReg0001.txt and Ghost.7z from VM to your host machine
rename ~RedoReg0001.txt to ~RedoReg0001.reg
Download RegCPE found here http://galapo.net/ge...php?topic=106.0
Start RegCPE and point it to ~RedoReg0001.reg
It will convert all entries directly to a format useable in .scripts
Add the entries converted by RegCPE into your Ghost.script
and Attach Ghost.7z to your script, add finishing touches to your script
like shortcuts and extracting Ghost.7z, See examples above
After Ghost.script is finished, make a new build with Ghost.script selected.
Try running Ghost in your new build in VM. If all goes well it should work.
If you have problems with starting services, you can redo step1 with regshot
and reinstall Ghost, this may provide you with any registry entries you might have
missed. Be aware some re-installations will change registry entries slightly.
Or the entries may be in unicode or with unprintable characters, RegCPE seems
to deal with them fine, but I have had similar failures with starting services.
[NOTES]
Before installation of Ghost, I also usually start RegShot v1.8.1
at the same time that I start RegShot2 Unicode, So I am actually
running two regshots, the reason for this is that RegShot v1.8.1
will also catch any files that have been installed into other directories
such as \sys32, \inf or \driver folders. Very Important when you are trying to
write a script for a program that starts services or loads drivers.
- wtrabbit likes this
#6
Posted 09 May 2011 - 07:46 PM
Thanks for the help... Where would I place a registry entry for:[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\VIDEO]
To add it to the PE3-reg folder for x86??
Create a new file called PE3-HARDWARE_CUSTOM.reg ????
Thanks,
Brian
#7
Posted 09 July 2011 - 12:10 PM
in Leopard project you can install software. Of course it is useful for snapshots ;o)
http://reboot.pro/13068/
filip
#8
Posted 10 July 2011 - 12:46 AM
Here are Two ways to add the entries you need.
I suggest you manually add the registry entries in a running PE
Before you run them from RunOnce
using regfile PE3-HARDWARE_CUSTOM.reg in running PE:
[Process]
ExtractFile,%ScriptFile%,Folder,PE3-HARDWARE_CUSTOM.reg,%Target_Sys%
##
Hive_Load,Default
Reg_add,0x1,%reg%\Software\Microsoft\Windows\CurrentVersion\RunOnce,PE3-HARDWARE_CUSTOM,"regedit.exe /s %SystemRoot%\System32\PE3-HARDWARE_CUSTOM.reg"
Hive_UnLoad,Default
Using batch file in running PE:
This will be easier to troubleshoot if you have problems
It also adds entries if Running from CD or Ram
These are script entries from Unreleased
ShadowProtect Desktop v. 4.1.0
Originaly written by al_jo modified by me
Modify .cmd file for your needs, Example Below
//This entry will RunOnce %ProgramTitle%.cmd
//Be sure to to add %ProgramTitle%=PE3-HARDWARE_CUSTOM under [variables]
//or just replace %ProgramTitle% with PE3-HARDWARE_CUSTOM in following examples
[Process]
ExtractFile,%ScriptFile%,Folder,%ProgramTitle%.cmd,%Target_Sys%
##
Hive_Load,Default
Reg_add,0x1,%reg%\Software\Microsoft\Windows\CurrentVersion\RunOnce,%ProgramTitle%,"hiderun %ProgramTitle%.cmd"
Hive_UnLoad,Default
Contents of %ProgramTitle%.cmd:
IF EXIST Y:\Programs\StorageCraft\ShadowProtect\ShadowProtect.exe GOTO _CD
IF EXIST %programfiles%\StorageCraft\ShadowProtect\ShadowProtect.exe GOTO _PF
:_PF
reg add HKLM /v EventMessageFile /t REG_EXPAND_SZ /d "X:\Program Files\StorageCraft\ShadowProtect\ShadowProtectSvc.exe" /f
reg add HKLM /v TypesSupported /t REG_DWORD /d 7 /f
exit 0
:_CD
reg add "HKLM" /v EventMessageFile /t REG_EXPAND_SZ /d "Y:\Programs\StorageCraft\ShadowProtect\ShadowProtectSvc.exe" /f
reg add "HKLM" /v TypesSupported /t REG_DWORD /d 7 /f
exit 0
Change needed entries in %ProgramTitle%.cmd to fit your registry entries from PE3-HARDWARE_CUSTOM.reg
It should look something like this;
reg add "HKLM\HARDWARE\DEVICEMAP\VIDEO" /v Value_You_Want_To_Add /t REG_EXPAND_SZ /d "Y:\Programs\StorageCraft\ShadowProtect\ShadowProtectSvc.exe" /f
reg add "HKLM\HARDWARE\DEVICEMAP\VIDEO" /v Value_You_Want_To_Add /t REG_DWORD /d Data_To_Add_To_This_Key /f
#9
Posted 22 September 2012 - 12:21 PM
These are script entries from Unreleased
ShadowProtect Desktop v. 4.1.0
Originaly written by al_jo modified by me
Hm, are you still using that or was it just for demonstration purposes?
Searching the forum I didn't find an out-of-the-box solution.
#10
Posted 22 September 2012 - 03:41 PM
Hm, are you still using that or was it just for demonstration purposes?
Searching the forum I didn't find an out-of-the-box solution.
Hi Mikka, yes I still have the unreleased script.
There were still some issues with the running app not being fully functional.
If you would to try it out, post back and I can PM the script to you.
#11
Posted 26 September 2012 - 05:16 PM
thanks for the reply. What are the requirements for your script?
Would a DE or a RE 4.1.5 do?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users