Sign in to follow this  
Followers 0
DimwitTheWise

Windows 7 error - RegDelete key on a remote XP PC

4 posts in this topic

Howdy all

I am encountering a little oddity that I haven't been able to resolve. I am running a Windows 7 PC and am trying to RegDelete keys off of remote XP machines on a domain.

RegDelete("\\remotepc\HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections\,,server,queue")

  • All PCs are 32-bit
  • I am an admin on all machines and have UAC turned off
  • I am able to delete the keys while on the XP boxes themselves
  • I am able to delete the keys remotely from one XP box to another XP box
  • I am able to delete values remotely and on the box, whether from XP or Windows 7
  • But on the Windows 7 box, I can't delete keys on XP PCs, only values.
Has anyone encountered this oddity?

Share this post


Link to post
Share on other sites



Some things to consider:

RegDelete("\\remotepc\HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections\,,server,queue")

  • You have quotes around the entire string which is treated as the "keyname" parameter, don't think you have a key named "\\remotepc\HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections\,,server,queue"
  • Put quotes around only "\\remotepc\HKLM\SYSTEM\CurrentControlSet\Control\Print\Connections" (not sure if it makes a difference because I don't use this function often but try removing the final backslash \ after connections)
  • RegDelete only takes 2 parameters, the second of which is optional so your statement written as-is without the quotes would look like 4 parameters.
Hope this helps!

Share this post


Link to post
Share on other sites

I am having the same challenge and oddities; I can delete values from Win7 to XP, but not keys; I am returned error -2.

Curious if you had found a fix for this issue.

Share this post


Link to post
Share on other sites

If you do it manually - is it working ?

#RequireAdmin in the beggining is important when working from W7.

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