Adding/Editing Registry Settings to a WinRE build

User discussion and information resource forum for TeraByte Drive Image products, including TBNetManage.
Post Reply
Mr.X
Posts: 106
Joined: Mon Oct 20, 2014 12:31 am

Adding/Editing Registry Settings to a WinRE build

Post by Mr.X »

Need to add the following lines to the build

Code: Select all

reg add "HKCU\Software\Super Software\AppPro" /f /v "Name" /t REG_SZ /d "JJBenitez"
reg add "HKCU\Software\Super Software\AppPro" /f /v "Company" /t REG_SZ /d "JJBenitezCo"
Are these good to add to Buildscript.cmd?

Code: Select all

reg add "HKCU\TBWINPE_SOFTWARE\Super Software\AppPro" /f /v "Name" /t REG_SZ /d "JJMengano" 
reg add "HKCU\TBWINPE_SOFTWARE\Super Software\AppPro" /f /v "Company" /t REG_SZ /d "JJMenganoCo"
TeraByte Support(PP)
Posts: 1740
Joined: Fri Aug 12, 2011 12:51 am

Re: Adding/Editing Registry Settings to a WinRE build

Post by TeraByte Support(PP) »

For Builder, it's recommended to use the exported environment variables instead of hard-coding the path. This will allow it to work in both DISM API and EXE modes.

For HKCU you need to use the DEFAULT hive instead of SOFTWARE (e.g. %TBWinPE_Reg_DEFAULT%).

For example:

Code: Select all

reg add "HKLM\%TBWINPE_Reg_DEFAULT%\Software\Super Software\AppPro" /f /v "Name" /t REG_SZ /d "JJMengano" 
reg add "HKLM\%TBWINPE_Reg_DEFAULT%\Software\Super Software\AppPro" /f /v "Company" /t REG_SZ /d "JJMenganoCo"
You could also create a simple plugin to add them (not showing all the header info here):

Code: Select all

sub Process
	RegSetValue /c "@tbRegDefault@\Software\Super Software\AppPro" "Name" "JJMengano"
	RegSetValue "@tbRegDefault@\Software\Super Software\AppPro" "Company" "JJMenganoCo"
end sub
Mr.X
Posts: 106
Joined: Mon Oct 20, 2014 12:31 am

Re: Adding/Editing Registry Settings to a WinRE build

Post by Mr.X »

Thanks PP, it worked.
Post Reply