Session: 2010-11

“COMPUTER LAB MANAGEMENT SYSTEM”
A Report Submitted to Department of Information Technology in partial fulfillment of B Tech Degree Of Rajasthan Technical University (KOTA)

Submitted To
Prof. L.K.Sharma HOD IT DEPT

Guided By
Mr. Hemant Saini I.T Dept

Submitted By
Vinay Singh (07EAEITO60) Vipin Narang (07EAEIT061)

Candidate’s Declaration
I hereby declare that the work, which is being presented in this report, entitled “Computer Lab Management System” in partial fulfillment for the award of Degree of “Bachelor of Technology” in department of Information Technology, Alwar Institute of Engineering and Technology affiliated to Rajasthan Technical University, Kota is a record of my own investigations carried under the Guidance of Mr. Hemant Saini, I.T. Dept, AIET Alwar. I have not submitted the matter presented in this report any where for the award of any other Degree.

Submitted By:Vipin Narang 07EAEIT061 Vinay Singh 07EAEIT060

2

Preface
This Document is an initial project report for the fulfillment of Project Phase I requirements for the award of the degree of Bachelor of Technology. This document describes software requirements and design Specification of the project. The requirements mentioned in this document are subjected to change and revisions in future, thus the software requirements presented in this document should be considered the agreed-upon specifications at the time of submission of documents only. The design specification mentioned in this project are also subjected to change in future and will be presented in separate software design specification document, thus the design specification presented in this document should be consider the agreed-upon at the time of submission only. Although this document is not indented as a living document but there may be future revision and addition in project phase II.As the software development life cycle is a dynamic process in which our understanding of the project and its criteria of success are refined over times. It is therefore expected that the design and requirement specification will undergo many revisions, thus anyone seeking information in that regard should refer the corresponding document.

3

We also wish to extend appreciation to my colleagues at A.T.Acknowledgement Guidance and Inspiration are indispensable in all walks of life.S. Finally we like to thank Prof.I..Sharma (Head of C.I.E. L. Hemant Saini (Lecturer) for his constant support and help me for a proper direction. We express our sincere sense of gratitude to our guide Mr..T. & I. Alwar) for giving inspiration and providing every possible support.E. A.K. Alwar who offered many suggestions throughout this work.T. Vipin Narang Vinay Singh VII SEM VII SEM 4 .

T.E. (I. A.S.Tech.I.CERTIFICATE This is to certify that the work related to the Project entitled on “Computer Lab Management System” has been carried out by Vipin Narang and Vinay Singh of B. & I.T A.I.T(Alwar) Guided By Mr.T.T (Alwar) 5 . Submitted to Prof. Hemant Saini Lecturer I.K. L.) under my supervision.Sharma Head of C. Dept.E.

.......It will provide a detail report of the system components modification and changes...... 18 Syntax......................................... 41 Fig 6.....................51 11.............. 39 5.it can be also used for maintaining lab inventory......................7 Product Functions ................................................................23 3.......................................................................................................8Win32_OperatingSystem Class.................................................................................... 8 Definitions and Abbreviations.......................................................................1 Overview...... 27 Syntax.........................................................................................................51 11...................................... Pointing Device................... 38 5........6...................................Table of Contents ........................... CDROM...........................23 Syntax........................ The scope of the project is wide enough and ranges from small scale like small computer labs to large scale network system of thousands of computer..........................................................................................27 3..................... 52 6 .................................................................................... 8 Introduction.........................1 Hardware Interfaces...................................20 3.............................................................................................2............................................................................................................... 25 Syntax........ 9 The project is aimed at fetching and managing all the information related to System Hardware configuration like Processor........................................................2.........................22 Syntax....................................................... 28 Syntax.Testing........................................5Win32_NetworkAdapter Class............................................................................................2Software Interfaces.................................................6.....2....2.3Win32_CDROMDrive Class.............10 Syntax...................................................4 Assumptions and Dependencies..41 5.6 Interfaces............2.......6Win32_DesktopMonitor Class..................................41 5............................................ CLMS application can be implemented in the school as well as college lab where there is a need of keeping all the information about system configuration as this application maintains a database for the system hardware configuration..............................................................................................................................7Win32_DiskDrive Class..25 3.........................43 43 CLMS is a project developed for the surveillance of computers in a computer lab........................ HDD....................................................................................... 2 ................................................................. 21 3..............................................................................................................................................................................2 User Characteristics ..........................................................................................................................................................................................................................1 Specific Requirements .22 3............4Win32_Processor Class.. In future it can also be upgraded to keep vigilance of the system .....................2Testing Methods................. 39 5..................................................................................................................................................................................18 3..................................40 5...................................................................................................................................... ............................ 10 Keyboard.................................. 19 Syntax...........................................................................................................2.........................................................................................................................2.................... Motherboard............................................3 Design and Implementation Constraints...............................................................................2.................................................. 39 5...........................................It will help in detection of working status of any system component of any system by just checking it through the server application and help to diagnose any theft attempt and removal and addition of any components in the system............................................................................................................................................................28 5.................................................................9Win32_ComputerSystem Class........ 51 11................................................................... 2 Candidate’s Declaration.........1 CLMS Database Architecture ............................17 3............................................................................................................................10 Win32_PhysicalMemory Class.................................................................... Network Card etc of different client node connected to server and generates a log detail of any alteration...........

...............................................................................30 Figure 4........1(Architecture Of WMI).......................2 Unit Tests........ 65 Books:....................................................................Refernces: .............................................................1 API Test........................... 33 Figure 4..................................................................5(USE CASE diagram of CLMS)....................................................2........................................................................................2(CLMS Architecture).........52 11...................................5(Inventory update)................................................53 11..............53 11............2(Flow Chart of CLMS Server)........................................................1(Login Screen).......................................... 42 Figure 7................36 Figure 6..................................................................................................53 11..................................................................................................45 Figure 7.......44 Figure 7...........47 7 .................................................................................................................................3 Test Report....................3...........54 13................. 53 11.............. 34 Figure 4........................2(User Management Screen)...............................2Alpha Testing............................................................................................................................................................................3...............3(O-level DFD)..............11............................................................................................................................................................................................52 11.6(Node)....................... 28 Figure 4. 64 ....................................................................................... 41 Figure 7............2............................................................................................................................................3Beta Testing.....................................43 Figure 7........................................ 13 Figure 3...31 Figure 4......................................................................................3(Log)........................................................................................................................1(CLMS Database Architecture).............................................1(Flow Chart of CLMS Client)...........................................................................2....................................................................................................................................3 Alpha Test...........4(Inventory)......................................................................................1Unit Testing...............................................................................................................3....................46 Figure 7...................................................................................4(1-level DFD)....... 65 List of Figures Figure 3........

Software which will run on Server Software which will run on Client Windows Management Instrumentation Abbreviations:.7(Create User).................. 48 Definitions and Abbreviations.................................................... A Person who will use the Server...Figure 7................................... Definitions:- CLMS: Client: Server: Admin: CLMS SERVER: CLMS Client: WMI: Computer Lab Management System PC node that exist in lab PC that will provide services to the client also manages clients....NET Application Developer New Enterprise Technology 8 ....

