Jump to content

PC Builders Console


ken82m
 Share

Recommended Posts

I use this tool when building computers

It can quickly check windows parameter and checks program versions for many applications.

The installers can then be called right from the console if needed.

It definitely lets speed through building a machine

Here are a few examples of what I have it doing:

Setting file and reg permissions

Modifying the local security policy

Adjusting local admin groups

Displaying installed versions and Call application installers

Retrieve machine mfg,model and S/N

__PC_Quality_Control_Check.rar

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

  • 11 months later...

WOW this sounds cool, I build and repair computers for a living, can someone PLEASE update this. It's not working....

THANKS

I updated the code :

; ----------------------------------------------------------------------------
; AutoIt Version: 3.1.0
; Author:         Kenneth P. Morrissey <kmorrissey@cooperwiringdevices.com>
;
; Script Function:
;   Checks standard security and software on CWD PC's
; ----------------------------------------------------------------------------
;Include Built in file required for GUI Functions
#include <GuiConstants.au3>
#include <GuiConstantsEx.au3>
#Include <WindowsConstants.au3>
#Include <StaticConstants.au3>

; Change to GUI OnEvent mode
Opt("GUIOnEventMode", 1) 

;Start Process Command Line Parameters if any and determine run mode (User or Admin)
$IsAdmin = IsAdmin()
$Start = 1

;Declare Vars
Global $Start, $QCFailed, $MFG, $MDL, $SN, $CPU, $CPUSPEED, $RAM, $VIDEO, $SAV, $SAP, $JRE, $Adobe, $Webex, $Shockwave, $Flash, $PCA, $SUS, $RDP
Global $PERMS, $PageSTS, $PageMIN, $PageMAX, $AdminGroup, $GRDP, $GNET, $AdminPass, $RASC, $Printer, $CA, $SCAN, $MINITAB, $DVD, $Office, $Visio, $Project
;GUI Windows
Global $mainwindow, $OfficeGUI
;Buttons
Global $Buttons[27]
$Buttons[0] = 26
Global $OfficeBTN1
Global $OfficeBTN2
;Labels
Global $Labels[75]
$Labels[0] = 74

If $CMDLine[0] > 0 Then
    If $CMDLine[1] = "/u" OR $CMDLine[1] = "/user" Then 
        User()
        Exit
    EndIf
    If $CMDLine[1] = "/a" OR $CMDLine[1] = "/admin" OR $CMDLine[1] = "/administrator" Then
        If $IsAdmin() = 1 Then
            Admin()
            Exit
        Else
            MsgBox(4096,"Predeployment QC Failed", "This tool cannot be run in administration mode." & @CR & "Current user does not have administive privelages.")
            Exit
        EndIf
    EndIf
    If $CMDLine[1] = "/?" Then 
        MsgBox(4096, "Predeployment QC Failed", "This tool will automatically decide to use User Mode or Admin Mode based on the current user rights." & @CR & @CR & "This can be overridden with the following switches:" & @CR & "/a  or  /admin  - force tool into Admin Mode (requires administrative privileges)" & @CR & "/u  or  /user    - force tool into User Mode")
        Exit
    EndIf
    MsgBox(4096, "Predeployment QC Failed", "Invalid Command Line Parameters")
    Exit
Else
    If $IsAdmin() = 1 Then 
        Admin()
    Else
        User()
    EndIf
EndIf

;-------------------------------------------------------
;Start Custom Functions

Func User ()
MsgBox(4096,"PC Quality Control Check", "       User Mode       ")
EndFunc

Func Admin ()
;Admin mode for script
;Retrieve System Info
ProgressOn("PC Quality Control Check", "Retrieving System Information", "", -1, -1)
ProgressSet(20)
SYSINFO()
CrtAdminGUI()
; Set GUI On Event Parameters
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUICtrlSetOnEvent($Buttons[25], "RefreshAll")
GUICtrlSetOnEvent($Buttons[1], "EnableRDP")
GUICtrlSetOnEvent($Buttons[3], "ChgPageFile")
GUICtrlSetOnEvent($Buttons[4], "ChgAdminPass")
GUICtrlSetOnEvent($Buttons[5], "FixAdmGrp")
GUICtrlSetOnEvent($Buttons[6], "FixRDPGrp")
GUICtrlSetOnEvent($Buttons[7], "FixNETGrp")
GUICtrlSetOnEvent($Buttons[8], "InstSAV")
GUICtrlSetOnEvent($Buttons[9], "InstJRE")
GUICtrlSetOnEvent($Buttons[10], "InstSAP")
GUICtrlSetOnEvent($Buttons[11], "InstAcrobat")
GUICtrlSetOnEvent($Buttons[12], "InstWebex")
GUICtrlSetOnEvent($Buttons[13], "InstShockwave")
GUICtrlSetOnEvent($Buttons[14], "InstFlash")
GUICtrlSetOnEvent($Buttons[15], "InstPCAny")
GUICtrlSetOnEvent($Buttons[16], "RefreshSYS")
GUICtrlSetOnEvent($Buttons[17], "RefreshAPP")
GUICtrlSetOnEvent($Buttons[18], "InstCA")
GUICtrlSetOnEvent($Buttons[19], "InstSCAN")
GUICtrlSetOnEvent($Buttons[20], "InstMINITAB")
GUICtrlSetOnEvent($Buttons[21], "InstDVD")
GUICtrlSetOnEvent($Buttons[22], "InstOffice")
GUICtrlSetOnEvent($Buttons[23], "InstVisio")
GUICtrlSetOnEvent($Buttons[24], "InstProject")
GUICtrlSetOnEvent($Buttons[26], "PrintAdmin")
;Initial Scan
RefreshAll()
$Start = 0
;Activate GUI Window / While statement just idles the program to keep it running due to GUIOnEventMode
GUISetState(@SW_SHOW, $mainwindow)
While 1
    Sleep(1000)
WEnd
EndFunc

Func PrintAdmin ()
FileDelete(@ScriptDir & "\ScreenShot.jpg")
$array = WinGetPos("CWD ITS Department - PC Quality Control Check")
DllCall("captdll.dll", "int", "CaptureRegion", "str", "ScreenShot.jpg", "int", $array[0], "int", $array[1], "int", $array[2], "int", $array[3], "int", 85)
RunWait(@COMSPEC & ' /c rundll32.exe ' & @SystemDir & '\mshtml.dll,PrintHTML "' & @ScriptDir & "\ScreenShot.jpg", @TempDir, @SW_HIDE)
FileDelete(@ScriptDir & "\ScreenShot.jpg")
EndFunc

