HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 31st, 2004, 09:11 AM
EJW EJW is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: Auburn, PA
Posts: 1 EJW User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post Help identifying actual user profiles

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!

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Help identifying actual user profiles


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT