Page 1 of 1

Adding/Editing Registry Settings to a WinRE build

Posted: Sun Oct 13, 2024 10:11 pm
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"

Re: Adding/Editing Registry Settings to a WinRE build

Posted: Sun Oct 13, 2024 11:09 pm
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

Re: Adding/Editing Registry Settings to a WinRE build

Posted: Mon Oct 14, 2024 2:47 am
by Mr.X
Thanks PP, it worked.