The project provides a well-defined user 9 . It will explain the purpose and features of the system. the interfaces of the system. Server side application will check earlier entry of the database with new entries and if it found any changes in the configuration entries it will figure it out and generate a log containing the details of the of any amendments in the hardware of the specific system. This document is intended for both the stakeholders and the developers of the system. CLMS client application is basically involved in fetching the system hardware configuration detail from a client node of the computer lab and store those information in a database present on the server.Introduction The purpose of the SRS (Software Requirement Specification) document is to present a detailed description of the Computer Lab Management System. what the system will do. CLMS is a integrated software which have two applications one is server-side and other is client-side which works parallel to each other but are logically connected to accomplish the desired objective. the constraints under which it must operate and how the system will react to external stimuli.

Network Card etc of different client node connected to server and generates a log detail of any alteration. PROCESSOR: 1. Synopsis of Computer Lab Management System 2. 2.2Technical detail Hardware Required:1. CDROM Keyboard.It will provide a detail report of the system components modification and changes. Pointing Device. 2. The scope of the project is wide enough and ranges from small scale like small computer labs to large scale network system of thousands of computer. Motherboard. HDD.It will help in detection of working status of any system component of any system by just checking it through the server application and help to diagnose any theft attempt and removal and addition of any components in the system. This project will be tried to implement using WMI (Window Management Instrumentation) classes of Microsoft Windows operating system to detect the current system configuration and will use classes like DeviceChangeEvent classes of WMI core to fire a pop up in the server about the changes.6Ghz 10 .interface on the server-side to the Vigilator and also provides security measure from unauthorized access to the software.1Project Description: Computer Lab Management System(CMLS) basically work on detecting any kind of configuration changes and addition of specific computer components in a particular computer system of lab and will report these changes to the main server to which the computer system of the lab is connected. The project is aimed at fetching and managing all the information related to System Hardware configuration like Processor.

4Innovativeness & Usefulness This project will be useful for the purpose of the fetching the data from the client node and then store the data on the server database 2. Environment 2005/2008 3.Net Windows 2007. RAM : 256Mb 3.3Aim To detect any addition and change in components of a Lab computer and reflect those changes on the server system to which the computer are connected. 2. 11 . Operating System Vista 2. Technology 5. 2. HARDDISK :20GB Software Required:1. Other Requirement C# C#. Front end Tool 4. Xp.Net C++ Program File VisualStudio.5Current Status of Development Under feasible study and requirement analysis.2.

The Overall Description 3. The information from this file is obtained by firing WMI queries on the system.2. This application basically obtains the information from cimv2 file present in operating system folder.1 CLMS CLIENT: CLMS client application is basically involved in fetching the system hardware configuration detail from a client node of the computer lab. WMI uses the Common Information Model (CIM) 12 . Windows Management Instrumentation (WMI) is the Microsoft implementation of Web-based Enterprise Management (WBEM). _________________________________________________ 3.6Market Potential & Competitive advantage This project is useful for the purpose of the Computer Lab Management System by the help of this project we can get all the information about the selected node of the computer Lab and can view the information on the server and modify the information and can keep track of the all lab computer system. which is an industry initiative to develop a standard technology for accessing management information in an enterprise environment. Windows Management Instrumentation (WMI) is the infrastructure for management data and operations on Windows-based operating system.WMI query are the query from the Window Management Instrumentation classes.

networks. and other managed components. CIM is developed and maintained by the Distributed Management Task Force. 13 . devices. applications.industry standard to represent systems.

14 .

Fig:3.NET 15 .NET platform Using Window forms and C# in logic base.1WMI Architecture CLMS Client is basically a application designed on . As shown in the Architecture diagram .

IsLocked. PowerManagementCapabilities[]. Password.application implements a namespace “System Management” which provide interface between Client application and WMI core. ErrorCleared. ConfigManagerUserConfig. Name. not MOF order. 3.1Win32_Keyboard Class The Win32_Keyboard WMI class represents a keyboard installed on a computer system running Windows. PNPDeviceID. Properties are listed in alphabetic order. LastErrorCode. ConfigManagerErrorCode.2.The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. CreationClassName.2WMI CLASSES DESCRIPTION 3. ErrorDescription. The detail of the different hardware devices is obtained from the WMI repository is then collected by the application which is scheduled to do so repeatedly at definite interval of time and stores those information in the database situated at server. Syntax class Win32_Keyboard : CIM_Keyboard { uint16 string uint32 Boolean string string string Boolean string datetime Boolean uint32 string string uint16 uint16 string uint16 Availability. 16 . NumberOfFunctionKeys. InstallDate.WMI core is then further interfaced to WMI providers and manages objects. DeviceID. Description. Layout. Caption.

Any device used to manipulate a pointer.2. uint32 ConfigManagerErrorCode. string Description. string Caption. Status. uint32 DoubleSpeedThreshold. The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. uint32 LastErrorCode. 17 . Boolean IsLocked. 3. uint16 Handedness. string Name. string ErrorDescription. PowerManagementSupported. Boolean ConfigManagerUserConfig. Properties are listed in alphabetic order. string Manufacturer. SystemCreationClassName. Boolean ErrorCleared. Syntax class Win32_PointingDevice : CIM_PointingDevice { uint16 Availability. string CreationClassName. not MOF order.2Win32_PointingDevice Class The Win32_PointingDevice WMI class represents an input device used to point to and select regions on the display of a computer system running Windows. datetime InstallDate. uint16 DeviceInterface. string HardwareType. string InfSection. or point to the display on acomputer system running Windows is a member of this class.Boolean string uint16 string string }. StatusInfo. string InfFileName. SystemName. string DeviceID.

string CompressionMethod. Boolean DriveIntegrity. SystemCreationClassName. Resolution. Be aware that the name of the drive does not correspond to the logical drive letter assigned to the device.2. Properties are listed in alphabetic order. Syntax class Win32_CDROMDrive : CIM_CDROMDrive { uint16 Availability. NumberOfButtons. not MOF order. uint32 ConfigManagerErrorCode. Synch.3Win32_CDROMDrive Class The Win32_CDROMDrive WMI class represents a CD-ROM drive on a computer system running Windows. string DeviceID.uint8 string uint16 uint16 Boolean uint32 uint32 uint32 string uint16 uint32 string string }. QuadSpeedThreshold. PointingType. 18 . PowerManagementCapabilities[]. The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Boolean ConfigManagerUserConfig. PowerManagementSupported. Status. StatusInfo. PNPDeviceID. SystemName. Boolean ErrorCleared. SampleRate. string CreationClassName. string CapabilityDescriptions[]. string Drive. uint64 DefaultBlockSize. string Caption. 3. string Description. uint16 Capabilities[].

one instance of the Win32_Processor class exists for each processor.4Win32_Processor Class The Win32_Processor WMI class represents a device that can interpret a sequence of instructions on a computer running on a Windows operating system. SCSIBus. FileSystemFlags. TransferRate. 3. SystemName. MinBlockSize. MediaLoaded. MaxBlockSize. MfrAssignedRevisionLevel. InstallDate. ErrorDescription. Size. Manufacturer. VolumeName. 19 . Id. MediaType.2. SerialNumber. VolumeSerialNumber. NeedsCleaning. PowerManagementCapabilities[]. StatusInfo. Name. SCSILogicalUnit. ErrorMethodology. LastErrorCode. SCSITargetId. On a multiprocessor computer. SystemCreationClassName. FileSystemFlagsEx. MaximumComponentLength. Status. RevisionLevel. NumberOfMediaSupported. MaxMediaSize. PNPDeviceID. SCSIPort.string string uint16 uint32 string datetime uint32 string uint64 uint32 uint64 Boolean string string uint64 string Boolean uint32 string uint16 Boolean string uint32 uint16 uint16 uint16 uint16 uint64 string uint16 string string real64 string string }. PowerManagementSupported.

uint16 PowerManagementCapabilities[]. string ErrorDescription. string Description. uint32 L2CacheSize. string Role. Syntax class Win32_Processor : CIM_Processor { uint16 AddressWidth. string Manufacturer. string SocketDesignation. uint16 Level. uint32 ConfigManagerErrorCode. uint16 DataWidth. uint16 Family. uint16 CpuStatus. string DeviceID. string OtherFamilyDescription. uint32 L2CacheSpeed. uint32 CurrentClockSpeed. uint16 Architecture. 20 . uint16 ProcessorType. Boolean PowerManagementSupported. uint32 MaxClockSpeed. uint16 LoadPercentage. Boolean ConfigManagerUserConfig.The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. uint32 L3CacheSpeed. datetime InstallDate. string Name. uint16 Revision. uint32 NumberOfLogicalProcessors. not MOF order. uint32 LastErrorCode. uint32 NumberOfCores. Properties are listed in alphabetic order. string Caption. string PNPDeviceID. string CreationClassName. uint32 ExtClock. Boolean ErrorCleared. uint16 Availability. uint16 CurrentVoltage. uint32 L3CacheSize. string ProcessorId.

SystemName. string DeviceID. string MACAddress. Properties are listed in alphabetic order. uint32 InterfaceIndex. SystemCreationClassName. Win32_NetworkAdapter only supplies IPv4 data. VoltageCaps. Version. Stepping.string uint16 string string string string uint16 string uint32 }. 3. uint32 LastErrorCode. Boolean CreationClassName. The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. uint32 ConfigManagerErrorCode. Boolean AutoSense.5Win32_NetworkAdapter Class The Win32_NetworkAdapter WMI class represents a network adapter of a computer running a Windows operating system. UpgradeMethod. uint16 AdapterTypeID. string ErrorDescription. string Description. string Caption. Syntax class Win32_NetworkAdapter : CIM_NetworkAdapter { string AdapterType. uint16 Availability. string GUID. uint32 Index.. datetime InstallDate. StatusInfo.2. string Manufacturer. boolean Installed. 21 . Boolean ErrorCleared. not MOF order. UniqueId. Status.

NetworkAddresses[]. hardware that is not compatible with Windows Display Driver Model (WDDM) returns inaccurate property values for instances of this class. Windows XP. ServiceName. ProductName. Starting with Windows Vista. Name. properties of this class replace Win32_DisplayConfiguration. Starting with Windows Vista. string Caption. and Windows NT 4. Windows 2000. SystemName. StatusInfo. The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. 3. NetConnectionID. NetConnectionStatus. PowerManagementCapabilities PowerManagementSupported.uint32 uint64 string string uint16 Boolean string string Boolean string uint16 Boolean string string uint64 string uint16 string string datetime }. 22 . TimeOfLastReset. MaxNumberControlled. SystemCreationClassName. not MOF order. PermanentAddress.0: This class returns data supplied by hardware compatible with Windows Device Driver Model (WDDM).2. Syntax class Win32_DesktopMonitor : CIM_DesktopMonitor { uint16 Availability. MaxSpeed. Speed. NetEnabled. uint32 Bandwidth. Windows Server 2003. PhysicalAdapter. Status.6Win32_DesktopMonitor Class The Win32_DesktopMonitor WMI class represents the type of monitor or display device attached to the computer system. PNPDeviceID. Properties are listed in alphabetic order.

ScreenHeight. Name. Status. Description. CreationClassName.2.7Win32_DiskDrive Class The Win32_DiskDrive WMI class represents a physical disk drive as seen by a computer running the Windows operating system. DisplayType. MonitorType. InstallDate. ScreenWidth. PowerManagementCapabilities[].uint32 Boolean string string string uint16 Boolean string datetime Boolean uint32 string string string uint32 uint32 string uint16 Boolean uint32 uint32 string uint16 string string }. In some cases. LastErrorCode. The features of the disk drive seen through this object correspond to the logical and management characteristics of the drive. 3. PixelsPerXLogicalInch. a user connecting from a remote computer must have the SC_MANAGER_CONNECT privilege enabled to be able to enumerate this class. ConfigManagerUserConfig. Properties are listed in alphabetic order. ErrorDescription. SystemName. ConfigManagerErrorCode. PNPDeviceID. MonitorManufacturer. PixelsPerYLogicalInch. Any interface to a Windows physical disk drive is a descendent (or member) of this class. Syntax class Win32_DiskDrive : CIM_DiskDrive { 23 . Any object based on another logical device would not be a member of this class. The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. For security reasons. PowerManagementSupported. SystemCreationClassName. IsLocked. StatusInfo. this may not reflect the actual physical characteristics of the device. ErrorCleared. not MOF order. DeviceID.

NeedsCleaning. ErrorDescription. SCSILogicalUnit. CapabilityDescriptions[]. Size. InstallDate. CreationClassName. MaxMediaSize. Caption. MediaLoaded. BytesPerSector. Manufacturer. MaxBlockSize. ErrorCleared. Partitions. ErrorMethodology. PowerManagementCapabilities[]. Status. FirmwareRevision. Index. LastErrorCode. SCSIPort. CompressionMethod. SerialNumber. SCSITargetId. SectorsPerTrack. ConfigManagerUserConfig.uint16 uint32 uint16 string string string uint32 Boolean string uint64 string string Boolean string string string uint32 datetime string uint32 string uint64 uint64 Boolean string uint64 string string Boolean uint32 uint32 string uint16 Boolean uint32 uint16 uint16 uint16 uint32 string uint32 uint64 string uint16 string string Availability. DefaultBlockSize. DeviceID. NumberOfMediaSupported. Signature. Name. Capabilities[]. InterfaceType. ConfigManagerErrorCode. SCSIBus. Model. PNPDeviceID. PowerManagementSupported. SystemName. StatusInfo. MinBlockSize. SystemCreationClassName. MediaType. 24 . Description.

this class only returns an instance for the currently active operating system. Properties and methods are in alphabetic order. uint8 DataExecutionPrevention_SupportPolicy. TotalHeads. TotalCylinders. string Caption. string Description. boolean DataExecutionPrevention_32BitApplications.To get the single instance. string CountryCode. 25 . boolean Debug. Win32_OperatingSystem is a singleton class.uint64 uint32 uint64 uint64 uint32 }. The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. string CSName. string CSCreationClassName. and Windows 2000: If a computer has multiple operating systems installed. TotalTracks. boolean Distributed. Syntax class Win32_OperatingSystem : CIM_OperatingSystem { string BootDevice. string BuildType. Any operating system that can be installed on a computer that can run a Windows-based operating system is a descendent or member of this class. TotalSectors. sint16 CurrentTimeZone. string BuildNumber. Boolean DataExecutionPrevention_Available. 3. string CSDVersion. string CodeSet.2. string CreationClassName. Windows XP. use "@" for the key. Boolean DataExecutionPrevention_Drivers. Windows Server 2003. TracksPerCylinder. not MOF order.8Win32_OperatingSystem Class The Win32_OperatingSystem WMI class represents a Windows-based operating system installed on a computer.

PAEEnabled. SuiteMask. 26 . WindowsDirectory. FreeVirtualMemory. SystemDirectory. NumberOfLicensedUsers. ProductType. MUILanguages[]. OSType. MaxNumberOfProcesses. Organization. FreeSpaceInPagingFiles. FreePhysicalMemory. SizeStoredInPagingFiles. Locale. NumberOfUsers. ForegroundApplicationBoost. Manufacturer. OSArchitecture. MaxProcessMemorySize. Version. Status. TotalVisibleMemorySize. InstallDate. TotalVirtualMemorySize. OSProductSuite. ServicePackMinorVersion. NumberOfProcesses. PlusVersionNumber. TotalSwapSpaceSize. LocalDateTime. LargeSystemCache. OtherTypeDescription. SerialNumber. Primary. SystemDevice. EncryptionLevel. RegisteredUser. LastBootUpTime. SystemDrive. OSLanguage. ServicePackMajorVersion. OperatingSystemSKU. PlusProductID. Name.uint32 uint8 uint64 uint64 uint64 datetime uint32 datetime datetime string string uint32 uint64 string string uint32 uint32 uint32 uint32 string string uint32 uint32 uint16 string Boolean string string boolean uint32 string string uint16 uint16 uint64 string uint32 string string string uint64 uint64 uint64 string string }.

uint16 DomainRole. uint32 NumberOfLogicalProcessors. Syntax class Win32_ComputerSystem : CIM_UnitaryComputerSystem { uint16 AdminPasswordStatus. datetime InstallDate. uint32 NumberOfProcessors. string InitialLoadInfo. sint16 CurrentTimeZone.9Win32_ComputerSystem Class The Win32_ComputerSystem WMI class represents a computer system running Windows. Boolean NetworkServerModeEnabled. string Caption. string BootupState. string LastLoadInfo. string Model. Boolean BootROMSupported. uint16 FrontPanelResetStatus. The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. 27 . uint16 BootOptionOnLimit. Boolean AutomaticResetCapability. string Manufacturer. Boolean EnableDaylightSavingsTime. string Description. uint16 ChassisBootupState. Boolean DaylightInEffect. string NameFormat.2.3. uint16 KeyboardPasswordStatus. Boolean AutomaticResetBootOption. string CreationClassName. string DNSHostName. Boolean AutomaticManagedPagefile. string Name. string Domain. Boolean InfraredSupported. uint16 BootOptionOnWatchDog.

ThermalState. PowerManagementCapabilities[]. OEMStringArray[]. ResetCount. The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties are listed in alphabetic order. ResetLimit. Workgroup.uint8 string Boolean sint64 uint16 uint16 Boolean uint16 uint16 uint16 string string uint16 sint16 sint16 string string string uint16 string uint8 string uint16 uint64 string uint16 string }. PrimaryOwnerName. PowerOnPasswordStatus. PowerSupplyState. Syntax class Win32_PhysicalMemory : CIM_PhysicalMemory { string BankLabel. WakeUpType. PCSystemType. OEMLogoBitmap[]. PowerState. PauseAfterReset.2. PartOfDomain. UserName. SystemType. ResetCapability. uint64 Capacity. 3. SystemStartupDelay.10 Win32_PhysicalMemory Class The Win32_PhysicalMemory WMI class represents a physical memory device located on a computer system and available to the operating system. PowerManagementSupported. Status. 28 . SystemStartupOptions[]. Roles[]. TotalPhysicalMemory. not MOF order. SupportContactDescription[]. SystemStartupSetting. PrimaryOwnerContact.

InterleavePosition. Model. Name. FormFactor. Tag. Speed. HotSwappable. DataWidth. It is only way by which administrator user can interact with the system after verifying itself by providing authentication detail like username and password. InterleaveDataDepth.3 CLMS SERVER: CLMS server application is subordinate application of the CLMS client. Caption. TypeDetail. Replaceable. 3. CreationClassName. User can fires the query in the database to fetch the stored information through this application and can also check the log details of any changes and modification in the specific client node with time and other required information. SerialNumber. Description. OtherIdentifyingInfo. PartNumber. PoweredOn. Version. Removable. It provide a user interface to the administrator at server side to inspect any system configuration stored in the database by client application. DeviceLocator. InstallDate. PositionInRow. TotalWidth. MemoryType.string string uint16 string string uint16 Boolean Datetime uint16 uint32 string uint16 string string string string uint32 Boolean boolean boolean string string uint32 string string uint16 uint16 string }. 29 . Manufacturer. SKU. Status.

A flowchart is a picture of the separate steps of a process in sequential order.1 Overview Flow Chart:A flow chart is also called process flow Diagram. 30 .2 CLMS Architecture 4. Architecture 4.3.Fig.

a project plan. (Often the answers are “ yes” and “ no. More than one arrow goes out of the diamond.”) Delay or wait Link to another page or another flowchart. Decision based on a question. materials or services entering or leaving the process (inputs and outputs).Elements that may be included are: sequence of actions. Commonly Used Symbols in Detailed Flowcharts One step in the process. only one arrow goes out of the box. This is a generic tool that can be adapted for a wide variety of purposes. The process described can be anything: a manufacturing process. Direction of flow from one step or decision to another. each one showing the direction the process takes for a given answer to the question. decisions that must be made. Input or output Document Alternate symbols for start and end points FLOW CHART OF CLMS 31 . an administrative or service process. The same symbol on the other page indicates that the flow continues there. The question is written in the diamond. time involved at each step and/or process measurements. Usually. the step is written inside the box.

1 Flowchart of CLMS Client 32 .Fig 4.

when a user wants to run this application. he has to provide a text file which has a source program written in C++ language or has . This file may be stored anywhere in the memory.2FLOW CHART FOR CLMS SERVER Explanation: First of all. 33 .Fig4.cpp Extension.

It store the word in its memory and check the word from the rules defined already.cpp extension or not.Then this application will check or verify the source file either it has . It may be used to represent a system or application at any level of abstraction.To represent an external entity.The basic form of Data flow diagram also known as a data flow graph or a bubble chart.It represents a data store. Circle:.DFDs may be partitioned into levels that represent increasing information flow and functional detail. Keyword table contain all the keyword used in the program. Infact . Lexical analyser also generates lexical errors identification if present in the program. After verification if user wants to create tokens of our source program then he will send a command to the application through a button to create tokens. Arrow:. 34 . 4. It will remove all the white space and other comments also. Then this application scans the program character by character and create tokens in the form of tables.Then user can store them if he wants.It links one or more data items.2Data flow Diagram:A data flow diagram is a graphical representation that depicts information flow and the transforms that are applied as data move from input to output.Represent a process or transform that is applied to data or control and change it in some way. Symbols used in DFD Diagram: • • • • Rectangle:. This table contain all the information about the program like Symbol table contain all the symbols used in the program. Double line:.

A level 0 DFD is also called a fundamental system.It contains more information than Level 0 diagram. Only one bubble should be refined at a time.In this bubble. 35 .3 0-LEVEL DFD to the user. Explanation:. we show the process of CLMS System how it works on user demands. how it receive commands from user and how return output N A D M I N H A O D E # C L A R M E S D F E T C H D D E A T T A A I L B S A S E R D W E T A I L Fig 4.Here we use only a bubble as it is 0-level DFD.LEVEL -0 DFD DIAGRAMS OF CLMS: It should depict the entire system as single bubble along with all the related entities processing with the system. LEVEL -1 DFD DIAGRAM OF CLMS: Level 1 DFD diagram is the extended version of 0 level. It process on the node number and and obtains the desired result from the database and provides those information back to the admin .First of all user provide a Node number as input to the CLMS system.Level 0 is abstract level which use only one bubble.It provide information in compact form and just provides the basic idea regarding the working of different components involved in the system.Here we can use 5-6 bubbles to represent different process.

36 . This diagram is the extended version of 0 level DFD diagram.D A T A B A S E R C A D M E O I N E R E R Q F U I R E M S T A U U C S T E H L D O D E R E M E D T N N S # E A A T F M VE E & R IP F A Y S S W O R D I C A T I O N E T C H D E T A I L N Q D T U W E E A R S R T N O N E N I L U M B E R H A Fig4. Other is the stored Database Arrow represent the flow of data from one entity to process and from process to another. There are two entity here• • One is user who is the programmer having all the authorization of using the system. Data on the arrow gives the information about data means what type of data is flowing from one process to another or to entity.2 1-Level of DFD Diagram of CLMS SERVER Explanation:Here we use 2 bubble• • one is to represent CLMS process other is used to represent the verification process by system for user authentication .

e username and password. After authentication admin provides node number of the system whose hardware configuration information he requires. Labels with ovals represent the functions of the system.Use cases: Description of the set of actions that a system performs yielding an observable result to an actor. 2. CLMS Server (actor) then provides hardware detail of that specific node to the admin.when a user will run this application.It will represent in ovals. CLMS then checks the database for the hardware information of the required client node and fetch it from the database to put it in front of the admin. He has all the authority to run this application. 37 . A use diagram contains: 1.First of all. 4. Then user will provide a user name and password which will be verified by the CLMS from the database and if the information Then this application will open a application screen and demands for a node number of the client whose system information is required by the admin. it prompt user to provide user authentication to system. 3. Use case Diagram of CLMS:Here Admin is an actor who performs all the actions on this application. If log file is desired then CLMS provides log file.3 Use-case Diagram A use case diagram model the dynamic aspects of a system. When a user run this application it request for authentication i. Actors: Set of roles that user of use cases play when interacting with the use cases. Relationships between an actor and a use case is illustrated with a single line.

CLMS Client should fetch the complete required data properly and store them in a well defined manner in the database such that it is easily accessible by the server application.CLMS server should have user friendly GUI application screen so that the user can easily adapt with the working of the system and view of the screen provided by it should be well managed and easily 38 .5 USE –CASE DIAGRAM OF CLMS server 5 Designing of the CLMS 5.Fig 4. Comparison should be performed precisely so that a perfect log file of any update and modification can be tracted easily and accurately.1 Specific Requirements The designer would be specified with each and every aspect of the requirement demanded in the development of CLMS.

it will not work on any other operating system. • For CLMS application.Net framework. 39 . the users should have the knowledge of c# Language.3 Design and Implementation Constraints 1. • The user should have the knowledge of the computer hardware and there different attributes.Net Framework 3. 5. 5. • CLMS development requires a good knowledge of Operating System and WMI architecture of the windows. 2. 5. CLMS system requires SQLServer 2003/2005 installed on the server system.understandable. • The Computer in which this application is to be installed should be compatible with . CLMS is limited to work on Microsoft Windows Environment only.It should have well defined query attached with GUI components to obtain the correct data from the database without any error. CLMS requires System must have .2 User Characteristics User Category Sub Category Functionality USER PROGRAMMER A Programmer has all the administrative powers to run this application.4 Assumptions and Dependencies • The users have the basic knowledge of computer.

Textboxes etc.6 Interfaces In this application. CLMS requires System must have .• For the CLMS application. The Graphical user interface is very simple as it contain controls like Buttons. CLMS client will have no user interface since it doesnot require any inputs from user it just works to fetch information from operating system itself.5 Constraints 1. it will not work on any other operating system. the users should have the knowledge of developing a database using SQLServer 2003/2005 and mauplation language syntax of the database. Simple knowledge of Networking 5. CLMS system requires SQLServer 2003/2005 installed on the server system.CLMS server will have a user interface application screen through which a user will interact with the application and view the result of its query over the screen. CLMS is limited to work on Microsoft Windows Environment only. 40 . Data Log screen: It allows user to view the changes in any configuration of any system as recorded by the application. which makes GUI more user friendly. Login Screen: This is the login screen for users on client side & will be controlled by ILM Client running on client PC.Net Framework 3.Labels. User Management Screen: It allows admin to interact with system to view users information of any system node connected etc. 2. 5.

network card etc A CLMS CLIENT is capable of doing the following. A CLMS Server is capable of doing the following: • Interface between user and application. It will fetch information regarding processor.7 Product Functions The CLMS Client is scheduled application that is coded to executed the specific code in it to obtain the details of the hardware configuration of the system in whichit is running. Storing the fetched data into the database present at server. pointing device. Comparing the data sored in earlier saved file for any changes.1 Hardware Interfaces The application requires interfacing between server and client nodes.It is coded to obtain the queried data from the database and represent it over the management screen. Keyboard. motherboard.To establish interfacing among these system it requires any networking devices like switch or hub and lan wire to establish connection among these system. • • • • Fetching system Hardware configuration of the system at regular interval. Create a file of these information and stored them in the system.6. 5.5. The CLMS Server is interacting application that acts as interface between the user and the system using GUI application screen .2Software Interfaces CLMS system uses SQLserver 2005 to store and retrieve data and it uses executables file developed using Visual Studio 2008 on C# language 5.6. HDD. 41 .

8Design Methodology Waterfall model with feedback is being used for the development or the project. It provides the user friendly interface which is very easy to understand. This product is accomplished with the facility of user requirement.DataBase: 42 . It provides the various facilities to the user. Various phases of this model as shown in figure Figure: 5.1 This project is developed using C#. 6.• • Obtain the data store in database as per the user query Develop a synchronized log file that depicts the changes in any node 5.Net.6.

1 Login Screen 43 .1 CLMS Database Architecture 7.Master Database of CLMS have many tables in it .OUTPUT 7.Table architecture of the CLMS Database is shown in the below figure: Fig 6.

Login (button) Login Panel: .1 Login Screen This is the login screen of our application computer lab management system. It contains 1 button and two textboxes 1.Fig 7.In Login Panel Username and Password are provided by the user to login in the CLMS server application 44 .

45 . Node: When we click on the node button in the application. User: When we click on the user button in the application.7. Inventory: When we click on the inventory button in the application. a form will open from where admin can create the user for a specific lab. then it will show the information of the node number entered. then the manual update window will open and we can enter the data manually .2 User Management Screen: Fig7.2 User Management Screen Manual Update: When we click on the manual update button in the application. then it will show a form from where we can enter and see the inventory details of the lab..

46 . Manual Update Fig 7.7.3 LOG FORM Explanation:When we select a the manual update option form the previous form we will get the list of all the component we want to update and by clicking them we can get the list from the database and can update manually and then update the database.3 Log: When we click on the log button in the application. it will show the log detail of the node entered by the user..

4 Inventory Explanation: .When we click on the inventory button we will get this form opened where we will have two button of add and update from add we can add new item into the database and from the update we will update the existing data in the database.5 Inventory Update: 47 .7.4 Inventory: Fig 7. 7.

5 Inventory Update Explanation: .Fig 7. 48 .When we click on the update button in the inventory form this form will be opened and the data from the database is picked and we can modify the data and update by clicking on the update button.

