Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Network application/script to check client laptop/computer for new unwanted installed software.

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,27867
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Network application/script to check client laptop/computer for new unwanted installed software.
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Network application/script to check client laptop/compu... - 11/8/2005 11:27:28 PM   
  BlackZ

 

Posts: 3
Score: 0
Joined: 11/8/2005
Status: offline
First off all , I think I have to post it here so please dont be mad If I am wrong, ok here it goes,

Hi there, I am a student (of Belgium) and I have to make an application for one of my courses (Network Scripting).
Each student of my class was given a different subject for creating a network client-server application.
Since we just see the basic in class of some script languages we are allowed to get help from
other people to create our application, thats why I came here to ask for help and tips so I could finish my project succesfull.

The project:
------------
I have to make a client-server application. The meaning of it is to check for newly installed software on a client.
What do I mean by newly installed software ?
Well, software that has been installed after the client got his laptop/computer from his superior.
Each time the client installs new software like MSN/MIRc/... the server will be informed
that CLIENT001 installed those non allowed software.
On the server there will be a list available of the clients that installed unwanted programs.

Motivation:
-----------
People that get their laptop from work only have to use it for work and not for personal affairs.
If you limit the pleasure programs like Games/MSN/MIRC/... you limit the probability for security leaks,
software problems, unfocussed workers.

What can I use ?
----------------
I may use any program but I would like to program it in Visual Studio .NET since I know that program the best.
First I want to get it working in WSH.

Problem ?
---------
Still my knowledge of scripting/programming is very poor so I have completely no idea where to start.
Any help is welcome, any tips and hints also.
The deadline is at the beginning of January, the program doesnt have to be complex it only has to work.
If it can say, on a server, which new software has been installed on which client then I will have succeeded in my project.

Thank you for your time and I hope for a positive response so I know what I can do for the best to start my project.
You can contact me anytime , reply on this forum or if you really want you can add me on MSN.
I still have other projects to finish so I wont make the program complex , it just needs to work with the basics.



 
 
Post #: 1
 
 RE: Network application/script to check client laptop/c... - 11/8/2005 11:49:43 PM   
  ginolard


Posts: 1068
Score: 21
Joined: 8/10/2005
Status: offline
Well, it should be easy enough.  You can use Vbscript to list all installed software, that's easy.  This little bit of code will do that

Const HKLM = &H80000002
Set objRegistry = GetObject("winmgmts://./root/default:StdRegProv")
sBaseKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
arrKeys = objRegistry.EnumKey(HKLM, sBaseKey, arSubKeys)

For Each sKey In arSubKeys
    
      objRegistry.GetStringValue HKLM, sBaseKey & sKey, "DisplayName", strName
    If Trim(strName) <> "" Then
        wscript.echo strname
       End If

Next

Ideally, you'd want to run this every day and compare each day's results with the previous day to see if anything has been added.  Take a look at the FileSystemObject to find out how to write things to files.

(in reply to BlackZ)
 
 
Post #: 2
 
 RE: Network application/script to check client laptop/c... - 11/8/2005 11:59:37 PM   
  BlackZ

 

Posts: 3
Score: 0
Joined: 11/8/2005
Status: offline
1. Thanks for the fast response

2. I was mayb thinking of making a standard list of the installed software of the laptop from the first day and to compare it with that list.
   Its indeed not bad to compare it mayb with the previous time the user logged in on that client to check the changes.

   Now I had this script that makes a software list on the C root called software.tsv when you run it.
   And i was thinking to use this to compare it with newer ones.

quote:


Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile("c:\software.tsv", True)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
   & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
   ("Select * from Win32_Product")
objTextFile.WriteLine "Caption" & vbtab & _
   "Description" & vbtab & "Identifying Number" & vbtab & _
   "Install Date" & vbtab & "Install Location" & vbtab & _
   "Install State" & vbtab & "Name" & vbtab & _
   "Package Cache" & vbtab & "SKU Number" & vbtab & "Vendor" & vbtab _
       & "Version"
For Each objSoftware in colSoftware
   objTextFile.WriteLine objSoftware.Caption & vbtab & _
   objSoftware.Description & vbtab & _
   objSoftware.IdentifyingNumber & vbtab & _
   objSoftware.InstallDate2 & vbtab & _
   objSoftware.InstallLocation & vbtab & _
   objSoftware.InstallState & vbtab & _
   objSoftware.Name & vbtab & _
   objSoftware.PackageCache & vbtab & _
   objSoftware.SKUNumber & vbtab & _
   objSoftware.Vendor & vbtab & _
   objSoftware.Version
Next
objTextFile.Close
msgbox("done")

(in reply to ginolard)
 
 
Post #: 3
 
 RE: Network application/script to check client laptop/c... - 11/9/2005 12:27:19 AM   
  ginolard


Posts: 1068
Score: 21
Joined: 8/10/2005
Status: offline
There's a limitation using the WMI class Win32_Product as it will only return software installed with Windows Installer.  So, if something was installed with, say, InstallShield it won't show up.  If you use the code from my previous post it will show ALL installed software regardless of install method.

(in reply to BlackZ)
 
 
Post #: 4
 
 RE: Network application/script to check client laptop/c... - 11/9/2005 12:31:40 AM   
  BlackZ

 

Posts: 3
Score: 0
Joined: 11/8/2005
Status: offline
quote:

ORIGINAL: ginolard

There's a limitation using the WMI class Win32_Product as it will only return software installed with Windows Installer.  So, if something was installed with, say, InstallShield it won't show up.  If you use the code from my previous post it will show ALL installed software regardless of install method.


Aha :) , thanks good to know :)

(in reply to ginolard)
 
 
Post #: 5
 
 RE: Network application/script to check client laptop/c... - 11/9/2005 1:10:53 AM   
  ginolard


Posts: 1068
Score: 21
Joined: 8/10/2005
Status: offline
Well, my previous statement wasn't strictly 100% true.  It will show all installed software that puts an entry into the Uninstall registry subkey.  I'd guess 99% of software does that these days.  You might get the odd crappily designed application that doesn't do it though.

(in reply to BlackZ)
 
 
Post #: 6
 
 RE: Network application/script to check client laptop/c... - 11/9/2005 9:07:48 AM   
  Cybex


Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
quote:

I'd guess 99% of software does that these days.  You might get the odd crappily designed application that doesn't do it though.

Or maleware, spyware, or just about any software you as a SA do not want on your machines.

Cybex

(in reply to ginolard)
 
 
Post #: 7
 
 RE: Network application/script to check client laptop/c... - 11/10/2005 1:18:38 AM   
  ginolard


Posts: 1068
Score: 21
Joined: 8/10/2005
Status: offline
Dumb users need dumb terminals.  

(in reply to Cybex)
 
 
Post #: 8
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Network application/script to check client laptop/computer for new unwanted installed software. Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts