Thanks again for fixing the @regbread issue on remote reads so quick.
One other odd thing I found... I'm testing out using:
iff %@regexist[\\%comp%\HKLM\Software] EQ 0 then
sc \\%comp start remoteregistry > nul
endiff
Okay, pretty simple, try to read a key we know is there, and if it can't be read, assume the remote registry service isn't started (I preface that with a check to see if the machine is pingable).
I expected it to return a zero in a case where the winreg remote pipe wasn't responding, indicating that service is stopped. What I get instead is:
TCC: (Sys) No such host is known.
"\\<the computer name...>"
I just assumed it would return a "zero", same as if the machine were reachable but the key didn't exist. As it is, it throws an error in the iff/then and continues on to the "sc start" command. Which is fine in this case since that's what it would do in that situation anyway, but in a different case that could be the wrong next step. :)
What I was using in my old TCC v14 script was using "reg query" to do the same, and I can keep using that I guess, I thought I'd just try out some fancy JPSoft only tricks for the registry parts of my script...
reg query \\%comp%\HKLM\Software /ve >& nul
iff %? NE 0 then
sc \\%comp% start remoteregistry > nul
endiff
So I have a workaround, but thought I'd see if the @regexist for a remote machine that wasn't reachable through that remote winreg pipe was by design, or... ?
By the way, I used the now-working @regbread to read in some Groove sync client reg_binary key info and being able to parse that to get the local and URL info for what the client is syncing is WAY better looking than the ugly method I had been using, parsing the raw binary and converting to text, character by character. The @bpeekstr was especially useful, having the unicode option built in. Very cool.
One other odd thing I found... I'm testing out using:
iff %@regexist[\\%comp%\HKLM\Software] EQ 0 then
sc \\%comp start remoteregistry > nul
endiff
Okay, pretty simple, try to read a key we know is there, and if it can't be read, assume the remote registry service isn't started (I preface that with a check to see if the machine is pingable).
I expected it to return a zero in a case where the winreg remote pipe wasn't responding, indicating that service is stopped. What I get instead is:
TCC: (Sys) No such host is known.
"\\<the computer name...>"
I just assumed it would return a "zero", same as if the machine were reachable but the key didn't exist. As it is, it throws an error in the iff/then and continues on to the "sc start" command. Which is fine in this case since that's what it would do in that situation anyway, but in a different case that could be the wrong next step. :)
What I was using in my old TCC v14 script was using "reg query" to do the same, and I can keep using that I guess, I thought I'd just try out some fancy JPSoft only tricks for the registry parts of my script...
reg query \\%comp%\HKLM\Software /ve >& nul
iff %? NE 0 then
sc \\%comp% start remoteregistry > nul
endiff
So I have a workaround, but thought I'd see if the @regexist for a remote machine that wasn't reachable through that remote winreg pipe was by design, or... ?
By the way, I used the now-working @regbread to read in some Groove sync client reg_binary key info and being able to parse that to get the local and URL info for what the client is syncing is WAY better looking than the ugly method I had been using, parsing the raw binary and converting to text, character by character. The @bpeekstr was especially useful, having the unicode option built in. Very cool.