7.6 Node Explanation: When we click on the node button. present on the main form then we will get the above form from which we can see the information about all the component of the node and by clicking on any one of them we can get the information which was stored on the database by the Clint application.6 Node: Fig 7. 49 .

7.7 Create User:

Fig 7.7 Create User Explanation:When we click on the add user button we get the above form by the help of which the admin can add the user to a specified node and can assign them the Password

8. Results:A console application is installed on the client side (node) which send all the information to the server database. A GUI application runs on the server from where we can see all the data and can modify the data.

9. Discussion:50

The purpose of discussion and audits is to specify that the evidence of work generated is adequate to ensure compliance with project and contract requirements. Audits with discussion will occur at the end of each phase. The discussion will be conducted by the supervisory committee prior to any baseline release of executable code. The discussion will ensure that: (1) The code has been tested and meets module specifications (2) That any changes to applicable software module design documents have been identified. (3) That appropriate validation tests have been run. (4) That the functionality of the baseline is documented. (5) That application design documentation complies with the plans and procedures. (6) That tools and techniques used to produce and validate the application are identified and controlled.

10. Application and Future Direction:CLMS is a project developed for the surveillance of computers in a computer lab. CLMS application can be implemented in the school as well as college lab where there is a need of keeping all the information about system configuration as this application maintains a database for the system hardware configuration.it can be also used for maintaining lab inventory. In future it can also be upgraded to keep vigilance of the system

11.Testing
11.1 Overview
Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. Software testing also provides an objective, independent view of the software to allow the business to appreciate and understand the risks at implementation of the software. Test techniques include, but are 51

not limited to, the process of executing a program or application with the intent of finding software bugs. Software testing was performed for validating and verifying that CLMS: • Meets the business and technical requirements that guided its design and

development; • • Works as expected; and Can be implemented with the same characteristics.

11.2Testing Methods
Following methods were proposed for testing Project CLMS

11.2.1Unit Testing
Unit testing is a software verification and validation method in which a programmer tests if individual units of source code are fit for use. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual function or procedure. Ideally, each test case is independent from the others: substitutes like method stubs, mock objects, fakes and test harnesses can be used to assist testing a module in isolation. Unit tests are typically written and run by software developers to ensure that code meets its design and behaves as intended. Its implementation can vary from being very manual (pencil and paper) to being formalized as part of build automation.

11.2.2Alpha Testing
Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site. Alpha testing is often employed for offthe-shelf software as a form of internal acceptance testing, before the software goes to beta testing.

52

Sometimes.3.3.3 Test Report 11. 11.1 API Test For testing the External APIs prototypes were created and regressively tested during the early life of the project.3Beta Testing Beta testing comes after alpha testing. Both the APIs were found correct and performed the functions for which they were used without any error.2 Unit Tests Visual Studio 2008's Inbuilt unit testing features were used for Unit testing. 11. The details of all the test cases and input data are beyond the scope of this document. Results of the tests are summarized bellow Functions Under Unit Testing – 32 Success in First Round – 24 Failure in First Round – 8 Bugs Found after First Round – 6 Bugs Corrected After first Round – 6 Success in Second Round – 29 Failure in Second Round – 3 Bugs Found in Second Round – 1 Bugs Corrected – 1 53 . The software is released to groups of people so that further testing can ensure the product has few faults or bugs. are released to a limited audience outside of the programming team. Versions of the software. beta versions are made available to the open public to increase the feedback field to a maximal number of future users. known as beta versions.2. A test project was made for the Project CLMS and all the important functions were subjected to Unit Testing.11.

The enviroment for Alpha testing was as follows • CPU • • • • RAM • • 2.x64 Clock . CLMS was found to fulfill all the functional/non-functional requirements mentioned in Software Requirement Specifications V1.5 SP1 The software worked as per the requirements under above conditions no exceptional CPU/RAM/Network use was found.NET Framework 3.AMD Turion Architecture .NET Framework • .1 Ghz Operating System • Microsoft Vista Home Premium • . The system behaved normally.3.3 Alpha Test After the Unit testing the software was subjected to Alpha testing.3 GB Family .Success in Third Round – 32 Failure in Third Round – 0 Total Rounds of Testing – 3 Total Bugs – 8 Resurfacing Bugs – 1 (In second and First round) Final Success – 100% 11.0[SRS].2. Following were the Systems stats under load conditions CPU Use – 17% 54 .

conn).Persist Security Info=True. else } #endregion //Main Function static void Main(string[] args) { Console. if (reader.Initial Catalog=CLMS.ExecuteReader(). namespace ConsoleApplication3 { class Program { //Node Validation #region Valid public static Boolean Valid(int node) { SqlConnection conn = new SqlConnection(). ManagementScope ms = new ManagementScope("\\\\localhost".Sql.Read()) return true.Password=dell".Open(). ConnectionOptions con = new ConnectionOptions().ToInt32(Console.Data.RAM Use – 46 MB Under normal Run. con). using System. conn.Data. string sqlstring = "Select Nodevalue from Node where Nodevalue='" + node + "'". SqlCommand comm = new SqlCommand(sqlstring. int node = Convert. using System. SqlDataReader reader = comm.ReadLine()). return false. using System. Following were the system statsCPU Use – 8% RAM Use – 34 MB 12. conn. using System. using System.Management.Text.WriteLine("Assign a Node Number to the System").User ID=sa.SqlClient. Source Code of CLMS Client: using System.ConnectionString = "Data Source=.. .Generic.Collections. 55 .

'" + mo["Model"] + "'.ReadLine().SqlConnection conn = new SqlConnection(). ManagementObjectCollection moc = mos. cmd.ReadLine().Name.Open(). oq). update(node). Console.'" + mo["Manufacturer"] + "'.ExecuteNonQuery(). conn). conn). mo["Manufacturer"]). } #endregion #region Processor //Processor Query { 56 .Get().WriteLine("WorkGroup :{0}".User ID=sa. Console.'" + mo["WorkGroup"] + "'.ExecuteNonQuery(). Console.WriteLine("UserName :{0}". } else { SqlCommand cmd = new SqlCommand("insert into Node(Nodevalue) values ('" + node + "')". Console. conn. ManagementObjectSearcher mos = new ManagementObjectSearcher(ms. conn.WriteLine("Name :{0}".'" + mo["Name"] + "'. } #region ComputerSystem ObjectQuery oq = new ObjectQuery("select *from Win32_ComputerSystem").WriteLine("THIS NODE IS PRESENT IN THE NETWORK ").WriteLine("**************Computer System*****************\n").Model. SqlCommand cmd = new SqlCommand("insert into ComputerSystem (Node.ConnectionString = "Data Source=. mo["TotalPhysicalMemory"]).Username.WriteLine("TotalPhysicalMemory:{0}". mo["Model"]). mo["WorkGroup"]). Console.Password=dell".WriteLine("Model :{0}". Console. Boolean result = Valid(node).Initial Catalog=CLMS. mo["UserName"]).'" + mo["Username"] + "'." + mo["TotalPhysicalMemory"] + ")".Workgroup. Console.. mo["Name"]). Console.Manufacturer. cmd.Persist Security Info=True. if (result == true) { Console.WriteLine("Manufacturer :{0}".TotalPhysicalMemory) values ('" + node + "'. foreach (ManagementObject mo in moc) { Console.

