DimwitTheWise Posted April 13, 2011 Share Posted April 13, 2011 Howdy allI 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-bitI am an admin on all machines and have UAC turned offI am able to delete the keys while on the XP boxes themselvesI am able to delete the keys remotely from one XP box to another XP boxI am able to delete values remotely and on the box, whether from XP or Windows 7But on the Windows 7 box, I can't delete keys on XP PCs, only values.Has anyone encountered this oddity? Link to comment Share on other sites More sharing options...
MrMitchell Posted April 15, 2011 Share Posted April 15, 2011 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! Link to comment Share on other sites More sharing options...
ScriptingNoob Posted March 25, 2012 Share Posted March 25, 2012 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. Link to comment Share on other sites More sharing options...
Juvigy Posted March 26, 2012 Share Posted March 26, 2012 If you do it manually - is it working ? #RequireAdmin in the beggining is important when working from W7. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now