→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
‎03-24-2009 09:59 PM
;
; AutoIt Version: 3.3
; Language: English
; Platform: Win2000/XP/Vista/2008
; Author: Michael Ward
;
; Script Function:
; Connects to a remote registry using regedit
;
#requireadmin
if ($CmdLine[0] > 0) Then
$hostname = $CmdLine[1]
Else
MsgBox(48,"Error","No Hostname Specified",60)
Exit(1)
EndIf
; Run Regedit
Run("regedit.exe")
; Wait for the regedit to become active
WinWaitActive("Registry Editor")
; Connect to the remote registry
Send("!f")
Send("c")
WinWaitActive("Select Computer")
Send($hostname)
Send("{ENTER}")
; Finished!
{actionpath}remote_regedit.exe {smartname}
‎12-04-2015 01:05 PM
‎06-11-2015 10:23 PM
‎05-14-2015 03:56 PM
sc \\<pcname> start "RemoteRegistry"
;
; AutoIt Version: 3.3
; Language: English
; Platform: Win2000/XP/Vista/2008
; Author: Michael Ward
;
; Script Function:
; Connects to a remote registry using regedit
;
#requireadmin
if ($CmdLine[0] > 0) Then
$hostname = $CmdLine[1]
Else
MsgBox(48,"Error","No Hostname Specified",60)
Exit(1)
EndIf
; Start up Remote Registry access
RunWait('sc.exe '&$hostname&' start "RemoteRegistry"')
; Run Regedit
Run("regedit.exe")
; Wait for the regedit to become active
WinWaitActive("Registry Editor")
; Connect to the remote registry
Send("!f")
Send("c")
WinWaitActive("Select Computer")
Send($hostname)
Send("{ENTER}")
; Finished!
{actionpath}remote_regedit.exe \\{smartname}
‎11-27-2014 08:27 AM
‎11-19-2014 05:07 PM
‎10-07-2011 12:50 PM
;
; AutoIt Version: 3.3
; Language: English
; Platform: Win2000/XP/Vista/2008
; Author: Michael Ward
; Modification by Gerard Sweeney, 2011
;
; Script Function:
; Connects to a remote registry using regedit
;
; Choices here - if you don't want multiple PCs open in the one
; regedit window, we can present some choices
; OnePCPerWindow - Close Regedit first before opening the specified PC
; Prompt - Ask the user if they want to close regedit first
; Note that setting OnePCPerWindow to "N" over-rides $Prompt
$OnePCPerWindow = "N"
$Prompt = "Y"
if ($CmdLine[0] > 0) Then
$hostname = $CmdLine[1]
Else
MsgBox(48,"Error","No Hostname Specified",60)
Exit(1)
EndIf
$P = "regedit.exe"
$T = "Registry Editor"
; Run Regedit if it isn't already running
If ProcessExists($P) <> 0 then
If $OnePCPerWindow = "Y" then
If $Prompt = "Y" then
$Q = Msgbox(35, "Regedit already open", "Regedit is already running." & @CRLF & @CRLF & "Do you want to open the registry for PC " & $HostName & " in this window?" & @CRLF & @CRLF & "Yes = Open in current window" & @CRLF & "No = Close current Regedit window first" & @CRLF & "Cancel = do not attempt to open the remote registry at all")
Select
Case $Q = 7
; No clicked
ProcessClose($P)
ProcessWaitClose($P,10)
Case $Q = 6
; Yes clicked
Case Else
; Cancel
EXIT
EndSelect
Else
ProcessClose($P)
ProcessWaitClose($P,10)
EndIf
EndIf
EndIf
If ProcessExists($P) = 0 then
Run($P)
; Wait for the regedit to become active
WinWaitActive($T)
EndIf
WinActivate($T)
WinWaitActive($T)
; Connect to the remote registry
Send("!f")
Send("c")
WinWaitActive("Select Computer")
Send($hostname)
Send("{ENTER}")
; Finished!
‎12-07-2009 07:17 PM
‎03-25-2009 08:49 PM
‎03-25-2009 02:31 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now