mos = new ManagementObjectSearcher(ms.'" + mo["Description"] + "'.Description.ProcessorID. mos = new ManagementObjectSearcher(ms.ExecuteNonQuery(). Console.WriteLine("MaxClockSpeed :{0}". mo["Status"]). Console.Get(). moc = mos. mo["Manufacturer"]).ProcessorType.'" + mo["Family"] + "'. Console.Name. Console. foreach (ManagementObject mo in moc) { Console. Console.'" + mo["Architecture"] + "'. conn).WriteLine("Name Console.WriteLine("Status :{0}".'" + mo["ProcessorType"] + "'. mo["Model"]).'" + mo["Manufacturer"] + "'. mo["Name"]).WriteLine("NumberOfCores :{0}".WriteLine("Manufacturer Console. mo["Description"]). Console.'" + mo["Status"] + "')".'" + mo["NumberOfCores"] + "'.WriteLine("Name :{0}". 57 . Console. Console. mo["Manufacturer"]). oq).'" + mo["ProcessorID"] + "'.MaxClockSpeed. mo["Family"]).UniqueID.'" + mo["MaxClockSpeed"] + "'.WriteLine("UniqueID :{0}". } #endregion #region PhysicalMemory //HARDDRIVE QUERY oq = new ObjectQuery("select *from Win32_PhysicalMemory").oq = new ObjectQuery("select *from Win32_Processor"). :{0}".Get(). mo["Architecture"]).NumberOfCores. mo["Name"]). foreach (ManagementObject mo in moc) { Console.WriteLine("Family :{0}".WriteLine("ProcessorID :{0}". moc = mos. SqlCommand cmd = new SqlCommand("insert into Processor(Node. mo["maxClockSpeed"]). cmd.'" + mo["Name"] + "'. Console. Console.'" + mo["UniqueID"] + "'.ReadLine().WriteLine("**************Physical Memory***********************\n").WriteLine("Model :{0}". Console. mo["ProcessorType"]).WriteLine("Description :{0}".WriteLine("**************PROCESSOR INFO*****************\n").Arch itecture.Family.WriteLine("Architecture :{0}".WriteLine("ProcessorType :{0}".Manufacturer. Console.WriteLine("Manufacturer :{0}". :{0}". oq). mo["NumberOfCores"]).Status) values ('" + node + "'. mo["UniqueID"]). Console. mo["ProcessorID"]).

