memnon Posted October 14, 2005 Share Posted October 14, 2005 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? Link to comment Share on other sites More sharing options...
Danny35d Posted October 14, 2005 Share Posted October 14, 2005 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 Link to comment Share on other sites More sharing options...
buzz44 Posted October 14, 2005 Share Posted October 14, 2005 D = F (File) so what does M = ?... C (Connect)? qq Link to comment Share on other sites More sharing options...
bluebearr Posted October 14, 2005 Share Posted October 14, 2005 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. Link to comment Share on other sites More sharing options...
memnon Posted October 14, 2005 Author Share Posted October 14, 2005 (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 October 14, 2005 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? Link to comment Share on other sites More sharing options...
Skruge Posted October 14, 2005 Share Posted October 14, 2005 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] Link to comment Share on other sites More sharing options...
herewasplato Posted October 14, 2005 Share Posted October 14, 2005 (edited) i dont know why, but i cant get the keys working with services.mscDrop 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 nameMore info here:http://www.theeldergeek.com/microsoft_management_console.htmHope 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.mscEdit2: 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 October 15, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
memnon Posted October 17, 2005 Author Share Posted October 17, 2005 (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 namethat´s the way i need it, yeah, services.msc and eventvwr.msc are working now, as i wantis 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 endifProblem 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 October 17, 2005 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? Link to comment Share on other sites More sharing options...
LxP Posted October 17, 2005 Share Posted October 17, 2005 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. Link to comment Share on other sites More sharing options...
memnon Posted October 17, 2005 Author Share Posted October 17, 2005 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 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? Link to comment Share on other sites More sharing options...
herewasplato Posted October 17, 2005 Share Posted October 17, 2005 ...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] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now