Jump to content



Photo

Cisco VPN Installer


  • Please log in to reply
No replies to this topic

#1 ken82m

ken82m

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 623 posts

Posted 11 October 2007 - 09:56 PM

This forum has me out plenty I hope I'm contributing something something can make use of.


This is a script a use to allow my end users without admin rights install the Cisco VPN Client.

It has been tested with 4.8 but should work with newer versions such as 5.0

Just update the code with the account information for the admin account you want to install with.

As is the script should be run from the folder that contains the setup files.

You can also copy your PCF file (VPN Connection Settings) into that same folder, and the installer will automatically import it. You can call it anything you want as long as you keep the PCF extension.


Plain Text         
Global $UserProf $UserProf = @UserProfileDir If $CmdLine[0] = 2 Then If $CmdLine[1] = "CopyFiles" Then $UserProf = $CmdLine[2] CopyFiles() Exit EndIf EndIf RunAsSet("Administrator", @ComputerName, "local admin password") $MSIRun = Run(@ComSpec & ' /C start /wait msiexec /i "' & @ScriptDir & '\vpnclient_setup.msi" /qb', @ScriptDir, @SW_MINIMIZE) Do $1 = WinWait("Cisco Systems VPN Client 4.8.00.0440", "Please wait while Windows configures Cisco", 5) $2 = ProcessExists($MSIRun) Until $1 = 1 OR $2 = 0 If $2 = 0 Then MsgBox(4096+48, "CWD Cisco VPN Installer", "The VPN client installation has failed" & @CR & "for an unknown reason") Exit EndIf $1 = 3 $2 = 3 Do $1 = WinWait("Cisco Systems VPN Client 4.8.00.0440", "You must restart your system", 5) $2 = ProcessExists($MSIRun) Until $1 = 1 OR $2 = 0 If $1 = 1 Then ControlClick("Cisco Systems VPN Client 4.8.00.0440", "You must restart your system", 3002 , "left") If FileExists("C:\Program Files\Cisco Systems\VPN Client\ipsecdialer.exe") Then RunWait(@ScriptFullPath & ' "CopyFiles" "' & $UserProf & '"') $Msg = MsgBox(4096+64+4+262144, "CWD Cisco VPN Installer", "The VPN client installation has completed however your computer" & @CR & "must be restarted before using using it." & @Cr & @CR & "Would you like to restart your computer now?") If $msg = 6 Then Shutdown(4+2) Else MsgBox(4096+64+262144, "CWD Cisco VPN Installer", "Please restart your computer before attempting to connect.") Exit EndIf Else MsgBox(4096+48, "CWD Cisco VPN Installer", "The VPN client installation has failed" & @CR & "for an unknown reason") Exit EndIf Exit Func CopyFiles() FileCopy(@ScriptDir & "\*.PNG", "C:\Program Files\Cisco Systems\VPN Client\Resources\*.*", 1) FileCreateShortcut("C:\Program Files\Cisco Systems\VPN Client\ipsecdialer.exe", $UserProf & "\Application Data\Microsoft\Internet Explorer\Quick Launch\CWD-VPN (Cisco).lnk", "C:\Program Files\Cisco Systems\VPN Client\", ' -c "CooperNAM (S)"', "", "C:\Program Files\Cisco Systems\VPN Client\Resources\connected.ico") FileCreateShortcut("C:\Program Files\Cisco Systems\VPN Client\ipsecdialer.exe", @DesktopCommonDir & "\CWD-VPN (Cisco).lnk", "C:\Program Files\Cisco Systems\VPN Client\", ' -c "CooperNAM (S)"', "", "C:\Program Files\Cisco Systems\VPN Client\Resources\connected.ico") EndFunc

Edited by ken82m, 11 October 2007 - 09:59 PM.

My ContributionsPC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs ScriptIT Help Desk and System Information ToolSet On Lid Close Power Option - Streaming Media Server & Website”I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains.”








0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users