'" + mo["Manufacturer"] + "'.WriteLine("AdapterType mo["AdapterType"]). mo["TypeDetail"]).'" + mo["InstallDate"] + "'. conn). foreach (ManagementObject mo in moc) { int a = Convert.ToInt32(mo["DeviceID"]). :{0}". :{0}". if (a == 4) { Console. cmd.mo["SerialNumber"]). :{0}". :{0}".'" + mo["Speed"] + "'. :{0}". //Console. :{0}".'" + mo["Name"] + "'. moc = mos.WriteLine("Speed Console. mo["Descripition"]).WriteLine("{0}". mo["Manufacturer"]). :{0}". mo["Name"]). :{0}". mo["MACAddress"]). mo["Speed"]).Get().WriteLine("SerialNumber Console. :{0}". Console. mo["Description"]). :{0}". mo["DeviceID"]). oq). mo[""]).WriteLine("Status Console.'" + mo["Model"] + "'.'"+mo["TypeDetail"]+"')". mo["Status"]).WriteLine("Manufacturer Console. mo["ProductName"]). :{0}".'" + mo["SerialNumber"] + "'.'" + mo["Capacity"] + "'. mo["InstallDate"]). :{0}".WriteLine("DeviceID Console. :{0}".WriteLine("Description Console.WriteLine("InstallDate Console. SqlCommand cmd = new SqlCommand("insert into PhysicalMemory values ('" + node + "'. mo["InstallDate"]).WriteLine("ProductName :{0}".WriteLine("Description Console.WriteLine("Capacity Console. mo["Capacity"]). mos = new ManagementObjectSearcher(ms. //Console.ReadLine().WriteLine("Name Console. } #endregion #region NetworkCard ////Network CARD oq = new ObjectQuery("select *from Win32_NetworkAdapter\n").WriteLine("MACAddress Console.WriteLine("**************NETWORK CARD********************\n").WriteLine("TypeDetail :{0}".ExecuteNonQuery(). 58 .WriteLine("InstallDate Console. Console. Console.

Console.WriteLine("ScreenHeight mo["ScreenHeight"]).WriteLine("DisplayType mo["DisplayType"]).'" + mo["InstallDate"] + "')".ReadLine().ReadLine(). cmd.Get(). Console. SqlCommand cmd = new SqlCommand("insert into DesktopMonitor(Node. mo["InstallDate"]). oq).Status.'" + mo["Status"] + "'.WriteLine("**************DESKTOP MONITOR********************\n"). foreach (ManagementObject mo in moc) { Console.MonitorType.WriteLine("Name mo["Name"]).MACAddress. Console. moc = mos.WriteLine("InstallDate :{0}". } } #endregion #region DesktopMonitor //DESKTOP MONITOR oq = new ObjectQuery("select *from Win32_DesktopMonitor"). 59 . Console. cmd.WriteLine("MonitorManufacturer mo["MonitorManufacturer"]).WriteLine("MonitorType mo["MonitorType"]).DeviceID. Console.ExecuteNonQuery(). :{0}".'" + mo["ScreenWidth"] + "'.MonitorManufacturer. SqlCommand cmd = new SqlCommand("insert into NetworkAdapter(Node.WriteLine("ScreenWidth mo["ScreenWidth"]). conn). :{0}".ExecuteNonQuery().'" + mo["DisplayType"] + "')".'" + mo["MonitorType"] + "'.DisplayType) values ('" + node + "'. :{0}".'" + mo["MonitorManufacturer"] + "'. InstallDate) values ('" + node + "'. } #endregion #region OperatingSystem //OPERATING SYSTEM oq = new ObjectQuery("select *from Win32_OperatingSystem").'" + mo["Name"] + "'.'" + mo["Name"] + "'.ScreenW idth.'" + mo["ScreenHeight"] + "'.'" + mo["MACAddress"] + "'. Console.AdapterType. :{0}". oq). mos = new ManagementObjectSearcher(ms. Console. conn). mos = new ManagementObjectSearcher(ms.Console. :{0}".Manufacturer. Console.Name.'" + mo["Manufacturer"] + "'.ScreenHeight.'" + mo["AdapterType"] + "'.Name.'" + mo["DeviceID"] + "'. :{0}".

mo["Name"]). Console.WriteLine("Name Console. moc = mos.Layout. mo["Layout"]). :{0}".'" + mo["Version"] + "'. Console. mo["Manufacturer"]).WriteLine("OSType Console. SqlCommand cmd = new SqlCommand("insert into OperatingSystem(Node.WriteLine("Description Console. :{0}".NumberOfFunctionKeys. mo["WindowsDirectory"]).Description.OSType.WriteLine("**************KeyBoard**************** ****\n").WriteLine("Manufacturer Console.Get(). mo["InstallDate"]). Console.WriteLine("Version :{0}". mo["InstallDate"]). Console.InstallDate 60 . :{0}".ReadLine(). Console. mo["Description"]). cmd.WriteLine("Status :{0}".'" + mo["OSType"] + "'. mo["Status"]). foreach (ManagementObject mo in moc) { Console. foreach (ManagementObject mo in moc) { Console. SqlCommand cmd = new SqlCommand("insert into KeyBoard(Node.ReadLine(). } #endregion #region KeyBoard //KeyBoard oq = new ObjectQuery("select *from Win32_KeyBoard"). :{0}".WriteLine("**************OPERATING SYSTEM********************\n").moc = mos. Console.Name.WriteLine("InstallDate :{0}".Manufacturer.Status.WriteLine("WindowsDirectory :{0}".Instal lDate) values ('" + node + "'.WriteLine("Name Console.Get(). Console.'" + mo["InstallDate"] + "')". mo["OSType"]).WriteLine("NumberOfFuctionKeys :{0}".Name. Console.'" + mo["Name"] + "'. mo["Name"]). conn).ExecuteNonQuery().WriteLine("InstallDate :{0}". Console.Version. mo["NumberOfFunctionKeys"]). :{0}". mo["Version"]).'" + mo["Manufacturer"] + "'. mos = new ManagementObjectSearcher(ms. oq).'" + mo["WindowsDirectory"] + "'.WindowsDirectory.WriteLine("Layout :{0}".

Console.'" + mo["Status"] + "'. mo["Name"]). cmd. SqlCommand cmd = new SqlCommand("insert into PointingDevice(Node. Console. mo["Manufacturer"]).ExecuteNonQuery().WriteLine("HardwareType :{0}". Console. oq).'" + mo["Name"] + "'.Get().'" + mo["InstallDate"] + "')".Name.'" + mo["Status"] + "'.Status.NumberOfButtons. mo["DeviceInterface"]). foreach (ManagementObject mo in moc) { 61 . moc = mos. } #endregion #region PointingDevice //PointingDevice oq = new ObjectQuery("select *from Win32_PointingDevice"). Console. mos = new ManagementObjectSearcher(ms.ExecuteNonQuery(). cmd. Console. mo["InstallDate"]).HardwareType.'" + mo["Layout"] + "'.'" + mo["PointingType"] + "'. Console. } #endregion #region CDROMDrive //CDROMDrive oq = new ObjectQuery("select *from Win32_CDROMDrive").'" + mo["Description"] + "'.WriteLine("NumberOfButtons :{0}". conn). conn).WriteLine("**************PointingDevice********** **********\n"). oq). mo["Status"]).'" + mo["Name"] + "'. mos = new ManagementObjectSearcher(ms.'" + mo["Manufacturer"] + "'.WriteLine("Name Console.'" + mo["NumberOfButtons"] + "'.WriteLine("Manufacturer :{0}".'" + mo["DeviceInterface"] + "'.) values ('" + node + "'.Manufacturer.InstallDate) values ('" + node + "'. Console.Dev iceInterface.Get().'" + mo["NumberOfFunctionKeys"] + "'.WriteLine("Status :{0}". mo["NumberOfButtons"]).WriteLine("DeviceInterface :{0}".WriteLine("PointingType :{0}".WriteLine("InstallDate :{0}". mo["HardwareType"]). Console.'" + mo["InstallDate"] + "')". moc = mos.'" + mo["HardwareType"] + "'.PointingType. :{0}".ReadLine(). mo["PointingType"]). foreach (ManagementObject mo in moc) { Console.

//Console.Manufacturer. oq).WriteLine("Name Console.WriteLine("SCSIPort :{0}". mo["TotalPhysicalMemory"]). SqlCommand cmd = new SqlCommand("insert into PComputerSystem 62 .WriteLine("Manufacturer Console.InstallDate) values ('" + node + "'.WriteLine("Model :{0}". //SqlCommand cmd = new SqlCommand("insert into CDROMDrive(Node. conn).WriteLine("WorkGroup :{0}".Initial Catalog=CLMS. //cmd.WriteLine("UserName :{0}". :{0}". mo["Name"]).ReadLine(). conn.User ID=sa.ReadLine().ExecuteNonQuery(). :{0}". //Console.'" + mo["Manufacturer"] + "'. //Console. mo["Model"]).Name. //Console.***\n"). mo["Manufacturer"]). //Console. //Console. mo["Manufacturer"]). ManagementScope ms = new ManagementScope("\\\\localhost". mo["UserName"]). Console.Get(). #region ComputerSystem ObjectQuery oq = new ObjectQuery("select *from Win32_ComputerSystem"). :{0}". SqlConnection conn = new SqlConnection(). mo["SCSIPort"]).WriteLine("**************Computer System*****************\n").Open().WriteLine("Manufacturer :{0}".WriteLine("InstallDate Console. conn.Password=dell". ManagementObjectSearcher mos = new ManagementObjectSearcher(ms.ConnectionString = "Data Source=.'" + mo["InstallDate"] + "')". mo["Name"]). Console.WriteLine("TotalPhysicalMemory:{0}".WriteLine("Name :{0}".'" + mo["Name"] + "'. mo["WorkGroup"]). } #endregion } } static void update(int node) { ConnectionOptions con = new ConnectionOptions(). //Console.SCSIPort. con).WriteLine("**************CDROMDRIVE************** Console. foreach (ManagementObject mo in moc) { //Console. ManagementObjectCollection moc = mos." + mo["SCSIPort"] + ".Persist Security Info=True. mo["InstallDate"])..

dwg="".ToString(). string Man = mo["Manufacturer"]. conn).'" + mo["Manufacturer"] + "'. } else { //reader. dMod="".Read()) { dname = reader[1].TotalPhysicalMemory) values ('" + node + "'.ToString().Close(). dMod = reader[3]. SqlDataReader reader.ToString(). dwg = reader[4].Workgroup.WriteLine(dMan).ExecuteReader().Manufacturer. string tpm = mo["TotalPhysicalMemory"].ToString()." + mo["TotalPhysicalMemory"] + ")".WriteLine("no change"). dun = reader[5].ExecuteNonQuery(). cmd1.ExecuteNonQuery(). string sqlstring. conn).ToString().WriteLine(Man). dun="". cmd.ToString(). dtpm = reader[6]. dMan="". Console.'" + mo["WorkGroup"] + "'. node +" ". if ((name == dname) )//&& (Man == dMan)) && (dMod == Mod)&& (dwg == wg) && (dun == un) && (dtpm == tpm)) { Console.Close().'" + mo["Model"] + "'.'" + mo["Username"] + "'. dtpm="". Console. dMan = reader[2].'" + mo["Name"] + "'.Model. } 63 . string un = mo["UserName"]. reader = comm.Username. SqlCommand cmd1 = new SqlCommand("insert into LogTable values ('" + node + "'.WriteLine("Change exist"). string name = mo["Name"].'" + Detail + "'. while (reader. string time = "System Time". sqlstring = "Select *from ComputerSystem where Node= "+ SqlCommand comm = new SqlCommand(sqlstring. string string string string string string dname="".Name. string Detail = "Processor is updated".ToString(). string wg = mo["WorkGroup"].ToString(). Console.ToString().ToString(). string Mod = mo["Model"].'" + time + "')".ToString().ToString().(Node. } reader. conn).

#endregion } } } } 13.Refernces: 64 .

com 65 .com www. C# premier written by STANLEY B.msdn.Kroth BLACK BOOK OF .dotnetspider.NET NIIT courseware Websites: • • • • • www.com www.devdevelopers.com www.codeproject.Books: Object Oriented Programming with C++ written by E BALAGURUSAMY.com www.LIPPMAN DataBase Management by H.c#corner.

Sign up to vote on this title
UsefulNot useful