Page 1 of 1

[Solved]Add / merge a registry file?

Posted: Sun Jul 15, 2012 11:49 pm
by netmonk99
In UVK, is there any way to "execute" a registry file so that it's contents are merged into the current registry? As part of an optimization strategy, I like to add the TimeToKill registry hack that forces all programs to end in 5 seconds after the user clicks shutdown/restart.

Also, is it possible to do this silently, so that I won't have to click "yes" to add to registry?

Thanks!

Re: Add / merge a registry file?

Posted: Mon Jul 16, 2012 8:10 am
by Fred
Hi netmonk99.

Sure, you can do most everything with a UVK script. In fact, you have several ways to write registry values using UVK.

Method 1, Using the <Reg> UVK command:

Code: Select all

 <Reg>

[HKEY_CURRENT_USER\Control Panel\Desktop]
"AutoEndTasks"=dword:00000001
"WaitToKillAppTimeout"=dword:00001388
Method 2, using regedit to import the reg file:

Code: Select all

 <RunWait>
%WinDir%\regedit.exe /s "Path of reg file"
Replace Path of reg file with the path to the reg file you want to merge. The /s switch tells regedit to do it silently.

Method 3, Using the Reg Import cmd command:

Code: Select all

 <CmdScript>
@echo off
Reg import "Path to reg file"
Again, replace Path of reg file with the path to the reg file you want to import.

Method 4, Using the Reg Add cmd command:

Code: Select all

 <CmdScript>
@echo off
Reg Add "HKCU\Control Panel\Desktop" /v AutoEndTasks /t REG_DWORD /d 1 /f
Reg Add "HKCU\Control Panel\Desktop" /v WaitToKillAppTimeout /t REG_DWORD /d 5000 /f
Hope it helps.

Re: Add / merge a registry file?

Posted: Mon Jul 16, 2012 8:21 am
by Fred
I forgot to mention that if you're using the UVK immunization, you must un-immunize the Desktop registry entries section before running the script.

Also, if you change these registry entries, be sure to save all open documents before log off/shutdown, or you may not have enough time to do it.

The regedit code I provided was just an example, you can add the code you want.

Re: Add / merge a registry file?

Posted: Tue Jul 17, 2012 3:48 am
by netmonk99
I can't thank you enough for this, Fred. You and your software are truly great!

Re: [Solved]Add / merge a registry file?

Posted: Wed Jun 19, 2013 1:17 pm
by Alanna
The Windows Registry is a hierarchical database that stores pattern settings and options on Microsoft Windows operating systems. It contains settings for low-level in service system components and for application running on the platform that have opted to use the registry.