|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Our company policy states that a user must have a password protected screen saver set to automatically lock their workstation after ten minutes of inactivity. I am trying to write a script that will help us monitor our compliance with this policy. I personally think this should be forced through a system policy, but you can't fight city hall. I use the following code snippet to accomplish this:
Dim strProfileName(100) 'Array used to store Profiles discovered on workstation Dim strScreenSaverActive(100) Dim strScreenSaverSecure(100) Dim strScreenSaverTimeout(100) 'Dim strScreenSaverExecutable(100) Dim ProfileCount 'counter for loop ProfileCount = 0 Set objwbemLocator = CreateObject("WbemScripting.SWbemLocator") Set objwbemServices = objwbemLocator.ConnectServer(cname, "root\cimv2", uname, pass) Set objSSData = objwbemServices.ExecQuery("SELECT * FROM Win32_Desktop",,48) For Each UserProfile in objSSData strProfileName(ProfileCount) = UserProfile.Name strScreenSaverActive(ProfileCount) = UserProfile.ScreenSaverActive strScreenSaverSecure(ProfileCount) = UserProfile.ScreenSaverSecure strScreenSaverTimeout(ProfileCount) = UserProfile.ScreenSaverTimeout / 60 ProfileCount = ProfileCount +1 Next Set objwbemLocator = Nothing Set objwbemServices = Nothing Set objRegistry = Nothing My problem is while this works it seems to muddy the waters by reporting back additional profiles (mostly administrative people - who never physically signed on to the machine). I would like to report back only users that have actually signed on. I thought about using fso to enumerate the folders in "Documents and Settings" but figure their must be an easier way to identify users who actually have signed on to the computer. Any help greatly appreciated! |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Help identifying actual user profiles |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|