Registry Update

  • Using "xp_regwrite" how possible is it to update X-number of pc's registry file, or will this only work for the machine which command is running on?

  • Any of the extended system procedures, and any TSQL for that matter, are going to get executed within the context of the current server connection.

    However, You can create a server group in SSMS and execute TSQL across all of those servers in that group.

    I don't know if you can do xp_regwrite, but I know you can execute xp_cmdshell, so I'm only left to assume you can write to the registry. Assuming of course you have permission to write to the registry.

    Now, after I have written all of this, I realized that you said "update a PC's registry". Do you mean other than the physical server that SQL Server resides on? If this is the case, I'm going to say that wouldn't be possible. Now, I'm sure if you really wanted to, you could create a batch script to utilize the command line utilities to write to a registry of a remote PC and call that sript from xp_cmdshell. Of course you would have to have the appropriate level of permissions to do so. But, that get's pretty dangerous, and if you're a publicly traded company, the auditors probably wouldn't go for that.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply