Windows Scripting
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationWindows Scripting

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:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old November 19th, 2007, 04:18 PM
sbenj69's Avatar
sbenj69 sbenj69 is offline
Dark Sonic Apprentice :D
Click here for more information
 
Join Date: Feb 2007
Location: Redneck part of Illinois
Posts: 1,454 sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)  Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Weeks 5 Days 13 h 43 m 46 sec
Reputation Power: 1105
VBScript - Notification Script

Is there a way to do a script that when a computer is powered on and loads into Windows, that it sends me a notification (preferably hidden - but doesn't have to be). What I have is.... the company I work for has 3 satellite locations, and I think one of the employees at one of our offices is coming in on the weekends and after the office is closed (she has a key). The only reason I want notification, is so I can remote in and see what all she's doing. I work in the medical field and I am responsible for making sure we have no HIPPA violations via any of our computers.

Reply With Quote
  #2  
Old November 19th, 2007, 04:59 PM
jmurrayhead's Avatar
jmurrayhead jmurrayhead is offline
The Drunken Moderator
ASP Free God 17th Plane (13000 - 13499 posts)
 
Join Date: Feb 2004
Location: Reston, VA, USA
Posts: 13,029 jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)  Folding Points: 79068 Folding Title: Intermediate FolderFolding Points: 79068 Folding Title: Intermediate FolderFolding Points: 79068 Folding Title: Intermediate FolderFolding Points: 79068 Folding Title: Intermediate Folder
Time spent in forums: 3 Months 5 Days 8 h 34 m 28 sec
Reputation Power: 1563
Facebook
I'd say it's possible. There are a few ways you could send an e-mail, including using Outlook. You could just run it as a regular login script and if you only want the message sent when a certain user logs in, you could query Active Directory, for example, and only send the message when that user logs in.

I don't have any code samples, you'll have to wait for Nilpo for that one
__________________
jmurrayhead

Did I help you out? Make me popular by clicking the icon!

New Members:Proper way to post a question

Powered by ASP.Net

Reply With Quote
  #3  
Old November 19th, 2007, 06:56 PM
Nilpo's Avatar
Nilpo Nilpo is offline
Click here for more information.
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 726 Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Days 2 h 2 m 11 sec
Reputation Power: 351
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
Quote:
Originally Posted by jmurrayhead
I don't have any code samples, you'll have to wait for Nilpo for that one
Well, here I am, lol. Which one would you like to see code for?

JMH is exactly right. You can trigger some form of alert from a logon script. The question is, how would you like to be notified?

You could also change the security on that particular machine and only allow access on week days.
__________________
Click the image if at any point you don't like my decision.

Scripting problems? Windows questions? Ask the Windows Guru!


Last edited by Nilpo : November 19th, 2007 at 06:58 PM.

Reply With Quote
  #4  
Old November 19th, 2007, 07:03 PM
jmurrayhead's Avatar
jmurrayhead jmurrayhead is offline
The Drunken Moderator
ASP Free God 17th Plane (13000 - 13499 posts)
 
Join Date: Feb 2004
Location: Reston, VA, USA
Posts: 13,029 jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)jmurrayhead User rank is General 9th Grade (Above 100000 Reputation Level)  Folding Points: 79068 Folding Title: Intermediate FolderFolding Points: 79068 Folding Title: Intermediate FolderFolding Points: 79068 Folding Title: Intermediate FolderFolding Points: 79068 Folding Title: Intermediate Folder
Time spent in forums: 3 Months 5 Days 8 h 34 m 28 sec
Reputation Power: 1563
Facebook
Quote:
Originally Posted by Nilpo
You could also change the security on that particular machine and only allow access on week days.


I believe you can even specify hours of network usage.

Reply With Quote
  #5  
Old November 19th, 2007, 07:05 PM
Nilpo's Avatar
Nilpo Nilpo is offline
Click here for more information.
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 726 Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Days 2 h 2 m 11 sec
Reputation Power: 351
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
Quote:
Originally Posted by jmurrayhead
I believe you can even specify hours of network usage.
That's correct. It can also be done at the System, Group, or User level.

Reply With Quote
  #6  
Old November 19th, 2007, 11:05 PM
sbenj69's Avatar
sbenj69 sbenj69 is offline
Dark Sonic Apprentice :D
Click here for more information
 
Join Date: Feb 2007
Location: Redneck part of Illinois
Posts: 1,454 sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)sbenj69 User rank is General 2nd Grade (Above 100000 Reputation Level)  Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1Folding Points: 194358 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Weeks 5 Days 13 h 43 m 46 sec
Reputation Power: 1105
well, unfortunately, none of the satellite locations actually log on to the domain due to possible lag issues.... Sad to say, but each of the remote offices are on 768K DSL.

I don't need anything fancy, and if it is email, that's fine, but I would rather have something that sends a message via openfire/spark, since I have set that up as our internal chat program. Also, though, I have ports 5800 and 5900 open for the remote desktop utility (VNC).

In the future, I will prolly make it a domain login, which I have no problem limiting them through the server....

uggh, right now though, I am limited to what the software vendor for our medical database dictates. They suggested to not have domain logins for the satellite locations. In all reality though, I should test how long it takes to login via the satellite locations and make my decision from there. I really don't see their point of the system taking a long time to login to the domain once the user settings are cached...... Yes, the first time would take a bit to synchronize the desktop/settings, but I'm thinking once it's on the local system, there should be minimal lag when logging in.