Func InstCA ()
RunWait(@ComSpec & ' /c "net use O: \\fileserver1\workgroups\ITS\operations /persistent:no"', @SystemDir, @SW_HIDE)
Run("O:\Programs\IBM\Client Access\V5R2\Setup Files\SETUP.EXE", "o:\Programs\IBM\Client Access\V5R2\Setup Files\")
EndFunc

Func InstSCAN ()
RunWait(@ComSpec & ' /c "net use O: \\fileserver1\workgroups\ITS\operations /persistent:no"', @SystemDir, @SW_HIDE)
Run("o:\Programs\Canon\Scanner\disk1\Setup.exe", "o:\Programs\Canon\Scanner\disk1\")
EndFunc

Func InstMINITAB ()
Run('msiexec /i "\\ptcdc\packages$\MiniTab\MiniTab14.msi"', @SystemDir)
EndFunc

Func InstDVD ()
RunWait(@ComSpec & ' /c "net use O: \\fileserver1\workgroups\ITS\operations /persistent:no"', @SystemDir, @SW_HIDE)
Run("o:\Programs\Power DVD 5.5 for Dell Machines\Setup Files\Setup.exe", "o:\Programs\Power DVD 5.5 for Dell Machines\Setup Files\")
EndFunc

Func InstOFFPRO ()
Run('\\fileserver1\o2k\pro\setup.exe transforms="\\fileserver1\o2k\pro\cdrive.mst" /qb+', "\\fileserver1\o2k\pro\")
OfficeClose()
MsgBox(4096,"", "Setup Started")
EndFunc

Func InstOFFSTD ()
Run('\\fileserver1\o2k\std\setup.exe transforms="\\fileserver1\o2k\std\cdrive.mst" /qb+', "\\fileserver1\o2k\std\")
OfficeClose()
MsgBox(4096,"", "Setup Started")
EndFunc

Func InstOffice ()
GUISetState(@SW_SHOW, $OfficeGUI)
EndFunc

Func OfficeClose ()
GUISetState(@SW_HIDE, $OfficeGUI)
EndFunc

Func InstVisio ()
RunWait(@ComSpec & ' /c "net use O: \\fileserver1\workgroups\ITS\operations /persistent:no"', @SystemDir, @SW_HIDE)
Run("O:\Programs\Microsoft\Visio 2K Std\Setup.exe", "O:\Programs\Microsoft\Visio 2K Std")
EndFunc

Func InstProject()
RunWait(@ComSpec & ' /c "net use O: \\fileserver1\workgroups\ITS\operations /persistent:no"', @SystemDir, @SW_HIDE)
Run("O:\Programs\Microsoft\Project 2000 Std - No CD Key\Setup.exe", "O:\Programs\Microsoft\Project 2000 Std - No CD Key")
EndFunc

Func InstPCAny ()
RunWait(@ComSpec & ' /c "net use O: \\fileserver1\workgroups\ITS\operations /persistent:no"', @SystemDir, @SW_HIDE)
Run("o:\Programs\Symantec\PC Anywhere\PCAnywhere 11\setup.exe", "o:\Programs\Symantec\PC Anywhere\PCAnywhere 11\")
EndFunc

Func InstFlash ()
Run('msiexec /i "\\fileserver1\Workgroups\ITS\Operations\Programs\Macromedia Players - MSI Packages\install_flash_player_active_x.msi"', @SystemDir)
EndFunc

Func InstShockwave ()
Run('msiexec /i "\\fileserver1\Workgroups\ITS\Operations\Programs\Macromedia Players - MSI Packages\shockwave_lic_full_installer.msi"', @SystemDir)
EndFunc

Func InstWebex ()
Run('msiexec /i "\\ptcdc\packages$\Webex\1-27-06\atmcie.msi"', @SystemDir)
EndFunc

Func InstAcrobat ()
Run("\\ptcdc\packages$\Adobe Acrobat Reader 7.0.5\setup.exe", "\\ptcdc\packages$\Adobe Acrobat Reader 7.0.5")
EndFunc

Func InstSAP ()
Run("\\DEATHSTAR\SAP\EBSUpgrade.exe", "\\DEATHSTAR\SAP")
EndFunc

Func InstJRE ()
Run('msiexec /i "\\ptcdc\packages$\JRE\Java 2 Runtime Environment, SE v1.4.2.msi"', @SystemDir)
EndFunc

Func InstSAV ()
Run("\\deathstar\VPHOME\CLT-INST\WIN32\Setup.exe", "\\deathstar\VPHOME\CLT-INST\WIN32")
EndFunc

Func FixNETGrp ()
RunWait(@ComSpec & ' /c net localgroup Network Configuration Operators "CWD\Domain Users" /ADD', @SystemDir, @SW_HIDE)
RefreshSYS()
EndFunc

Func FixRDPGrp ()
RunWait(@ComSpec & ' /c net localgroup Remote Desktop Users "CWD\Domain Users" /ADD', @SystemDir, @SW_HIDE)
RefreshSYS()
EndFunc

Func FixAdmGrp ()
RunWait(@ComSpec & ' /c net localgroup administrators "CWD\Junior Admins" /ADD', @SystemDir, @SW_HIDE)
RunWait(@ComSpec & ' /c net localgroup administrators "CWD\Domain Admins" /ADD', @SystemDir, @SW_HIDE)
RefreshSYS()
EndFunc

Func ChgAdminPass ()
RunWait(@ComSpec & ' /c net user administrator "a1s2d3f4g5"', @SystemDir, @SW_HIDE)
RefreshSYS()
EndFunc

Func ChgPageFile ()
$Page = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "PagingFiles")
$page = StringReplace($page, $PageMin, "3000")
$page = StringReplace($page, $PageMax, "3000")
RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "PagingFiles", "REG_MULTI_SZ", $Page)
RefreshSYS()
EndFunc

Func EnableRDP ()
RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server", "fDenyTSConnections", "REG_DWORD", 0)
RefreshSYS()
EndFunc

Func RefreshAll()
GUISetState(@SW_DISABLE)
If $Start = 0 Then ProgressOn("PC Quality Control Check", "", "", -1, -1, 1)
ProgressSet(50, "", "Retrieving Application Settings")
SoftwareCheck()
UPDSoft()
ProgressSet(75, "", "Retrieving Windows Settings")
SystemCheck()
UpdSYS()
ProgressOff()
GUISetState(@SW_ENABLE)
EndFunc

Func RefreshAPP ()
GUISetState(@SW_DISABLE)
If $Start = 0 Then ProgressOn("PC Quality Control Check", "Retrieving Application Settings", "", -1, -1, 1)
ProgressSet(70)
SoftwareCheck()
UPDSoft()
ProgressOff()
GUISetState(@SW_ENABLE)
EndFunc

Func RefreshSYS ()
GUISetState(@SW_DISABLE)
If $Start = 0 Then ProgressOn("PC Quality Control Check", "Retrieving Windows Settings", "", -1, -1, 1)
ProgressSet(70)
SystemCheck()
UpdSYS()
ProgressOff()
GUISetState(@SW_ENABLE)
EndFunc

Func UPDSoft ()
GUICtrlSetData($Labels[43], $SAV)
GUICtrlSetData($Labels[45], $JRE)
GUICtrlSetData($Labels[47], $SAP)
GUICtrlSetData($Labels[49], $Adobe)
GUICtrlSetData($Labels[51], $Webex)
GUICtrlSetData($Labels[53], $Shockwave)
GUICtrlSetData($Labels[55], $Flash)
GUICtrlSetData($Labels[57], $PCA)
GUICtrlSetData($Labels[59], $CA)
GUICtrlSetData($Labels[61], $SCAN)
GUICtrlSetData($Labels[63], $MINITAB)
GUICtrlSetData($Labels[65], $DVD)
GUICtrlSetData($Labels[67], $Office)
GUICtrlSetData($Labels[69], $Visio)
GUICtrlSetData($Labels[71], $Project)
EndFunc

Func UpdSYS ()
GUICtrlSetData($Labels[20], $RDP)
GUICtrlSetData($Labels[22], $PERMS)
GUICtrlSetData($Labels[24], $SUS)
GUICtrlSetData($Labels[26], $PageSTS & "            Min- " & $PageMIN & "    Max- " & $PageMax)
GUICtrlSetData($Labels[28], $AdminPass)
GUICtrlSetData($Labels[30], $AdminGroup)
GUICtrlSetData($Labels[32], $GRDP)
GUICtrlSetData($Labels[34], $GNET)
GUICtrlSetData($Labels[36], $RASC)
EndFunc

Func SYSINFO ()
$QCFailed = ""
;Machine Inventory
RunWait(@comspec & ' /c psinfo.EXE | clipboard.exe', @ScriptDir, @SW_HIDE)
$PSInfo = ClipGet()
$PSInfo1 = StringInStr($PSInfo, "Processor Speed:")
$PSInfo1 = $PSInfo1 - 1
$PSInfo = StringTrimLeft($PSInfo, $PSInfo1)
$PSInfo = StringReplace($PSInfo, "Processor speed:           ", "")
$PSInfo = StringReplace($PSInfo, "Processor type:            ", "")
$PSInfo = StringReplace($PSInfo, "Physical memory:           ", "")
$PSInfo = StringReplace($PSInfo, "Video driver:              ", "")
$PSInfo1 = StringInStr($PSInfo, @CR)
$PSInfo1 = $PSInfo1 - 1
$CPUSPEED = StringLeft($PSInfo, $PSInfo1)
$PSInfo1 = $PSInfo1 + 1
$PSInfo = StringTrimLeft($PSInfo, $PSInfo1)
$QCFailed = ($QCFailed & "" & @CRLF)
$PSInfo1 = StringInStr($PSInfo, @CR)
$PSInfo1 = $PSInfo1 - 1
$CPU = StringLeft($PSInfo, $PSInfo1)
$CPU = StringTrimLeft($CPU, 1)
$PSInfo1 = $PSInfo1 + 1
$PSInfo = StringTrimLeft($PSInfo, $PSInfo1)
$QCFailed = ($QCFailed & "" & @CRLF)
$PSInfo1 = StringInStr($PSInfo, @CR)
$PSInfo1 = $PSInfo1 - 1
$RAM = StringLeft($PSInfo, $PSInfo1)
$RAM = StringTrimLeft($RAM, 1)
$PSInfo1 = $PSInfo1 + 1
$PSInfo = StringTrimLeft($PSInfo, $PSInfo1)
$QCFailed = ($QCFailed & "" & @CRLF)
$PSInfo1 = StringInStr($PSInfo, @CR)
$PSInfo1 = $PSInfo1 - 1
$VIDEO = StringLeft($PSInfo, $PSInfo1)
$VIDEO = StringTrimLeft($VIDEO, 1)
$PSInfo1 = $PSInfo1 + 1
$PSInfo = StringTrimLeft($PSInfo, $PSInfo1)
$QCFailed = ($QCFailed & "" & @CRLF)
$QCFailed = ($QCFailed & "" & @CRLF)

RunWait(@comspec & ' /c "SM_INFO.EXE | clipboard.exe"', @ScriptDir, @SW_HIDE)
$SMInfo = ClipGet()
$STRING = StringInStr($SMInfo, "BIOS vendor:    Dell")
If $STRING = 0 Then
    $QCFailed = ($QCFailed & "1" & @CRLF & @CRLF)
Else
    $MFG = StringInStr($SMInfo, "BIOS vendor:   ")
    $MFG = $MFG + 12
    $MFG1 = StringTrimLeft($SMInfo, $MFG)
    $MFG = StringInStr($MFG1, @CR)
    $MFG = $MFG - 1
    $MFG = StringLeft($MFG1, $MFG)
    
    $MDL = StringInStr($SMInfo, "System Name:   ")
    $MDL = $MDL + 12
    $MDL1 = StringTrimLeft($SMInfo, $MDL)
    $MDL = StringInStr($MDL1, @CR)
    $MDL = $MDL - 2
    $MDL = StringLeft($MDL1, $MDL)
    If StringLeft($MDL, 2) = "HP" Then
        $MFG = StringLeft($MDL, 2)
        $MDL = StringTrimLeft($MDL, 3)
    EndIf
    
    $SN = StringInStr($SMInfo, "Service tag:    ")
    $SN = $SN + 12
    $SN1 = StringTrimLeft($SMInfo, $SN)
    $SN = StringInStr($SN1, @CR)
    $SN = $SN - 1
    $SN = StringLeft($SN1, $SN)
    $QCFailed = ($QCFailed & $MFG & @CRLF)
    $QCFailed = ($QCFailed & $MDL & @CRLF)
    $QCFailed = ($QCFailed & $SN & @CRLF & $PSInfo & @CRLF & @CRLF)
EndIf
EndFunc

Func SoftwareCheck()
    Sleep(2000)
;SAV Failed
$SAV = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5A633ED0-E5D7-4D65-AB8D-53ED43510284}", "DisplayVersion")
$SAVE = @error
If $SAV <> "" Then
    If StringLeft($SAV, 2) = 10 Then
        $SAVParent = RegRead("HKLM\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion", "Parent")
        If $SAVParent = "DEATHSTAR" Then
            $SAV = "OK              Parent Server- DEATHSTAR"
            GUICtrlSetState($Buttons[8], $GUI_DISABLE)
        Else
            $SAV = "Failed (Reinstall)          Parent Server Incorrect - Perform Reinstall"
            GUICtrlSetState($Buttons[8], $GUI_ENABLE)
        EndIf
    Else
        $SAV = "Outdated"
        GUICtrlSetState($Buttons[8], $GUI_ENABLE)
    EndIf
EndIf
If $SAVE = 1 or $SAVE = -1 Then
    $SAV = "Not Detected"
    GUICtrlSetState($Buttons[8], $GUI_ENABLE)
EndIf

;Java Runtime
$JRE = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7148F0A8-6813-11D6-A77B-00B0D0142000}", "DisplayVersion")
$JREE = @error
If $JRE <> "" Then
    If StringLeft($JRE, 3) = "1.4" Then
        $JRE = "OK"
        GUICtrlSetState($Buttons[9], $GUI_DISABLE)
    Else
        $JRE = "Outdated"
        GUICtrlSetState($Buttons[9], $GUI_ENABLE)
    EndIf
EndIf
If $JREE = 1 or $JREE = -1 Then
    $JRE = "Not Detected"
    GUICtrlSetState($Buttons[9], $GUI_ENABLE)
EndIf

;SAP GUI Failed
$SAP = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SAPFrontend", "DisplayVersion")
$SAPE = @error
If $SAP <> "" Then
    If StringLeft($SAP, 4) = "6.40" Then
        $SAP = "OK"
        GUICtrlSetState($Buttons[10], $GUI_DISABLE)
    Else
        $SAP = "Outdated"
        GUICtrlSetState($Buttons[10], $GUI_ENABLE)
    EndIf
EndIf
If $SAPE = 1 or $SAPE = -1 Then
    $SAP = "Not Detected"
    GUICtrlSetState($Buttons[10], $GUI_ENABLE)
EndIf

;Acrobat Reader Failed
$Adobe = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-A70500000002}", "DisplayVersion")
$AdobeE = @error
If $Adobe <> "" Then
    If StringLeft($Adobe, 1) = 7 Then
        $Adobe = "OK"
        GUICtrlSetState($Buttons[11], $GUI_DISABLE)
    Else
        $Adobe = "Outdated"
        GUICtrlSetState($Buttons[11], $GUI_ENABLE)
    EndIf
EndIf
If $AdobeE = 1 or $AdobeE = -1 Then
    $Adobe = "Not Detected"
    GUICtrlSetState($Buttons[11], $GUI_ENABLE)
EndIf

;Webex Failed
$Webex = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F2AB2488-A0BF-4A9B-98A9-A88CF20FD2FF}", "Version")
$WebexE = @error
If $Webex <> "" Then
    If $Webex = 16777216 Then
        $Webex = "OK"
        GUICtrlSetState($Buttons[12], $GUI_DISABLE)
    Else
        $Webex = "Outdated"
        GUICtrlSetState($Buttons[12], $GUI_ENABLE)
    EndIf
EndIf
If $WebexE = 1 or $WebexE = -1 Then
    $Webex = "Not Detected"
    GUICtrlSetState($Buttons[12], $GUI_ENABLE)
EndIf
    
;Shockwave
$Shockwave = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7D1D6A24-65D4-454C-8815-4F08A5FFF12C}", "DisplayVersion")
$ShockwaveE = @error
If $Shockwave <> "" Then
    If StringLeft($Shockwave, 2) = 10 Then
        $Shockwave = "OK"
        GUICtrlSetState($Buttons[13], $GUI_DISABLE)
    Else
        $Shockwave = "Outdated"
        GUICtrlSetState($Buttons[13], $GUI_ENABLE)
    EndIf
EndIf
If $ShockwaveE = 1 or $ShockwaveE = -1 Then
    $Shockwave = "Not Detected"
    GUICtrlSetState($Buttons[13], $GUI_ENABLE)
EndIf

;Flash Failed
$Flash = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6815FCDD-401D-481E-BA88-31B4754C2B46}", "DisplayVersion")
$FlashE = @error
If $Flash <> "" Then
    If StringLeft($Flash, 1) = 8 Then
        $Flash = "OK"
        GUICtrlSetState($Buttons[14], $GUI_DISABLE)
    Else
        $Flash = "Outdated"
        GUICtrlSetState($Buttons[14], $GUI_ENABLE)
    EndIf
EndIf
If $FlashE = 1 or $FlashE = -1 Then
    $Flash = "Not Detected"
    GUICtrlSetState($Buttons[14], $GUI_ENABLE)
EndIf

;PCAnywhere 11 Failed
$PCA = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E05E8183-866A-11D3-97DF-0000F8D8F2E9}", "DisplayVersion")
$PCAE = @error
If $PCA <> "" Then
    If StringLeft($PCA, 2) = 11 Then
        $PCA = "OK"
        GUICtrlSetState($Buttons[15], $GUI_DISABLE)
        ;Check Status of PCAnywhere Driver Service if PCAnywhere 11 is Found
        $PCA2 = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\AW_HOST", "Start")
        If $PCA2 = 1 Then $PCA = ($PCA & "              Driver Service - OK")
        If $PCA2 = 0 Then
            $PCA = ($PCA & "                Driver Service - Enabled")
            RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\AW_HOST", "Start", "REG_DWORD", "1")
        EndIf
    Else
        $PCA = "Outdated"
        GUICtrlSetState($Buttons[15], $GUI_ENABLE)
    EndIf
EndIf
If $PCAE = 1 or $PCAE = -1 Then
    $PCA = "Not Detected"
    GUICtrlSetState($Buttons[15], $GUI_ENABLE)
EndIf

;Canon Network Scangear
$SCAN = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{030F1677-1A3E-4113-B1F0-EE9632693478}", "DisplayName")
$SCANE = @error
If $SCAN <> "" Then 
    $SCAN = "OK"
    GUICtrlSetState($Buttons[19], $GUI_DISABLE)
EndIf
If $SCANE = 1 or $SCANE = -1 Then
    $SCAN = "Not Installed"
    GUICtrlSetState($Buttons[19], $GUI_ENABLE)
EndIf

;IBM Client Access
$CA = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ClientAccessExpressEmulator", "UninstallString")
$CAE = @error
If $CA <> "" Then
    $CA = "OK"
    GUICtrlSetState($Buttons[18], $GUI_DISABLE)
EndIf
If $CAE = 1 or $CAE = -1 Then
    $CA = "Not Installed"
    GUICtrlSetState($Buttons[18], $GUI_ENABLE)
EndIf
    
;Minitab 14
$MINITAB = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8F495C35-FAFE-4941-9B18-09A2DE356EFA}", "DisplayName")
$MINITABE = @error
If $MINITAB <> "" Then
    $MINITAB = "OK"
    GUICtrlSetState($Buttons[20], $GUI_DISABLE)
EndIf
If $MINITABE = 1 or $MINITABE = -1 Then
    $MINITAB = "Not Installed"
    GUICtrlSetState($Buttons[20], $GUI_ENABLE)
EndIf

;Power DVD 5.5
$DVD = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6811CAA0-BF12-11D4-9EA1-0050BAE317E1}", "DisplayName")
$DVDE = ""
If $DVD <> "" Then
    $DVD = "OK"
    GUICtrlSetState($Buttons[21], $GUI_DISABLE)
EndIf
If $DVDE = 1 or $DVDE = -1 Then
    $DVD = "Not Installed"
    GUICtrlSetState($Buttons[21], $GUI_ENABLE)
EndIf

;Office
$Office = "Start"
$O2KStd = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{00020409-78E1-11D2-B60F-006097C998E7}", "DisplayName")
$O2KPro = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{00010409-78E1-11D2-B60F-006097C998E7}", "DisplayName")
$O2003Pro = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90110409-6000-11D3-8CFE-0150048383C9}", "DisplayName")
GUICtrlSetState($Buttons[22], $GUI_DISABLE)
If $O2KStd <> "" Then $Office = "Installed              Office 2000 Standard"
If $O2KPro <> "" Then $Office = "Installed              Office 2000 Professional"   
If $O2003Pro <> "" Then $Office = "Installed                Office 2003 Professional"
If $Office = "Start" Then
    $Office = "Not Installed"
    GUICtrlSetState($Buttons[22], $GUI_ENABLE)
EndIf

;Visio
$Visio = "Start"
RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DBFA7530-0CBF-11D3-8CC0-00C04F72C04D}", "DisplayName")
$V2000Std = @error
$V2002 = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90540409-6D54-11D4-BEE3-00C04F990354}", "DisplayName")
GUICtrlSetState($Buttons[23], $GUI_DISABLE)
If $V2002 <> "" Then
    If StringInStr($V2002, "Standard") <> 0 Then $Visio = "Installed                Visio 2002 Standard"
    If StringInStr($V2002, "Professional") <> 0 Then $Visio = "Installed                Visio 2002 Professional"
EndIf
If $V2000Std <> 1 And $V2000Std <> -1 Then $Visio = "Installed              Visio 2000 Standard"
If $Visio = "Start" Then
    $Visio = "Not Installed"
    GUICtrlSetState($Buttons[23], $GUI_ENABLE)
EndIf

;Project
$Project = "Start"
RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DBFA7530-0CBF-11D3-8CC0-00C04F72C04D}", "DisplayVersion")
$P2000Std = @error
GUICtrlSetState($Buttons[24], $GUI_DISABLE)
If $P2000Std <> 1 And $P2000Std <> -1 Then $Project = "Installed                Project 2000 Standard"
If $Project = "Start" Then
    $Project = "Not Installed"
    GUICtrlSetState($Buttons[24], $GUI_ENABLE)
EndIf

EndFunc

Func SystemCheck ()
;***Start***
;Check SUS Settings, compares to current US Client Policy GPO 5/2/06 ($SUS = 0 means all settings confirmed, 1 = one or more settings were missing or incorrect)
$SUS    = 0
$SUS1   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate", "WUServer")
$SUS1E  = @error
$SUS2   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate", "WUStatusServer")
$SUS2E  = @error
$SUS3   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate", "ElevateNonAdmins")
$SUS3E  = @error
$SUS4   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate", "TargetGroupEnabled")
$SUS4E  = @error
$SUS5   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate", "TargetGroup")
$SUS5E  = @error
$SUS6   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "NoAUShutdownOption")
$SUS6E  = @error
$SUS7   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "UseWUServer")
$SUS7E  = @error
$SUS8   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "RescheduleWaitTimeEnabled")
$SUS8E  = @error
$SUS9   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "RescheduleWaitTime")
$SUS9E  = @error
$SUS10   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "NoAutoRebootWithLoggedOnUsers")
$SUS10E  = @error
$SUS11   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "DetectionFrequencyEnabled")
$SUS11E  = @error
$SUS12   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "DetectionFrequency")
$SUS12E  = @error
$SUS13   = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "AutoInstallMinorUpdates")
$SUS13E  = @error
$SUS14  = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "RebootWarningTimeoutEnabled")
$SUS14E = @error
$SUS15  = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "RebootWarningTimeout")
$SUS15E = @error
$SUS16  = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "RebootRelaunchTimeoutEnabled")
$SUS16E = @error
$SUS17  = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "NoAutoUpdate")
$SUS17E = @error
$SUS18  = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "AUOptions")
$SUS18E = @error
$SUS19  = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "ScheduledInstallDay")
$SUS19E = @error
$SUS20  = RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "ScheduledInstallTime")
$SUS20E = @error

While 1
If $SUS1 <> "http://deathstar"  Then
    $SUS = 1
    ExitLoop
EndIf

If $SUS2 <> "http://deathstar"  Then
    $SUS = 1
    ExitLoop
EndIf

If $SUS3E = 1 Or $SUS3E = -1 Then
    $SUS = 1
    ExitLoop
Else
    If $SUS3 <> 0 Then
        $SUS = 1
        ExitLoop
    EndIf
EndIf

If $SUS4E = 1 Or $SUS4E = -1 Then
    $SUS = 1
    ExitLoop
Else
    If $SUS4 <> 1 Then
        $SUS = 1
        ExitLoop
    EndIf
EndIf

;If $SUS5 <> 4  Then
;   $SUS = 1
;   ExitLoop
;EndIf

If $SUS6E = 1 Or $SUS6E = -1 Then
    $SUS = 1
    ExitLoop
Else
    If $SUS6 <> 1 Then
        $SUS = 1
        ExitLoop
    EndIf
EndIf

If $SUS7 <> 1   Then
    $SUS = 1
    ExitLoop
EndIf

If $SUS8E = 1 Or $SUS8E = -1 Then
    $SUS = 1
    ExitLoop
Else
    If $SUS8 <> 1 Then
        $SUS = 1
        ExitLoop
    EndIf
EndIf

;If $SUS9 <> 5  Then
;   $SUS = 1
;   ExitLoop
;EndIf

If $SUS10E = 1 Or $SUS10E = -1 Then
    $SUS = 1
    ExitLoop
Else
    If $SUS10 <> 0 Then
        $SUS = 1
        ExitLoop
    EndIf
EndIf

If $SUS11E = 1 Or $SUS11E = -1 Then
    $SUS = 1
    ExitLoop
Else
    If $SUS11 <> 1 Then
        $SUS = 1
        ExitLoop
    EndIf
EndIf

If $SUS12 <> 1  Then
    $SUS = 1
    ExitLoop
EndIf

If $SUS13E = 1 Or $SUS13E = -1 Then
    $SUS = 1
    ExitLoop
Else
    If $SUS13 <> 1 Then
        $SUS = 1
        ExitLoop
    EndIf
EndIf

If $SUS14 <> 1  Then
    $SUS = 1
    ExitLoop
EndIf

;If $SUS15 <> 1 Then
;   $SUS = 1
;   ExitLoop
;EndIf

If $SUS16 <> 0  Then
    $SUS = 1
    ExitLoop
EndIf

If $SUS17 <> 0  Then
    $SUS = 1
    ExitLoop
EndIf

If $SUS18 <> 4  Then
    $SUS = 1
    ExitLoop
EndIf

If $SUS19 <> 0  Then
    $SUS = 1
    ExitLoop
EndIf

If $SUS20 <> 11 Then
    $SUS = 1
    ExitLoop
EndIf
ExitLoop
WEnd

If $SUS = 0 Then
    $SUS = "OK"
Else
    $SUS = "Policy not set. Verify PC is in correct OU"
EndIf
    
$QCFailed = ($QCFailed & "SUS Policies              " & $SUS & @CRLF)
;***End***

;Check XP Remote Desktop Status
If @OSVersion = "WIN_XP" Then
    $RDP = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server", "fDenyTSConnections")
    If $RDP = 0 Then
        $RDP = "OK              RDP Enabled"
        GUICtrlSetState($Buttons[1], $GUI_DISABLE)
    EndIf
    If $RDP = 1 Then
        $RDP = "DISBALED"
        GUICtrlSetState($Buttons[1], $GUI_ENABLE)
    EndIf
Else
    $RDP = "N/A"
EndIf
$QCFailed = ($QCFailed & "XP Remote Desktop Status          " & $RDP & @CRLF)

