I know how to get Special Folders on the system I'm at - how can I get the same on a remote system. I tried writing:
AddExtender( "WWREG34I.DLL" )
Computer = "\\" : Computer
TopKey = @REGMACHINE
TopSub = "\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders[Common Desktop]"
Handle = RegConnect( Computer, TopKey, "" )
Path = RegQueryStr( Handle, TopSub )
I always get back error 1452 : REG Functions : Unable to open specified subkey - I can open the reg remotely and navigate there by hand. Can you see where I'm wrong at? Is there a better way to get the paths? I looked through WMI but couldn't figure out how to get them there.
Thank you for any help!
You must make sure the account you are running under has access to the remote registry. Can manually you connect to the remote machine registry using regedit? Reference: http://technet.microsoft.com/en-us/library/cc732388.aspx
You may also need to remove the leading backslash on your subkey path.
TopSub = "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders[Common Desktop]"
Pure genius - it was the leading backslash that's been beating me raw for the last few hours.. THANK YOU! :)