Jump to content

StringReplace to find/repl in Text File


Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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()

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...