Sign in to follow this  
Followers 0
kpu

GroupWise 6.5 Autologin

1 post in this topic

Script will auto log you into groupwise and then launch notify. Uses _StringEncrypt() to keep your password safe. Change $strEncyrptString to whatever you want.

Enjoy!

#include <string.au3>
#NoTrayIcon
Dim $DecryptD_upw,$encPword,$password,$sPword
$strTitle = "GroupWise Password"
$strGWTitle = "Novell GroupWise - Mailbox"
$strRegPath = "HKCU\Software\Kpundergound\GroupWiseSSO"
$strRun = "C:\Novell\GroupWise\GrpWise.exe /@u- /bl" & @UserName
$strGWNotify= "C:\Novell\GroupWise\notify.exe"
$strEncyrptString = DriveGetSerial("C:\")
_RunProgram()

Func _RunProgram()

    Run($strRun)
    _DecryptCreditals()
    WinWaitActive($strGWTitle,"",2)
    If WinActive($strGWTitle) Then
    Else
        WinWaitActive("Dialog","",3)
    EndIf
    Select
        Case WinActive("Dialog") = "1"
            ControlClick("Ent","","Button1")
            MsgBox(64,"Warning!","Your SSO information is incorrect. Please retype your information")
            _IncorrectSetting()
        Case WinActive($strGWTitle) = "1"       
            WinWaitActive($strGWTitle,"")
            Winsetstate($strGWTitle,"",@SW_MAXIMIZE)
    EndSelect   
;~  If WinWaitActive("Dialog") = "1" Then
;~      MsgBox(64,"Warning!","Your SSO information is incorrect. Please retype your information")
;~      _IncorrectSetting()
;~  Elseif WinWaitActive($strGWTitle) = "1" Then
;~      WinWaitActive($strGWTitle,"")
;~      Winsetstate($strGWTitle,"",@SW_MAXIMIZE)
;~  EndIf
    Run($strGWNotify)
EndFunc


Func _DecryptCreditals()
    $password = RegRead($strRegPath,"pname")
    If $password = "" Then
        Sleep(2000)
        _SetProgramSettings()
        $password = RegRead($strRegPath,"pname")
        $DecryptD_upw = _StringEncrypt(0,$password,$strEncyrptString,1)
        _SendSSOInformation()
    Else
        $DecryptD_upw = _StringEncrypt(0,$password,$strEncyrptString,1)
        _SendSSOInformation()
    EndIf
EndFunc 

Func _SetProgramSettings()
    $sPword= InputBox("Username","Please type in your GroupWise Password","","*","-1","-1","-1","-1")
    Select
    Case @Error = 0;OK - The string returned is valid
        $encPword = _StringEncrypt(1,$sPword,$strEncyrptString,1)
        RegWrite($strRegPath,"pname","REG_SZ",$encPword)
       Case @Error = 1;The Cancel button was pushed
        Exit
       Case @Error = 3;The InputBox failed to open
    EndSelect   
EndFunc

Func _SendSSOInformation()
    WinWaitActive($strTitle)
    ControlSetText($strTitle,"","Edit1",$DecryptD_upw)
    ControlClick($strTitle,"","Button1")
EndFunc

Func _IncorrectSetting()
        _SetProgramSettings()
        $password = RegRead($strRegPath,"pname")
        $DecryptD_upw = _StringEncrypt(0,$password,$strEncyrptString,1)
        ControlSetText("Dialog","","Edit1",$DecryptD_upw)
        ControlClick("Dialog","","Button1")
        WinWaitActive($strGWTitle,"")
        Winsetstate($strGWTitle,"",@SW_MAXIMIZE)
EndFunc

Share this post


Link to post
Share on other sites



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
Sign in to follow this  
Followers 0