Hi Victor.
I have the same issue and agree with you. Even if the CTLR-ALT-DEL is easy
enough, 50% of our users are still calling for support. I like your solution
(not the best, but better). Would you mind emailing me your script?
Thanks
> Thanks for the reply.
>
[quoted text clipped - 55 lines]
> > >
> > > Any Help or point me in the right direction would be very helpful.
Hi Stehpane,
This is the vbscript, use and change as needed.
' Script is used in conjuction with CSICO VPN client, and setting the
' VPN client application launcher to run this script.
' Process, VPN client will open a connection entry, the script starts
' Script will loop until an IP address (or quit after 5 minutes) is suppled
' by DHCP server and authenication is complete. The will then attempt open
an object
' to a file share (domain sysVol). If the object can not connect then
passwords
' are out of sync and a popup will display to lock the screen to sync domain
and local passwords
'
' Note: Connecting to Domain share is only attempted once more than this can
force a account
' lockout due to password not being in Sync.
'
---------------------------------------------------------------------------------
' Version: 1.0
' Date: 15 April 2008
' Author: Victor Bokulic
' Modification History:
'
'
------------------------------------------------------------------------------------
Dim oFSO, sFolderPath
Dim sResponse
Dim iKeepAlive, iCountdown, iSleepSec
Dim sMsgBoxInput, sMsgBoxTitle
iCountdown = 0
iKeepAlive = 100
iSleepSec = 3
sMsgBoxInput = GetLogged_on_Username & ": Local user password needs to be
updated"
sMsgBoxInput = sMsgBoxInput & vbCRLF & vbCRLF & "Please select OK and then
enter your UPDATED password to unlock your notebook"
sMsgBoxTitle = "Local User Password needs to be updated"
'change sfolderpath to a share on the local domain
sFolderPath = "\\full.domain.name.com\SysVol"
' Check for VPN Network adapter to be Enabled and given IP address"
Do Until TestVPNNetworkConnection() = "Enabled"
WScript.Sleep iSleepSec * 1000
' Test if script has been running too long, iKeepAlive * iSleepSec
If iCountdown < iKeepAlive then
iCountdown = iCountdown +1
Else
' Problem with VPN connection - taken too long, quit script
WScript.Quit
End If
Loop
'Test Folder Object Connection, error then local password cache is not the
same as domains
If TestFolderObject (sFolderPath) <> 0 then
sResponse = MsgBox (sMsgBoxInput , 0 , sMsgBoxTitle)
If sResponse = 1 then ' Force Screen to Lock
Set oWshShell = WScript.CreateObject("WScript.Shell")
oWshShell.Run "RunDll32.exe user32.dll,LockWorkStation"
End If
End If
Set oWshShell = Nothing
' --------------------------------------------------------------------------
' Verify VPN Network connection has IP address for local computer
' --------------------------------------------------------------------------
Function TestVPNNetworkConnection ()
Dim oWMI, ColItems, oItem
On Error Resume Next
Set oWMI = GetObject("winmgmts:\\." )
Set colItems = oWMI.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled =
True")
For Each oItem in colItems
If (oItem.Description) = "Cisco Systems VPN Adapter - Packet
Scheduler Miniport" or _
(oItem.Description) = "Cisco Systems VPN Adapter" then
TestVPNNetworkConnection = "Enabled"
Set oWMI = Nothing
Exit For
Else
TestVPNNetworkConnection = "Disabled"
End If
Next
Set oItem = Nothing
Set ColItems = Nothing
Set oWMI = Nothing
End Function
'=============================================================================
' --------------------------------------------------------------------------
' Function is a simple test if the local user can attached to a folder
' Function returns the error code, No Error = 0
' --------------------------------------------------------------------------
Function TestFolderObject (sFolderPath)
On Error Resume Next
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolderObject = oFSO.GetFolder(sFolderPath)
if Err.Number <> 0 then
TestFolderObject = err.Number
Err.Clear ' Clear the error.
Else
TestFolderObject = 0
End if
Set oFolderObject = Nothing
Set oFSO = Nothing
End Function
'=============================================================================
' --------------------------------------------------------------------------
' Function is to return the current user logged on
' Function returns the user's name
' --------------------------------------------------------------------------
Function GetLogged_on_Username()
Dim oNet, sUsername
On Error Resume Next
Set oNet = CreateObject("WScript.NetWork")
sUsername = oNet.UserName
GetLogged_on_Username = sUsername
Set objNet = Nothing 'Destroy the Object
End Function
:-) Victor B
> Hi Victor.
>
[quoted text clipped - 63 lines]
> > > >
> > > > Any Help or point me in the right direction would be very helpful.