Scripting registry changes

Associate
Joined
27 Feb 2006
Posts
1,750
Location
Normanton
I need a script that will look at this key and replace values in the session data key.

HKEY_LOCAL_MACHINE\Software\Web Filtering\%username.Domain\Session Data\

The thing is for each user profile on the PC there is a different %username.domain key

eg
HKEY_LOCAL_MACHINE\Software\Web Filtering\test1.RSG\Session Data\
HKEY_LOCAL_MACHINE\Software\Web Filtering\test2.RSG\Session Data\
HKEY_LOCAL_MACHINE\Software\Web Filtering\test3.RSG\Session Data\

How can I do a batch file or start up script to go through all the different profile keys and replace certain values in each profiles session data key?

For example this is a reg export of what changes I want to make to test1.RSG but I also want to make the changes to all the profile keys on the computer.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Web Filtering\test1.RSG\Session Data]
"UserName"=""
"Password"=hex:
"AuthenticationCode"=hex:
"ProcessUploadURL"="/webfilter/services/processlist.php"
"ConnectionListURL"="/webfilter/services/connectionlist.php"
"PrimeLoginURL"="/webfilter/services/webreq.php"
"RemoteProxyServerAddress"="wg.uk.wrproxy.com"
"RemoteProxyServerPort"="3128"
"LocalProxyPort"="3128"
"ConnectionList"=""
"EnablePrimeLogin"=dword:00000001
"EnableCyberCafeMode"=dword:00000000
"AllowProcessUpdate"=dword:00000000
"ServiceURL"="http://weblogin1.webroot.com"
"ObtainedPrimingURLs"=dword:00000001
"AllowUnSafeBrowsing"=dword:00000000
"UpdateStamp"=dword:00000000
"CachingProxyServerAddress"=""
"CachingProxyServerPort"=""
"LoggingLevel"="everything"
"EnableAutoConfigScript"=dword:00000000
"AutoConfigScriptAddress"=""
"LocalAutoConfigScriptAddress"=""


Tried to explain as best I can hopefully someone will get what I mean!

Thanks
 
How about creating a security group for each user,test1reg, test2reg, then you can use IfMember in your .bat to call the relevant .reg key for each user?
 
How about creating a security group for each user,test1reg, test2reg, then you can use IfMember in your .bat to call the relevant .reg key for each user?

I've got 200 users and PC's I need to run this on don't want to have to create a security account for each
 
No worries. I used your issue as a way of testing myself to see how much I'd learnt. Managed to come up with something earlier that allowed you to insert a list of Computer names and then it would check that they were online and that the reg keys existed. If they were it would make the neccessary changes and log it all to a text file. Was a good little project as I was quite pleased with it in the end. :D
 
Back
Top Bottom