Sign in to follow this  
Followers 0
quietus24

StringReplace to find/repl in Text File

4 posts in this topic

Hi Everyone,

I am looking to replace a Server Name in the registry on a large number of XP machines. o:)

I must change ServerName1 to ServerName9

I was thinking of exporting the known registry keys and wondering if I can StringReplace within a text file....

Any ideas/suggestions. :lmao:

Thanks very much

Share this post


Link to post
Share on other sites



If you know the exact location of the registry keys, you don't need to export them.

Just use RegWrite. You can RegWrite to a remote machine if you have the rights.

Share this post


Link to post
Share on other sites

Hi Everyone,

I am looking to replace a Server Name in the registry on a large number of XP machines. o:)

I must change ServerName1 to ServerName9

I was thinking of exporting the known registry keys and wondering if I can StringReplace within a text file....

Any ideas/suggestions. :lmao:

Thanks very much

<{POST_SNAPBACK}>

looks like you know the registry key...

If you need to check the current name first you can do a RegRead() .

and update the registry with RegWrite()


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hmmm,

I need to target specfici areas of Reg Keys as well as values.....

below is exact extract with server name changed to generic...

[HKEY_CURRENT_USER\Printers]

"DeviceOld"="\\\\servername1\\printername,winspool,Ne06:"

[HKEY_CURRENT_USER\Printers\Connections]

[HKEY_CURRENT_USER\Printers\Connections\,,servername1,printername]

"Server"="\\\\servername1"

"Provider"="win32spl.dll"

And dozens more like this. I am trying to switch printserver names by pulling off the tablecloth without disturbing anything else.

I suppose Regwrite could do it, but I have to just replace the server name part selectively. Registry Surgery indeed.

What do you think

Thanks.

Edited by quietus24

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0