Link to home
Start Free TrialLog in
Avatar of icecom4
icecom4Flag for United States of America

asked on

.reg script to add registry string

How can I convert this batch line to a .reg file instead?

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Windows\SysWOW64\PnkBstrA.exe" /t REG_SZ /d "VISTASP1 RUNASADMIN" /f
Avatar of Bartender_1
Bartender_1
Flag of Canada image

The easiest way to convert it to a reg file would be to go to the registry entry on a computer that this batch file has be run on, and then right click on the key and choose export, then export it as a reg file. Let me know if you need step by step instructions on how to do this.

Hope this helps!

:o)

Bartender_1
Avatar of icecom4

ASKER

yes, please, if you don't mind.
SOLUTION
Avatar of Bartender_1
Bartender_1
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What oBdA states is true, If you have more entries in this key other than the one you wish to add, my method would capture those as well.

I chose this method because I made the assumption that you would only be running Punk Busters in compatibility mode. If you have other programs that are running in compatibility mode, their registry entries would also be captured, and I should have forewarned against that just in case.

Thanks for pointing out my error oBdA.

:o)

Bartender_1
Avatar of icecom4

ASKER

Thank you for teaching me that!!!!