As it is, I have no problem monitoring the users while I'm at work, it's when I'm not at work that I worried about. It's a major concern, as there are heavy fines for releasing medical information whether on purpose or inadvertantly without proper consent.

I just started this IT position about 3 months ago, and tbh, the system before me was totally susceptible to attack. I found key loggers, and trojans out the wazoo.... of course back then, they didn't login to a domain, they were all DHCP with free reign. The remote locations are still setup that way...... and I'm not gonna have my head roll because somebody wants to play on the computer when they shouldn't even be there.

It's only one location really, as the other two have to remove the computers when they are done....as we only rent space for the other two locations on certain days from other physicians, and part of the agreement is to have our stuff out of the way when we're not there. I have to leave the location in question mostly as it is, because there is a lab computer attached, which I have no control over.

I know the best way to make it secure, but I don't know if it's a viable resolution at this point. On a side note, we have hardware firewalls in place, but that only prohibits an outsider from getting in...... it doesn't prevent somebody who doesn't know much about computers accidently making the computer vunerable.

I guess, as a temporary fix, I can install K9 web protection and limit the browsing through there (or another software firewall). K9 has worked well for me as far as limiting browsing capabilities.

Last edited by sbenj69 : November 19th, 2007 at 11:20 PM.

Reply With Quote
  #7  
Old November 20th, 2007, 04:37 AM
Nilpo's Avatar
Nilpo Nilpo is offline
Click here for more information.
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 726 Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Days 2 h 2 m 11 sec
Reputation Power: 351
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
As a Network Administrator my suggestion to you is to set up a term server and have your remote systems work remotely across a secure VPN. This is the easiest, most secure route. A simple remote desktop connection to the term server and they're up an running...yet, the term server can be secured or powered off over the weekend. No more problem.

As a Windows Specialist, my suggestion is to implement some local policies. As long as your remote machines are running XP Pro, you can put policies in place to restrict all of these things locally. Just make sure to set up your user accounts appropriately, meaning no one uses an administrator account.

As a scripting specialist, my advice would be the following logon script which will send email notification every time it runs. I'll take a look into automating your IM client. Alternatively, you could use the Messenger Service to do this across your VPN, but you would need to have it enabled in order for it to work.
vb Code:
Original - vb Code
  1.   ' Logon Notification
  2.   ' This script can be run as a logon script to send email notification
  3.   ' when a user logs on to a system.  Details about the logon event are
  4.   ' included in the email.
  5.   ' LogonNotification.vbs
  6.   ' © Robert Dunham - 11/20/2007
  7.   ' Created by Nilpo for ASP Free Forums
  8.   ' You may use or modify this script in any way as long as this copyright remains intact.
  9.   ' Webpage: http://www.nilpo.com/pub/scripts/LogonNotification.vbs
  10.  
  11. ' Please indicate where notifications should be sent
  12. Const ADMIN_EMAIL = "recipient@mail.com"
  13.  
  14. ' Please provide the following details for your SMTP server
  15. Const SMTP_SERVER = "smtp.mail.com"
  16. Const SMTP_PORT = 25 ' Do not change if you are unsure
  17.  
  18. ' If your SMTP server requires authentication, please set
  19. ' USE_AUTHENTICATION to True and supply a username and password
  20. Const USE_AUTHENTICATION = False
  21. Const SMTP_USER = "username"
  22. Const SMTP_PASS = "password"
  23.  
  24. ' If your SMTP server uses Secure Password Aunthentication, please
  25. ' set the following value to True.
  26. Const SMTP_SSL = False
  27.  
  28. ' Set this value to true while testing
  29. Const ENABLE_DEBUGGING = False
  30.  
  31. ' Do not change anything below this line
  32. Set WshNetwork = CreateObject("WScript.Network")
  33.  
  34. dteTime = Time
  35. dteDate = Date
  36.  
  37. strMessage = "A user has logged onto <b>" & ComputerName & "</b> from <b>" & WAN_IP & "</b> with the following details:<br><br>" _
  38.     & "Logon Date: " & dteDate & "<br>" _
  39.     & "Logon Time: " & dteTime & "<br>" _
  40.     & "Account Name: " & AccountName & "<br>" _
  41.     & "LAN IP: " & LAN_IP & "<br>"
  42.  
  43. result = SendMail(strMessage)
  44.  
  45. If ENABLE_DEBUGGING Then WScript.Echo result
  46.  
  47. Function AccountName
  48.     If IsNull(WshNetwork) Then Set WshNetwork = CreateObject("WScript.Network")
  49.     AccountName = WshNetwork.UserName
  50.  
  51. End Function
  52.  
  53. Function ComputerName
  54.     If IsNull(WshNetwork) Then Set WshNetwork = CreateObject("WScript.Network")
  55.     ComputerName = WshNetwork.ComputerName
  56.  
  57. End Function
  58.  
  59. Function LAN_IP
  60.     strComputer = "."
  61.     Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
  62.     Set colItems = objWMIService.ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE",,48)
  63.    
  64.     For Each objItem In colItems
  65.