This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Saving admin login + password on the console ?

Hello,

I wonder if there's a way to save the login/password used to install Sophos to remote PCs because I've been typing it HUNDREDS of times (we can't really do batch installations) and I've got many more PC to do !

Thanks.

PJ.

:25845


This thread was automatically locked due to age.
  • HI,

    I assume you have to use SEC to deploy.  That being said..  It's not in the product, but you could use a tool such as AutoIt to automate this.  Below is some example code that if you save as "SECAutomateDeploy.au3" for example.  Download and install AutoIt (http://www.autoitscript.com/site/autoit-script-editor/downloads/ ) You can build an exe from the code below.  If you run this exe you'll get a AutoIt icon in your notification tray to show it's running and everytime the SEC deployment wizard is run and gets to that credential page it will autofill it in and click next for you.  In theory you could automate the GUI for the entire wizard but this will start you off.  

    Something you may wish to try.  You could probably build a more elegant script but I've just thrown this together as an example.

    Hope it helps.

    Regards,

    Jak

    ;Declare Vars
    dim $strUsername, $strPassword, $strWindowText, $strWindowTitleText
    
    ;Set Vars
    $strUsername        = "domain\user"  ;Default username
    $strWindowTitleText = "Sophos Enterprise Console - Protect Computers Wizard"
    $strWindowText      = "Enter details"
    
    $strUsername = InputBox("SEC Deploy Credentials", "Deploy username:", $strUsername)
    $strPassword = InputBox("SEC Deploy Credentials", "Deploy password:" ,"", "*")
    
    
    While 1 = 1
    ;Check if "Credentials" Window is active
    if WinWaitActive($strWindowTitleText, $strWindowText) Then
    	 	 
    	 sleep (1000)
    	 
    	 ;Set Fields
    	 ControlSetText($strWindowTitleText, $strWindowText ,"[CLASS:Edit; INSTANCE:1]", $strUsername)
             ControlSetText($strWindowTitleText, $strWindowText ,"[CLASS:Edit; INSTANCE:2]", $strPassword)
        
    	 sleep (1000)
    	
    	 ;Click Next
    	 ControlClick($strWindowTitleText, $strWindowText ,"[CLASS:Button; INSTANCE:5]")
    	 
    EndIf
      
    WEnd
    :25861
  • Great workaround, many thanks !  :smileysurprised:

    I did not know the tool but I'm already thinking of using it for some other software where I have those kind of repeated clicks and type-ins ! 

    It would be nice, though, if Sophos could consider adding the opportunity of saving those credentials.

    :25885
  • Glad it is of use and you can use the idea in the future for other tasks.   I've updated it, to save storing the username/password in the exe/script.

    Regards,

    Jak

    :25917