Jump to content

Recommended Posts

Posted

Why isnt that working ?....

teh registry Editior pops up and is in front, i want to get the filemenu up and remote connect to a networks registry. (its german version, d for Datei = File)

$expl="Regedit.exe"

if GUICtrlRead($check[$i])=1 then Run($expl, "",@SW_MAXIMIZE)

WinWaitActive("Registrierungs-Editor")

Sleep(1000)

send("{ALTDOWN}")

Send ("d")

send("{ALTUP}")

Send ("m")

Send ($rechner[$i])

das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum?

Posted

I don't know what are you trying to do but you can use REGREAD.

$retvalue = RegRead('\\RemoteComputerName\HKLM\Software\AutoIt v3\AutoIt', 'Version')

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Posted

You don't need to send AltDown and AltUp separately (at least on my OS). You should be able to send "!dm".

This is on the American English version of Windows, hopefully you can translate:

$expl="Regedit.exe"
Run($expl, "",@SW_MAXIMIZE)
$title="Registry Editor"   ; "Registrierungs-Editor" in German?
WinWait($title)
WinActivate($title)
Send("!fc"); Alt-File-Connect - "!dm" in German?
$title = "Select Computer"
$text = "Enter the object name to select"
WinWait($title, $text)
WinActivate($title, $text)
ControlSetText($title, $text, "RichEdit20W1", "AComputer")
BlueBearrOddly enough, this is what I do for fun.
Posted (edited)

well got that now - other problem is - that i cant get services.msc startet that way

if $msg = $regedit then

for $i=0 to $anzahl

$x=$x+GUICtrlRead($check[$i])

next

if $x=(($anzahl+1)*4)-3 then

for $i=0 to $anzahl

$expl="Regedit.exe"

if GUICtrlRead($check[$i])=1 then

if $t<1 then

Run($expl, "",@SW_MAXIMIZE)

$t=$t+1

EndIf

WinWaitActive("Registrierungs-Editor")

;Sleep(2000)

Send("!D")

Send ("m")

Send ($rechner[$i])

Send ("{ENTER}")

Endif

next

EndIf

endif

is working....

but...

if $msg = $services then

for $i=0 to $anzahl

$x=$x+GUICtrlRead($check[$i])

Next

if $x=(($anzahl+1)*4)-3 then

for $i=0 to $anzahl

if GUICtrlRead($check[$i])=1 then

if $t<1 then

RunWait(@ComSpec & " /c " & "services.msc", "", @SW_HIDE)

;run("services.msc")

$t=$t+1

Endif

WinWaitActive("Dienste")

Send("!t")

Send ("V")

Send ($rechner[$i])

Send ("{ENTER}")

endif

next

EndIf

endif

is not working, i cant start services.msc with run(...) because this is only working with exe, bat, etc...

i dont know why, but i cant get the keys working with services.msc

ups i forgot....

i want to make a little programm to connect remotly to registry, services, eventlog, etc...

;)

Edited by memnon

das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum?

Posted

Please use code blocks to make it more legible.

is not working, i cant start services.msc with run(...) because this is only working with exe, bat, etc...

i dont know why, but i cant get the keys working with services.msc

.msc files open with MMC.EXE.

Look at this post for a few options: http://www.autoitscript.com/forum/index.ph...811entry75811

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Posted (edited)

i dont know why, but i cant get the keys working with services.msc

Drop the RunWait and use Run. I think that using RunWait will make your script start the services.msc and then wait for that process to exit before continuing.

You can use:

$expl="Regedit.exe"
Run(@ComSpec & " /c " & $expl, "", @SW_HIDE)

$expl="compmgmt.msc"
Run(@ComSpec & " /c " & $expl, "", @SW_HIDE)
if you want one "run line" for both regedit and an MSC appl. If you want to get to services and event viewer - then I suggest that you connect via the compmgmt.msc one time and work with both.

Also, my German is not so good - non-existent - so I'm not sure, but it looks like you are attempting to open the services.msc and then connect to a remote computer... perhaps this code would work for you:

Run(@ComSpec & " /c " & $expl & " /computer=---", "", @SW_HIDE)

just replace the --- with the remote computer name

More info here:

http://www.theeldergeek.com/microsoft_management_console.htm

Hope this helps....

Edit: If you are sure that services and event viewer are all that you want to connect to, then take a look at comexp.msc

Edit2: Forgot to repeat Danny35d's ReadRead (and RegWrite) suggestion. So there is little need to mention that there are command line options for connecting to a remote system. Google it.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted (edited)

You can use:

$expl="Regedit.exe"

Run(@ComSpec & " /c " & $expl, "", @SW_HIDE)

Run(@ComSpec & " /c " & $expl & " /computer=---", "", @SW_HIDE)

just replace the --- with the remote computer name

that´s the way i need it, yeah, services.msc and eventvwr.msc are working now, as i want

is there any parameter for regedit to connect to another computer, too ? (something like regedit /computer=computername... )

btw. thank you all for your help since yet ;)

with regedit i made it this way atm...

if $msg = $regedit then

for $i=0 to $anzahl

$x=$x+GUICtrlRead($check[$i])

next

if $x=(($anzahl+1)*4)-3 then

for $i=0 to $anzahl

$expl="Regedit.exe"

if GUICtrlRead($check[$i])=1 then

if $t<1 then

Run($expl, "",@SW_MAXIMIZE)

;Run(@ComSpec & " /c " & $expl & " /computer=" &$rechner[$i] , "", @SW_MAXIMIZE)

$t=$t+1

EndIf

WinWaitActive("Registrierungs-Editor")

;Sleep(2000)

Send("!D")

Send ("m")

Send ($rechner[$i])

Send ("{ENTER}")

Endif

next

EndIf

endif

Problem is, if there would be ANY ohter way instead of sending keystrokes to regedit to connect to another computer it would be really nice for me...

Edited by memnon

das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum?

Posted

Try downloading the beta if you don't already have it and let us know if this code does what you want (you'll need to change the texts):

Local Const $REGEDIT_TITLE = "Registry Editor"
Local Const $SELECT_TITLE = "Select Computer"

Opt("WinWaitDelay", 0)
Run("RegEdit")
WinWait($REGEDIT_TITLE)
WinMenuSelectItem($REGEDIT_TITLE, "", "&File", "&Connect Network Registry...")
WinWait($SELECT_TITLE)
ControlSetText($SELECT_TITLE, "", 214, "This value is placed into the box")
ControlFocus($SELECT_TITLE, "", 1)

Change ControlFocus() to ControlClick if you would prefer the box to automatically dismiss.

Posted

Try downloading the beta if you don't already have it and let us know if this code does what you want (you'll need to change the texts):

Local Const $REGEDIT_TITLE = "Registry Editor"
Local Const $SELECT_TITLE = "Select Computer"

Opt("WinWaitDelay", 0)
Run("RegEdit")
WinWait($REGEDIT_TITLE)
WinMenuSelectItem($REGEDIT_TITLE, "", "&File", "&Connect Network Registry...")
WinWait($SELECT_TITLE)
ControlSetText($SELECT_TITLE, "", 214, "This value is placed into the box")
ControlFocus($SELECT_TITLE, "", 1)

Change ControlFocus() to ControlClick if you would prefer the box to automatically dismiss.

@LxP ... DONE ;)

and i workes TO fast, that the Select Computer Window could be seen - so i´s that what i want :P

thank you all for your response

das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum?

Posted

...is there any parameter for regedit to connect to another computer, too ? (something like regedit /computer=computername... )

Not that I know of - I scripted this very task just last week and it was so easy to script the remote connects that I did not bother looking for a command line syntax. (My code was not as clean as LxP's - boy he does good work!)

Glad to be of some help...

[size="1"][font="Arial"].[u].[/u][/font][/size]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...