;Set System Security (REG/FS)
RunWait(@ScriptDir & '\REGINI "' & @ScriptDir & '\REGPERMS_QC"', @ScriptDir, @SW_HIDE)
If FileExists(@ProgramFilesDir & "\IBM\Client Access\Emulator\") Then RunWait(@SystemDir & '\CACLS.EXE "' & @ProgramFilesDir & '\IBM\Client Access\Emulator" /E /T /G USERS:C', @SystemDir, @SW_HIDE)
If FileExists(@WindowsDir & "\Temp") Then RunWait(@SystemDir & '\CACLS.EXE "' & @WindowsDir & '\Temp" /E /T /G USERS:C', @SystemDir, @SW_HIDE)
If FileExists("C:\Temp") Then RunWait(@SystemDir & '\CACLS.EXE "C:\Temp" /E /T /G USERS:C', @SystemDir, @SW_HIDE)
If FileExists(@SystemDir & "\Spool") Then RunWait(@SystemDir & '\CACLS.EXE "' & @SystemDir & '\Spool" /E /T /G USERS:C', @SystemDir, @SW_HIDE)
RunWait("ntrights +r SeSystemtimePrivilege -u everyone", @ScriptDir, @SW_HIDE)
$PERMS = "OK                Permissions Written"
$QCFailed = ($QCFailed & "File/Registry Permissions/Local Security Policy   " & $PERMS & @CRLF)

;Check Page File
$Page = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "PagingFiles")
$PageLen = StringLen($PAGE)
$PagePOS = StringInStr($PAGE, ".sys")
$PagePOS = ($PagePOS + 4)
$Page = StringTrimLeft($Page, $PagePOS)
$PagePOS = StringInStr($PAGE, " ")
$PagePOS = $PagePOS - 1
$PageMin = StringLeft($Page, $PagePOS)
$pagePOS = ($PagePOS + 1)
$PageMax = StringTrimLeft($Page, $PagePOS)
$Page = $PageMax
$PagePOS = StringInStr($PAGE, ":\")
If $pagePOS <> 0 Then
$PagePOS = $PagePOS - 2
$PageMax = StringLeft($page, $PagePOS)
EndIf

If $PageMin = $PageMax Then
    $PageSTS = "OK  "
    GUICtrlSetState($Buttons[3], $GUI_DISABLE)
Else
    $PageSTS = "Dynamic"
    GUICtrlSetState($Buttons[3], $GUI_ENABLE)
EndIf
$QCFailed = ($QCFailed & "Windows Page File             " & $PAGESTS & "            Min- " & $PageMin & "  Max- " & $PageMax)

;*** Check Local Groups Start***
;Check for CWDUser Account
RunWait(@comspec & ' /c ' & "net localgroup users | clipboard.exe",@ScriptDir, @SW_HIDE)
$AdminGroup = clipget()
$ALen = StringLen($AdminGroup)
$APOS = StringInStr($AdminGroup, "----------")
$APOS = $ALen - $APOS
$AdminGroup = StringRight ($AdminGroup, $APOS)
$CWDUser = StringInStr($AdminGroup, "CWDUser")

;Check Local Admin Group
RunWait(@comspec & ' /c ' & "net localgroup administrators | clipboard.exe",@ScriptDir, @SW_HIDE)
$AdminGroup = clipget()
$ALen = StringLen($AdminGroup)
$APOS = StringInStr($AdminGroup, "----------")
$APOS = $ALen - $APOS
$AdminGroup = StringRight ($AdminGroup, $APOS)
$GDomainAdmins = StringInStr($AdminGroup, "CWD\Domain Admins")
$GJuniorAdmins = StringInStr($AdminGroup, "CWD\Junior Admins")
$GAdministrator = StringInStr($AdminGroup, "Administrator")
If $GDomainAdmins <> 0 And $GJuniorAdmins <> 0 And $GAdministrator <> 0 Then
    $AdminGroup = "OK"
    GUICtrlSetState($Buttons[5], $GUI_DISABLE)
Else
    $AdminGroup = "Failed               Missing: "
    GUICtrlSetState($Buttons[5], $GUI_ENABLE)
    If $GDomainAdmins = 0 Then $AdminGroup = ($AdminGroup & "CWD\Domain Admins  ")
    If $GJuniorAdmins = 0 Then $AdminGroup = ($AdminGroup & "CWD\Junior Admins  ")
    If $GAdministrator = 0 Then $AdminGroup = ($AdminGroup & @ComputerName & "\Administrator    ")
EndIf
$QCFailed = ($QCFailed & "Administrators Group          " & $AdminGroup & @CRLF)

;Check Remote Desktop Users Group
If @OSVersion = "WIN_XP" Then
    RunWait(@comspec & ' /c net localgroup "Remote Desktop Users" | clipboard.exe',@ScriptDir, @SW_HIDE)
    $GRDP = clipget()
    $RLen = StringLen($GRDP)
    $RPOS = StringInStr($GRDP, "----------")
    $RPOS = $RLen - $RPOS
    $GRDP = StringRight ($GRDP, $RPOS)
    $GRDPDomainUsers = StringInStr($GRDP, "CWD\Domain Users")
    $GRDPCWDUser = StringInStr($GRDP, "CWDUser")
    If $CWDUser <> 0 Then
        If $GRDPDomainUsers <> 0 And $GRDPCWDUser <> 0 Then
            $GRDP = "OK"
            GUICtrlSetState($Buttons[6], $GUI_DISABLE)
        Else
            $GRDP = "Failed             Missing: "
            GUICtrlSetState($Buttons[6], $GUI_ENABLE)
            If $GRDPDomainUsers = 0 Then $GRDP = ($GRDP & "CWD\Domain Users ")
            If $GRDPCWDUser = 0 Then $GRDP = ($GRDP & @ComputerName & "\CWDUser ")
        EndIf
    Else
        If $GRDPDomainUsers <> 0 Then
            $GRDP = "OK"
            GUICtrlSetState($Buttons[6], $GUI_DISABLE)
        Else
            GUICtrlSetState($Buttons[6], $GUI_ENABLE)
            $GRDP = "Failed             Missing: "
            If $GRDPDomainUsers = 0 Then $GRDP = ($GRDP & "CWD\Domain Users ")
        EndIf
    EndIf
        
Else
    $GRDP = "N/A"
EndIf
$QCFailed = ($QCFailed & "Remote Desktop User Group         " & $GRDP & @CRLF)

;Check Network Configuration Operators Group
If @OSVersion = "WIN_XP" Then
    If StringLeft($MFG, 4) = "Dell" AND StringLeft($MDL, 8) = "Latitude" Then
        RunWait(@comspec & ' /c net localgroup "Network Configuration Operators" | clipboard.exe',@ScriptDir, @SW_HIDE)
        $GNET = clipget()
        $NLen = StringLen($GNET)
        $NPOS = StringInStr($GNET, "----------")
        $NPOS = $NLen - $NPOS
        $GNET = StringRight ($GNET, $NPOS)
        $GNETDomainUsers = StringInStr($GNET, "CWD\Domain Users")
        $GNETCWDUser = StringInStr($GRDP, "CWDUser")
        If $CWDUser <> 0 Then
            If $GNETDomainUsers <> 0 And $GNETCWDUser <> 0 Then
                $GNET = "OK"
                GUICtrlSetState($Buttons[7], $GUI_DISABLE)
            Else
                GUICtrlSetState($Buttons[7], $GUI_ENABLE)
                $GNET = "Failed                     Missing: "
                If $GNETDomainUsers = 0 Then $GNET = ($GNET & "CWD\Domain Users ")
                If $GNETCWDUser = 0 Then $GNET = ($GNET & @ComputerName & "\CWDUser ")
            EndIf
        Else
            If $GNETDomainUsers <> 0 Then
                $GNET = "OK"
                GUICtrlSetState($Buttons[7], $GUI_DISABLE)
            Else
                GUICtrlSetState($Buttons[7], $GUI_ENABLE)
                $GNET = "Failed(Laptops Only)       Missing: "
                If $GNETDomainUsers = 0 Then $GNET = ($GNET & "CWD\Domain Users ")
            EndIf
        EndIf
    EndIf
Else
    $GNET = "N/A"
EndIf
;*** Check Local Groups End***

;Check Local Admin Password
If @OSVersion = "WIN_XP" Or @OSVersion = "WIN_2000" Then
    RunAsWait('Administrator', @ComputerName, "a1s2d3f4g5", 0, @ComSpec & " /c dir", @TempDir, @SW_HIDE)
    If @error = 1 Then
        $AdminPass = "Failed"
        GUICtrlSetState($Buttons[4], $GUI_ENABLE)
    Else
        $AdminPass = "OK"
        GUICtrlSetState($Buttons[4], $GUI_DISABLE)
    EndIf
Else
    $AdminPass = "N/A           Requires Win2K/WinXP"
EndIf
$QCFailed = ($QCFailed & "Local Administrator Password      " & $AdminPass & @CRLF)

;Check VPN/Earthlink
RunWait(@comspec & ' /c "rasdw9x.exe list | clipboard.exe"', @ScriptDir, @SW_HIDE)
$RAS = clipget()
$Earthlink = StringInStr($RAS, "Earthlink")
$VPN = StringInStr($RAS, "CWD-VPN")
If $VPN <> 0 AND $Earthlink <> 0 Then
    $RASC = "OK"
Else
    $RASC = "Failed             Missing:   "
    If $VPN = 0 Then $RASC = $RASC & "CWD-VPN     "
    If $Earthlink = 0 Then $RASC = $RASC & "Earthlink"
    EndIf

;List All Printers
RunWait(@ComSpec & ' /c reg query "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Devices" | Clipboard.exe', @ScriptDir, @SW_HIDE)
$AllPrinters = ClipGet()
$PrintPOS = StringInStr($AllPrinters, @CR, -1, 4)
$AllPrinters = StringTrimLeft($AllPrinters, $PrintPOS)
$AllPrinters = StringReplace($AllPrinters, "    ", "", 99)
;While 1
;$PrinterPOS1 = StringInStr($AllPrinters, "REG_SZ")
;$PrinterPOS1 = $PrinterPOS1 - 1
;$PrinterPOS2 = StringInStr($AllPrinters, @CR)
;$PrinterPOS2 = $PrinterPOS2 - $PrinterPOS1
;$PrinterPOS3 = StringMid($AllPrinters, $PrinterPOS1, $PrinterPOS2)
;$AllPrinters = StringReplace($AllPrinters, $PrinterPOS3, "", 1)
;WEnd
;create loop to read all printer names


;Check Default Printer
$Printer = RegRead("HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows", "Device")
$PrinterPOS = StringInStr($Printer, ",")
$PrinterPOS = $PrinterPOS - 1
$Printer = StringLeft($Printer, $PrinterPOS)

EndFunc

Func CLOSEClicked ()
    Exit
EndFunc

Func CrtAdminGUI()
;Create GUI Window and GUI Controls
;increase 2nd number by 15 inbetween lines
$mainwindow = GuiCreate("CWD ITS Department - PC Quality Control Check", 863, 700,-1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
$Labels[1] = GuiCtrlCreateLabel("Hardware Inventory", 100, 10, 100, 20, $SS_SUNKEN, $SS_CENTER)
$Buttons[25] = GUICtrlCreateButton("Refresh All Settings", 675, 30, 180, 20)
$Labels[2] = GuiCtrlCreateLabel("Manufacturer", 10, 30, 170, 20)
$Labels[3] = GuiCtrlCreateLabel($MFG, 210, 30, 400, 20)
$Labels[4] = GuiCtrlCreateLabel("System Model", 10, 45, 170, 20)
$Labels[5] = GuiCtrlCreateLabel($MDL, 210, 45, 400, 20)
$Labels[6] = GuiCtrlCreateLabel("System Service Tag", 10,60, 170, 20)
$Labels[7] = GuiCtrlCreateLabel($SN, 210, 60, 400, 20)
$Labels[72] = GuiCtrlCreateLabel("Default Printer", 675, 60, 170, 20, $SS_CENTER)
$Labels[73] = GuiCtrlCreateLabel($Printer, 675, 60, 170, 20, $SS_CENTER)
$Labels[8] = GuiCtrlCreateLabel("Processor Type", 10, 75, 170, 20)
$Labels[9] = GuiCtrlCreateLabel($CPU, 210, 75, 400, 20)
$Labels[10] = GuiCtrlCreateLabel("Processor Speed", 10, 90, 170, 20)
$Labels[11] = GuiCtrlCreateLabel($CPUSPEED, 210, 90, 250, 20)
$Labels[12] = GuiCtrlCreateLabel("RAM Installed", 10, 105, 170, 20)
$Labels[13] = GuiCtrlCreateLabel($RAM, 210, 105, 250, 20)
$Labels[14] = GuiCtrlCreateLabel("Video Card", 10, 120, 170, 20)
$Labels[15] = GuiCtrlCreateLabel($VIDEO, 210, 120, 400, 20)
$Labels[16] = GuiCtrlCreateLabel("Windows Settings/Security", 80, 142, 135, 20, $SS_SUNKEN, $SS_CENTER)
$Buttons[16] = GUICtrlCreateButton("Refresh Windows Settings/Security", 675, 142, 180, 20)
$Labels[17] = GuiCtrlCreateLabel("Object", 10, 165, 170, 20)
$Labels[18] = GuiCtrlCreateLabel("Status                Extended Information", 210, 165, 300, 20)
$Labels[19] = GuiCtrlCreateLabel("Windows XP Remote Desktop", 10, 185, 170, 20)
$Labels[20] = GuiCtrlCreateLabel($RDP, 210, 185, 450, 20)
$Buttons[1] = GUICtrlCreateButton("Enable", 675, 185, 110, 20)
GUICtrlSetState($Buttons[1], $GUI_DISABLE)
$Labels[21] = GuiCtrlCreateLabel("File/Registry Permissions", 10, 205, 170, 20)
$Labels[22] = GuiCtrlCreateLabel($PERMS, 210, 205, 450, 20)
$Buttons[2] = GUICtrlCreateButton("Repair", 675, 205, 110, 20)
GUICtrlSetState($Buttons[2], $GUI_DISABLE)
$Labels[23] = GuiCtrlCreateLabel("SUS Policies", 10, 225, 170, 20)
$Labels[24] = GuiCtrlCreateLabel($SUS, 210, 225, 450, 20)
$Labels[25] = GuiCtrlCreateLabel("Windows Page File", 10, 245, 170, 20)
$Labels[26] = GuiCtrlCreateLabel($PageSTS & "           Min- " & $PageMIN & "    Max- " & $PageMax, 210, 245, 450, 20)
$Buttons[3] = GUICtrlCreateButton("Adjust", 675, 245, 110, 20)
GUICtrlSetState($Buttons[3], $GUI_DISABLE)
$Labels[27] = GuiCtrlCreateLabel("Local Administrator Password", 10, 265, 170, 20)
$Labels[28] = GuiCtrlCreateLabel($AdminPass, 210, 265, 450, 20)
$Buttons[4] = GUICtrlCreateButton("Reset", 675, 265, 110, 20)
GUICtrlSetState($Buttons[4], $GUI_DISABLE)
$Labels[29] = GuiCtrlCreateLabel("Local Administrators Group", 10, 285, 170, 20)
$Labels[30] = GuiCtrlCreateLabel($AdminGroup, 210, 285, 450, 20)
$Buttons[5] = GUICtrlCreateButton("Repair", 675, 285, 110, 20)
GUICtrlSetState($Buttons[5], $GUI_DISABLE)
$Labels[31] = GuiCtrlCreateLabel("Remote Desktop Group", 10, 305, 170, 20)
$Labels[32] = GuiCtrlCreateLabel($GRDP, 210, 305, 450, 20)
$Buttons[6] = GUICtrlCreateButton("Repair", 675, 305, 110, 20)
GUICtrlSetState($Buttons[6], $GUI_DISABLE)
$Labels[33] = GuiCtrlCreateLabel("Network Configuration Group", 10, 325, 170, 20)
$Labels[34] = GuiCtrlCreateLabel($GNET, 210, 325, 450, 20)
$Buttons[7] = GUICtrlCreateButton("Repair", 675, 325, 110, 20)
GUICtrlSetState($Buttons[7], $GUI_DISABLE)
$Labels[35] = GuiCtrlCreateLabel("RAS Connections", 10, 345, 170, 20)
$Labels[36] = GuiCtrlCreateLabel($RASC, 210, 345, 450, 20)
$Labels[39] = GuiCtrlCreateLabel("Software Inventory", 102, 357, 95, 20, $SS_SUNKEN, $SS_CENTER)
$Buttons[17] = GUICtrlCreateButton("Refresh Software Settings", 675, 365, 180, 20)
$Labels[40] = GuiCtrlCreateLabel("Application", 10, 380, 170, 20)
$Labels[41] = GuiCtrlCreateLabel("Status                Extended Information", 210, 380, 300, 20)
$Labels[42] = GuiCtrlCreateLabel("Symantec Anti-Virus 10 CE", 10, 400, 170, 20)
$Labels[43] = GuiCtrlCreateLabel($SAV, 210, 400, 450, 20)
$Buttons[8] = GUICtrlCreateButton("Install", 675, 400, 110, 20)
GUICtrlSetState($Buttons[8], $GUI_DISABLE)
$Labels[44] = GuiCtrlCreateLabel("Sun Java2 Runtime Environment", 10, 420, 170, 20)
$Labels[45] = GuiCtrlCreateLabel($JRE, 210, 420, 450, 20)
$Buttons[9] = GUICtrlCreateButton("Install", 675, 420, 110, 20)
GUICtrlSetState($Buttons[9], $GUI_DISABLE)
$Labels[46] = GuiCtrlCreateLabel("SAP GUI 640", 10, 440, 170, 20)
$Labels[47] = GuiCtrlCreateLabel($SAP, 210, 440, 450, 20)
$Buttons[10] = GUICtrlCreateButton("Install", 675, 440, 110, 20)
GUICtrlSetState($Buttons[10], $GUI_DISABLE)
$Labels[48] = GuiCtrlCreateLabel("Adobe Acrobat Reader 7.0", 10, 460, 170, 20)
$Labels[49] = GuiCtrlCreateLabel($Adobe, 210, 460, 490, 20)
$Buttons[11] = GUICtrlCreateButton("Install", 675, 460, 110, 20)
GUICtrlSetState($Buttons[11], $GUI_DISABLE)
$Labels[50] = GuiCtrlCreateLabel("Webex Meeting Manager Client", 10, 480, 170, 20)
$Labels[51] = GuiCtrlCreateLabel($Webex, 210, 480, 450, 20)
$Buttons[12] = GUICtrlCreateButton("Install", 675, 480, 110, 20)
GUICtrlSetState($Buttons[12], $GUI_DISABLE)
$Labels[52] = GuiCtrlCreateLabel("Macromedia Shockwave", 10, 500, 170, 20)
$Labels[53] = GuiCtrlCreateLabel($Shockwave, 210, 500, 450, 20)
$Buttons[13] = GUICtrlCreateButton("Install", 675, 500, 110, 20)
GUICtrlSetState($Buttons[13], $GUI_DISABLE)
$Labels[54] = GuiCtrlCreateLabel("Macromedia Flash", 10, 520, 170, 20)
$Labels[55] = GuiCtrlCreateLabel($Flash, 210, 520, 540, 20)
$Buttons[14] = GUICtrlCreateButton("Install", 675, 520, 110, 20)
GUICtrlSetState($Buttons[14], $GUI_DISABLE)
$Labels[56] = GuiCtrlCreateLabel("PCAnywhere 11", 10, 540, 170, 20)
$Labels[57] = GuiCtrlCreateLabel($PCA, 210, 540, 540, 20)
$Buttons[15] = GUICtrlCreateButton("Install", 675, 540, 110, 20)
GUICtrlSetState($Buttons[15], $GUI_DISABLE)
$Labels[58] = GuiCtrlCreateLabel("IBM Client Access V5R2", 10, 560, 170, 20)
$Labels[59] = GuiCtrlCreateLabel($CA, 210, 560, 540, 20)
$Buttons[18] = GUICtrlCreateButton("Install", 675, 560, 110, 20)
GUICtrlSetState($Buttons[18], $GUI_DISABLE)
$Labels[60] = GuiCtrlCreateLabel("Canon Network Scangear 1.3", 10, 580, 170, 20)
$Labels[61] = GuiCtrlCreateLabel($SCAN, 210, 580, 540, 20)
$Buttons[19] = GUICtrlCreateButton("Install", 675, 580, 110, 20)
GUICtrlSetState($Buttons[19], $GUI_DISABLE)
$Labels[62] = GuiCtrlCreateLabel("MiniTab 14", 10, 600, 170, 20)
$Labels[63] = GuiCtrlCreateLabel($MINITAB, 210, 600, 540, 20)
$Buttons[20]= GUICtrlCreateButton("Install", 675, 600, 110, 20)
GUICtrlSetState($Buttons[20], $GUI_DISABLE)
$Labels[64] = GuiCtrlCreateLabel("Power DVD 5.5", 10, 620, 170, 20)
$Labels[65] = GuiCtrlCreateLabel($DVD, 210, 620, 540, 20)
$Buttons[21] = GUICtrlCreateButton("Install", 675, 620, 110, 20)
GUICtrlSetState($Buttons[21], $GUI_DISABLE)
$Labels[66] = GuiCtrlCreateLabel("Microsoft Office  (Licensed Application)", 10, 640, 190, 20)
$Labels[67] = GuiCtrlCreateLabel($Office, 210, 640, 540, 20)
$Buttons[22] = GUICtrlCreateButton("Install", 675, 640, 110, 20)
GUICtrlSetState($Buttons[22], $GUI_DISABLE)
$Labels[68] = GuiCtrlCreateLabel("Microsoft Visio   (Licensed Application)", 10, 660, 190, 20)
$Labels[69] = GuiCtrlCreateLabel($Visio, 210, 660, 540, 20)
$Buttons[23] = GUICtrlCreateButton("Install", 675, 660, 110, 20)
GUICtrlSetState($Buttons[23], $GUI_DISABLE)
$Labels[70] = GuiCtrlCreateLabel("Microsoft Project (Licensed Application)", 10, 680, 190, 20)
$Labels[71] = GuiCtrlCreateLabel($Project, 210, 680, 540, 20)
$Buttons[24] = GUICtrlCreateButton("Install", 675, 680, 110, 20)
GUICtrlSetState($Buttons[24], $GUI_DISABLE)
;button_16, 17 and 25 - Refresh buttons
$Buttons[26] = GUICtrlCreateButton("Print This Screen", 675, 5, 180, 20)
;
;Office GUI Windows
$OfficeGUI = GUICreate("Install MS Office 2000", 250, 65)
GUISwitch($OfficeGUI)
$OfficeBTN1 = GUICtrlCreateButton("MS Office 2000 Standard", 40, 10, 170, 20)
$OfficeBTN2 = GUICtrlCreateButton("MS Office 2000 Professional", 40, 35, 170, 20)
GUISetOnEvent($GUI_EVENT_CLOSE, "OfficeClose", $OfficeGUI)
GUICtrlSetOnEvent($OfficeBTN1, "InstOFFSTD")
GUICtrlSetOnEvent($OfficeBTN2, "InstOFFPRO")
GUISwitch($mainwindow)
EndFunc

Although its updated, its not as simple as running the program, the code needs to be changed to suit your needs, and seeing as how you were unable to update it yourself, you may not be able to use it. Take your time to look through the code, each app installation points to a installer file on the authors server(s). All of these need to be edited. Also, the author is using a username/password combo for all new systems that he builds, this also needs to be changed. The script is really simple albeit long, take your time to look through it and learn how it works then you may be able to change it to suit your needs and maybe even improve on it.

[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]
Link to comment
Share on other sites

Yeah looks like its pretty similiar but didn't look at it's full functionality.

I found this quite useful in my case but depends on exactly what capabilities you need.

I've seen some much more complex designs like this on here. Just comes down to your needs.

I guess I should have added some comments to help you guys out lol

But like ame said it's pretty basic just long I figured whoever was looking at it would catch on to what they needed change.

Kenny

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...