I have been a huge fan of WinBatch since 1997. WinBatch, a fantastic scripting utility provided by Wilson WindowWare, is based on the Windows Interface Language (WIL).
I have gotten out of more than one tight spot with WinBatch. I intend to use this forum to post scripts which I have used through the years which have helped me with my systems management duties.
The following script is designed to open up the Registry via Regedit.exe. It will then connect to a remote machine (based off of the Argument passed). In other words, if I wanted to open the registry of a remote computer called Homer, I would simply just have to run
Below is the WinBatch script
; This script will open a separate window for Regedit and connect to the target machine
param1 = strTrim(param1)
winCheck = WinWaitExist(“Registry Editor”, 5)
if winCheck == @False then exit
GetWindow = DllHwnd(“Registry Editor”)
scCheck = WinWaitExist(“Select Computer”, 4)
if scCheck == @False
display(5, “Error”, “Error connecting to Remote Registry”)
SCID = WinIdGet(“Select Computer”)
MouseClickBtn(SCID, “”, “OK”)
message(“Error”, “Please pass name of remote computer as argument (e.g. StartReg.exe homer)”)
There you go. Unfortunately I have NOT found a better way to automatically connect to a remote registry without having to automate the key strokes. Oh well, it may be kludgy but it works.