MX440SE-T wont output to TV
I have an mx 440 and it wont output to the tv. My graphics card has an s-video output, but XP wont even detect that the card is capable of twinview. any help?
Right-click on the desktop and click on properties, go to settings (where you change resolutions, colour depth etc.) and click on advanced.
Navigate to the tab that should say something like ''Geforce 4 MX440'' and select the nView tab on the right side of the window.
There should be a window with 2 monitors on it with options to have both displays on, and to set certain options like clone, stretch etc. Click on the button in the right lower corner of the window (can't remember what it was called, and I'm not near my pc right now - it was something like 'settings' or 'options' or something of that sort.)
Now select the option to change the settings of the TV-out display and select the 'force S-Video out option'.
Make sure the card is set to S-video out aswell.
Thats the most I can remember at the moment. If you still have troubles, I can give you a clear discription when I arrive home on Monday from my holiday.
Good luck!
Similar Messages
-
Final Cut Pro HD wont output to an external monitor?
I,m trying to monitor my work on the projector it will be presented on. My camera wont recognize the outputted PAL signal although I can import material from the camera. It worked very briefly then stopped so I've bought a Pyro A/V Link to stand in for the camera but the most I can acheive is an occasional single image and audio. This is VERY frustrating, I need to be able to see what I'm making. I've tried resetting the User Preferences. Please, please help.
400 MHz PowerPC G4 Mac OS X (10.4.8)The video export should be set to ALL FRAMES and APPLE PAL FIREWIRE
Be sure to set AUDIO FOLLOWS VIDEO as well.
good luck.
x -
DV6753CA wont output 5.1 sound over HDMI
I'm trying to set my HP DV6753ca laptop up as my HTPC set.
- Windows 7
- Using WMC and the media browser plug-in
- latest shark007 codecs installed
I connect my laptop to my reciever via the HDMI port and change the audio device to HDMI output via the Realtek Audio Manager. The sound works but the problem is that my reciever is not recieving a 5.1 signal even though I no for certain that the file contains a 5.1 channel. If it's Dobly Digital 5.1 then my reciever uses Dolby ProLogic IIx. If its a DTS signal it uses Neo6. So what am I doing wrong?
I did a fresh install of Windows 7 on this laptop and downloaded all the drivers from Microsoft's update site. It installed the Realtek Audio manager driver.. is this the right one?So here is the thing, HP Notebooks do not have digital Audio Decoders on them...So you need movie application to give you will give you option of HDMI pass-thru, so that, laptop would transmit that Audio in digital format to the Recevier for it to decoder....HP mediasmart Movie Application does that, I dont remember if Quickplay has that option... You can try cyberlink Power DVD and check...
Although I am an HP employee, I am speaking for myself and not for HP.
Make it easier for other people to find solutions, by marking my answer with 'Accept as Solution', if it solves your problem.
Click on the BLUE KUDOS button on the left to say "Thanks" -
Flash Wont Output My Some Of My Transitions
Hey all,
I'm fairly new to flash so bear with me.
I'm making a really simple splash screen.
It features a bunch of coloured dots which fade in and out
(by transitions).
They work fine, but when I apply the same method to my text,
it doesn't do anything.
I'm a bit confused by it.
Thanks in advance
BenAre you talking about transitions in screens or are you using
the word transition to explain the effect?
Try breaking apart your text (F1 will tell you how if you
don't know) and hit F8 to convert your text to a movieclip. Give
your movieclip an instance name (I used text_mc in my example) in
the Properties panel and use the code below to fade it. -
Harvesting asset info and output to CSV
I need a script modified that will run on all servers in a work group in order to gather asset data on the appliances running Windows Server 2000 embedded edition. There are no domain services and these systems and this network technology is not an option
in our environment due to proprietary security, networking and infrastructure restrictions. I have found a script that works but i need it modified to output to a csv as it wont output and .xls .xlsx properly. The script will be run on the only computer on
the network that can access these devices. Any help on this would be awesome.
' Get Windows Server Information
' Written By Kely Mulcahey, E.C.S. LLC.
' Created: March 1, 2006
' Version: 3.0, Revised 5/30/2014
On Error Resume Next
Dim PUBOSVer ' Global OS Version
' Open File For Writing
Set WshNetwork = WScript.CreateObject("WScript.Network")
Const ForReading = 1
' Get Server List
strServerFilename = "servers.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strServerFilename) Then
' Open Servers File
Set objServers = objFSO.OpenTextFile(strServerFilename, ForReading)
Else
' Server File is missing: Exit
intMsg = MsgBox("File: " & Chr(34) & UCASE(strServerFilename) & Chr(34) & _
" is either " & _
"Missing or Damaged!" & vbcrlf & _
vbcrlf & _
"This Script will now Exit.", vbCritical, "Server File Error")
WScript.Quit(0)
End If
Do Until objServers.AtEndOfStream
strNewServer = Trim(objServers.ReadLine)
strServerList = strServerList & strNewServer & vbcrlf
intServerCnt = intServerCnt + 1
Loop
' Enumerate Server Array
For a = 0 To intServerCnt - 1
strServer = Split(strServerList, vbcrlf)
Next
' Create Excel Spreadsheet
Set objXLA = CreateObject("Excel.Application")
objXLA.Visible = False
objXLA.DisplayAlerts = False
Set objWorkbook = objXLA.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)
'Excel Constants
Const xlEdgeLeft = 7
Const xlContinuous = 1
Const xlNone = -4142
Const xlMedium = -4138
Const xlThin = 2
'Set Headers
' System Information
objXLA.Cells(1,1).Value = "Service ID"
objXLA.Cells(1,2).Value = "Company Name"
objXLA.Cells(1,3).Value = "Manufacturer"
objXLA.Cells(1,4).Value = "Model"
objXLA.Cells(1,5).Value = "Operating System"
' Processors
objXLA.Cells(1,6).Value = "Processor Type"
objXLA.Cells(1,7).Value = "Processors"
' RAM
objXLA.Cells(1,8).Value = "RAM"
objXLA.Cells(1,9).Value = "Slots"
objXLA.Cells(1,10).Value = "Max Capacity"
' Network
objXLA.Cells(1,11).Value = "NIC Port"
objXLA.Cells(1,12).Value = "Speed"
objXLA.Cells(1,13).Value = "Connection Name"
objXLA.Cells(1,14).Value = "Primary IP"
objXLA.Cells(1,15).Value = "Virtual IP"
objXLA.Cells(1,16).Value = "Primary DNS"
objXLA.Cells(1,17).Value = "Secondary DNS"
' Hard Disks
objXLA.Cells(1,18).Value = "Interface"
objXLA.Cells(1,19).Value = "Physical Disks"
objXLA.Cells(1,20).Value = "Disk Size"
objXLA.Cells(1,21).Value = "Fault Tolerant"
objXLA.Cells(1,22).Value = "Hot Spare"
' Set Top Line
objXLA.Cells(1, 1).EntireRow.Font.Bold = True
objXLA.Cells(1, 1).EntireRow.Font.Underline = True
For b = 0 To UBound(strServer) - 1
strServerParts = Split(strServer(b), " ")
strComputer = strServerParts(0)
' Parse Server Information
If UBound(strServerParts) = 2 Then
strUsername = Trim(strServerParts(1))
strPassword = Trim(strServerParts(2))
End If
' Create Connection Object
Set objWMIService = Nothing
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer _
(strComputer, "root\cimv2", strUsername, strPassword)
objWMIServices.Security_.ImpersonationLevel = 3
' Check if Server Exists
For intWMICheck = 0 To 15
If Not objWMIService Is Nothing Then
Exit For
Else
WScript.Sleep(1000)
End If
Next
' Server Exists
If intWMICheck < 15 Then
' Get CPU Information
Set colProcessor = objWMIService.ExecQuery("SELECT * FROM Win32_Processor")
For Each colProc In colProcessor
strManuf = colProc.Manufacturer
strDescription = ProcessorName(colProc.Name)
strClockSpeed = colProc.CurrentClockSpeed
strSocket = strSocket & colProc.SocketDesignation & vbcrlf
strProcID = strProcID & colProc.ProcessorID & vbcrlf
strUniqueID = strUniqueID & colProc.UniqueID & vbcrlf
ProcCount = ProcCount + 1
Next
' Determine if Hyperthreading is Enabled
strHTStatus = GetHTStatus(strSocket, ProcCount, strProcID, strUniqueID)
' DC / HT Results
If strHTStatus = "True" Then
If InStr(strManuf, "Intel") Then
strDescription = strDescription & " (Dual Core or H/T)"
Else
strDescription = strDescription & " (Dual Core)"
End If
ProcCount = ProcCount / 2
End If
' Export Information
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colCS = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
' Write Basic System Information
For Each objItem in colCS
Set colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
For Each objItemOS in colOS
' Get SP Version
If objItemOS.CSDVersion <> "" Then
strSPVersion = objItemOS.CSDVersion
Else
strSPVersion = "No Service Packs Installed"
End If
If objItemOS.LastBootUpTime <> "" Then
strLastBoot = DateConvert(objItemOS.LastBootUpTime)
Else
strLastBoot = "N/A"
End If
' Set OS Version Information
PUBOSVer = objItemOS.Caption
objXLA.Cells(b + 2, 1).Value = objItemOS.csname
objXLA.Cells(b + 2, 3).Value = objItem.Manufacturer
objXLA.Cells(b + 2, 4).Value = objItem.Model
objXLA.Cells(b + 2, 5).Value = PUBOSVer & " - " & strSPVersion
objXLA.Cells(b + 2, 6).Value = strDescription
objXLA.Cells(b + 2, 7).Value = ProcCount
objXLA.Cells(b + 2, 8).Value = MemoryConvert(objItem.TotalPhysicalMemory)
Next
Next
' Get Memory Breakdown
Dim strMemBreak
strMemBreak = Split(MemoryBreakdown(), vbcrlf)
n = 0
For n = 0 To UBound(strMemBreak) - 1
strSlots = strSlots & strMemBreak(n) & Chr(10)
Next
strMaxCapacity = strMemBreak(UBound(strMemBreak))
objXLA.Cells(b + 2, 9).Value = Left(strSlots, Len(strSlots) - 1)
objXLA.Cells(b + 2, 10).Value = strMaxCapacity
' Dispose
strMemBreak = ""
strMaxCapacity = ""
strSlots = ""
'--------------Computer Information (End)------------------'
'-------------Partition Information (Start)----------------'
' Get Drive Count
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set DiskItemsParent = objWMIService.ExecQuery("Select * from Win32_DiskDrive")
intCount = DiskItemsParent.Count
' Process Drives
intDriveMark = 0
For i = 0 To intCount - 1
Set DiskItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive WHERE Index = " & i)
For Each diskItem in DiskItems
' Convert Drive Size
If diskItem.Size <> "" Then strSize = strSize & ByteConvert(diskItem.Size) & Chr(10) Else strSize = "N/A" & Chr(10)
If diskItem.StatusInfo <> "" Then strStsInfo = diskItem.StatusInfo Else strStsInfo = "N/A"
If diskItem.SCSIBus <> "" Then strSCSIBus = diskItem.SCSIBus Else strSCSIBus = "N/A"
If diskItem.SCSILogicalUnit <> "" Then strSCSILog = diskItem.SCSILogicalUnit Else strSCSILog = "N/A"
If diskItem.SCSIPort <> "" Then strSCSIPort = diskItem.SCSIPort Else strSCSIPort = "N/A"
If diskItem.SCSITargetId <> "" Then strSCSITarget = diskItem.SCSITargetId Else strSCSITarget = "N/A"
' Get Model
strModel = Split(diskItem.Model, " ")
' Detect HP Array
If (UCase(strModel(0)) = "HP" Or UCase(strModel(0)) = "COMPAQ") And intDriveMark = 0 Then
strGetHPArray = GetHPArray(strComputer, strUsername, strPassword)
If strGetHPArray <> "" Then
strSplitHP = Split(strGetHPArray, Chr(13))
For a = 0 To UBound(strSplitHP)
strSplitResult = Split(strSplitHP(a), ":")
i = i + 1
strDriveCount = strDriveCount & Trim(strSplitResult(0)) & Chr(10)
strDriveSize = strDriveSize & Trim(strSplitResult(1)) & Chr(10)
strDriveFault = strDriveFault & Trim(strSplitResult(2)) & Chr(10)
strDriveSpare = strDriveSpare & Trim(strSplitResult(3)) & Chr(10)
strInterface = strInterface & "HP SCSI" & Chr(10)
Next
' Set Controller Output
objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
intDriveMark = 1 ' Mark That Data was Obtained
Else
strDriveCount = strDriveCount & "1" & Chr(10)
strDriveSize = strDriveSize & strSize & Chr(10)
strDriveFault = strDriveFault & "N/A" & Chr(10)
strDriveSpare = strDriveSpare & "N/A" & Chr(10)
strInterface = strInterface & "HP SCSI " & Chr(10)
' Set Controller Output
intDriveMark = 1 ' Mark That Another Pass is Invalid
' Set Controller Output
objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
End If
Else
strDriveCount = strDriveCount & "1" & Chr(10)
strDriveSize = strDriveSize & strSize & Chr(10)
strDriveFault = strDriveFault & "N/A" & Chr(10)
strDriveSpare = strDriveSpare & "N/A" & Chr(10)
' Set Controller Output
intDriveMark = 1 ' Mark That Another Pass is Invalid
' Set Controller Output
objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
' Set Interface
If diskItem.InterfaceType = "IDE" Then
strInterface = strInterface & "ATA" & Chr(10)
Else
strInterface = strInterface & "SATA/SCSI" & Chr(10)
End If
End If
' Set Cell Value "Interface"
objXLA.Cells(b + 2, 18).Value = Left(strInterface, Len(strInterface) - 1)
Next
' Dispose Drive Sizes
strDriveSize = ""
Next
' Dispose Drive Values
strDriveCount = ""
strDriveFault = ""
strDriveSpare = ""
strInterface = ""
'----Partition Information (End)---------------------------'
'----Network Information (Start)---------------------------'
Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter")
i = 1
eth = 0
Dim STOREDIP(0)
intNum = 0
For Each objItem in colItems
If objItem.NetConnectionStatus <> "" Then
' Determine Connection Status
If objItem.NetConnectionStatus = 0 Then
strNetStat = "Disabled"
ElseIf objItem.NetConnectionStatus = 2 Then
strNetStat = "Connected"
ElseIf objItem.NetConnectionStatus = 7 Then
strNetStat = "Disconnected"
Else
strNetStat = "Unknown"
End If
If objItem.NetConnectionStatus <> 0 Then
' Get Network Card Information
Const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath1 = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
strKeyPath2 = "SYSTEM\CurrentControlSet\Services\NetBT\Parameters"
strHostEntry = "Hostname"
strDomainEntry = "Domain"
strNodeEntry = "DhcpNodeType"
strRoutingEntry = "IPEnableRouter"
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strHostEntry,strHostname
objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strDomainEntry,strDomain
objReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath2,strNodeEntry,dwNodeType
objReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath1,strRoutingEntry,dwIPRouting
Select Case dwNodeType
Case 4 strNodeType = "Mixed"
Case 8 strNodeType = "Hybrid"
Case Else strNodeType = dwNodeType
End Select
If dwIPRouting = 0 Then
strIPRouting = "No"
ElseIf dwIPRouting = 1 Then
strIPRouting = "Yes"
Else
strIPRouting = "?"
End If
Set colFirstNicConfig = objWMIService.ExecQuery _
("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each objFirstNicConfig In colFirstNicConfig
strDnsWins = objFirstNicConfig.DNSEnabledForWINSResolution
Next
Set colNicConfigs = objWMIService.ExecQuery _
("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
' Display per-adapter settings.
For Each objNicConfig In colNicConfigs
intIndex = objNicConfig.Index
Set objNic = objWMIService.Get("Win32_NetworkAdapter.DeviceID=" & intIndex)
' Connection Name
If GetOsVer > 5 Then
' Works only in XP / 2003
strNetConn = objNic.NetConnectionID
ElseIf GetOsVer = 5 Then
strNetConn = ""
' Get Home Drive of Remote Server
Set objShell = CreateObject("WScript.Shell")
Set objEtherName = objShell.Exec("cmd /c ipconfig | find " & Chr(34) & "Ethernet" & Chr(34))
strEtherName = objEtherName.StdOut.ReadAll()
strEtherParse = Split(strEtherName, Chr(13))
strEtherConn = Split(strEtherParse(eth), " ")
For y = 2 To UBound(strEtherConn)
strNetConn = strNetConn & " " & strEtherConn(y)
Next
' Trim Connection Name
strNetConn = Left(Trim(strNetConn), Len(Trim(strNetConn)) - 1)
Else
strNetConn = ""
End If
' IP Addresses
strIPAddresses = ""
If Not IsNull(objNicConfig.IPAddress) Then
For Each strIPAddress In objNicConfig.IPAddress
strIPAddresses = strIPAddresses & strIPAddress & " "
Next
End If
strIPCollection = Split(strIPAddresses, " ")
' Subnets
strIPSubnets = ""
If Not IsNull(objNicConfig.IPSubnet) Then
For Each strIPSubnet In objNicConfig.IPSubnet
strIPSubnets = strIPSubnets & strIPSubnet & " "
Next
End If
strSMCollection = Split(strIPSubnets, " ")
' Virtual IP's
strVirtual = ""
If UBound(strIPCollection) > 1 Then
For IPCount = 1 To UBound(strIPCollection) - 1
strVirtual = strVirtual & (strIPCollection(IPCount) & " / " & strSMCollection(IPCount)) & Chr(10)
Next
strVirtual = Left(strVirtual, Len(strVirtual) - 1)
End If
If Trim(strVirtual) = "" Then strVirtual = "N/A"
' Gateways
strDefaultIPGateways = ""
If Not IsNull(objNicConfig.DefaultIPGateway) Then
For Each strDefaultIPGateway In objNicConfig.DefaultIPGateway
strDefaultIPGateways = strDefaultIPGateways & strDefaultIPGateway & " "
Next
Else
strDefaultIPGateways = "N/A"
End If
' If IP is repeated, and was already reported.
intSkipLoop = 0
If Trim(strNetConn) <> "" Then
For j = 0 To intNum - 1
If STOREDIP(j) = strIPAddresses Then
intSkipLoop = 1
Exit For
End If
Next
If intSkipLoop = 0 Then
ReDim Preserve STOREDIP(intNum)
STOREDIP(intNum) = strIPAddresses
intNum = intNum + 1
End If
Else
intSkipLoop = 1
End If
' DNS
strDNSServerSearchOrder = ""
If Not IsNull(objNicConfig.DNSServerSearchOrder) Then
For Each strDNSServer In objNicConfig.DNSServerSearchOrder
strDNSServerSearchOrder = strDNSServerSearchOrder & strDNSServer & " "
Next
strDNS = Split(strDNSServerSearchOrder, " ")
strDNS1 = strDNS(0)
If Trim(strDNS1) = "" Then strDNS1 = "N/A"
If UBound(strDNS) > 1 Then
strDNS2 = strDNS(1)
Else
strDNS2 = "N/A"
End If
Else
strDNS1 = "N/A"
strDNS2 = "N/A"
End If
' Run Output Process
If intSkipLoop = 0 Then
' Connection Speed
strSpeed = "Unknown"
Set objWMIService2 = objSWbemLocator.ConnectServer _
(strComputer, "root\WMI", strUsername, strPassword)
objWMIServices.Security_.ImpersonationLevel = 3
Set listAdapters = objWMIService2.ExecQuery("SELECT * FROM MSNdis_LinkSpeed")
Set enumAdapters = objWMIService2.ExecQuery("SELECT * FROM MSNdis_EnumerateAdapter")
For Each objAdapter in listAdapters
For Each objEnum in enumAdapters
intEnum = Len(objEnum.DeviceName)
If objNicConfig.SettingID = Right(objEnum.DeviceName, intEnum - 8) Then
If objEnum.InstanceName = objAdapter.InstanceName Then
intLength = Len(objAdapter.NdisLinkSpeed/10000)
If intLength > 3 Then
strSpeed = Left(objAdapter.NdisLinkSpeed/10000, intLength - 3)
strSpeed = strSpeed & ".0 Gbps"
Else
strSpeed = objAdapter.NdisLinkSpeed/10000 & " Mbps"
End If
End If
End If
Next
Next
strTotalDesc = strTotalDesc & objNicConfig.Description & Chr(10)
strTotalSpeed = strTotalSpeed & strSpeed & Chr(10)
strTotalNetConn = strTotalNetConn & strNetConn & Chr(10)
strPrimaryIP = strPrimaryIP & strIPCollection(0) & " / " & strSMCollection(0) & Chr(10)
strDNSTotal1 = strDNSTotal1 & strDNS1 & Chr(10)
strDNSTotal2 = strDNSTotal2 & strDNS2 & Chr(10)
strTotalVirtual = strTotalVirtual & strVirtual & Chr(10)
i = i + 1
eth = eth + 2
' Dispose
strDescription = ""
ProcCount = 0
strClockSpeed = ""
strInterface = ""
intCount = 0
strSize = ""
strSpeed = ""
strIPCollection = ""
strVirtual = ""
strDNS = ""
strDNS1 = ""
strDNS2 = ""
End If
Next
' Output
' Trim Leading Chr(10)
If Left(strPrimaryIP, 1) = Chr(10) Then strPrimaryIP = Right(strPrimaryIP, Len(strPrimaryIP) - 1)
If Left(strTotalVirtual, 1) = Chr(10) Then strTotalVirtual = Right(strTotalVirtual, Len(strTotalVirtual) - 1)
If Left(strDNSTotal1, 1) = Chr(10) Then strDNSTotal1 = Right(strDNSTotal1, Len(strDNSTotal1) - 1)
If Left(strDNSTotal2, 1) = Chr(10) Then strDNSTotal2 = Right(strDNSTotal2, Len(strDNSTotal2) - 1)
objXLA.Cells(b + 2, 11).Value = Trim(Left(strTotalDesc, Len(strTotalDesc) - 1))
objXLA.Cells(b + 2, 12).Value = Trim(Left(strTotalSpeed, Len(strTotalSpeed) - 1))
objXLA.Cells(b + 2, 13).Value = Trim(Left(strTotalNetConn, Len(strTotalNetConn) - 1))
objXLA.Cells(b + 2, 14).Value = Trim(Left(strPrimaryIP, Len(strPrimaryIP) - 1))
objXLA.Cells(b + 2, 15).Value = Trim(Left(strTotalVirtual, Len(strTotalVirtual) - 1))
objXLA.Cells(b + 2, 16).Value = Trim(Left(strDNSTotal1, Len(strDNSTotal1) - 1))
objXLA.Cells(b + 2, 17).Value = Trim(Left(strDNSTotal2, Len(strDNSTotal2) - 1))
End If
End If
' Dispose Per Loop
strTotalDesc = ""
strTotalSpeed = ""
strTotalNetConn = ""
strPrimaryIP = ""
strDNSTotal1 = ""
strDNSTotal2 = ""
strTotalVirtual = ""
Set eth = 0
Set i = 0
Next
'------------Network Information (End)------------------'
Else
'No Data Present
objXLA.Cells(b + 2, 1).Value = strComputer
objXLA.Cells(b + 2, 3).Value = "Information Not Available"
objXLA.Cells(b + 2, 1).EntireRow.Font.Bold = True
objXLA.Cells(b + 2, 1).EntireRow.Interior.ColorIndex = 44
End If
' Dispose Per Server
ProcCount = 0
strSocket = ""
strProcID = ""
strUniqueID = ""
Set objWMIService = Nothing
Next
'-----------------Functions (Start)---------------------'
' System Memory Conversion
Function MemoryConvert(strMem)
Dim intLength
Dim intExp
Dim intSize
Dim strSize
Dim strMeasure
Dim strMemory
intLength = Len(strMem)
If (intLength Mod 4 = 0) Then
intExp = CInt((intLength / 3) - 2)
Else
intExp = CInt((intLength / 3) - 1)
End If
' Convert to Lowest Integer Value
For intCount = 1 To Len(intExp)
chrRead = Mid(intExp, intCount, 1)
If chrRead = "." Then
Exit For
Else
strRead = strRead & chrRead
End If
Next
intExp = Cint(strRead)
intSize = CLng(strMem / (2 ^ (intExp * (10))))
If Len(intSize) = 1 Then
strFormat = FormatNumber(CStr(intSize), 2)
Else
strFormat = intSize + 1
End If
If (intExp = 1) Then
strMeasure = "KB"
ElseIf (intExp = 2) Then
strMeasure = "MB"
ElseIf (intExp = 3) Then
strMeasure = "GB"
ElseIf (intExp = 4) Then
strMeasure = "TB"
ElseIf (intExp = 5) Then
strMeasure = "PB"
ElseIf (intExp = 6) Then
strMeasure = "EB"
End If
MemoryConvert = strFormat & " " & strMeasure
End Function
' System Byte Conversion
Function ByteConvert(strMem)
Dim intLength
Dim intExp
Dim intSize
Dim strSize
Dim strMeasure
Dim strMemory
intLength = Len(strMem)
If (intLength Mod 3 = 0) Then
intExp = (intLength / 3) - 1
Else
intExp = (intLength / 3)
End If
' Convert to Lowest Integer Value
For intCount = 1 To Len(intExp)
chrRead = Mid(intExp, intCount, 1)
If chrRead = "." Then
Exit For
Else
strRead = strRead & chrRead
End If
Next
intExp = Cint(strRead)
intSize = CLng(strMem / (2 ^ (intExp * (10))))
strFormat = FormatNumber(CStr(intSize), 2)
If (intExp = 1) Then
strMeasure = "KB"
ElseIf (intExp = 2) Then
strMeasure = "MB"
ElseIf (intExp = 3) Then
strMeasure = "GB"
ElseIf (intExp = 4) Then
strMeasure = "TB"
ElseIf (intExp = 5) Then
strMeasure = "PB"
ElseIf (intExp = 6) Then
strMeasure = "EB"
End If
ByteConvert = strFormat & " " & strMeasure
End Function
' System RAID Byte Conversion
Function ByteConvertRAID(strMem)
Dim intLength
Dim intExp
Dim intSize
Dim strSize
Dim strMeasure
Dim strMemory
intLength = Len(strMem)
If (intLength Mod 3 = 0) Then
intExp = (intLength / 3) - 1
Else
intExp = (intLength / 3)
End If
' Convert to Lowest Integer Value
For intCount = 1 To Len(intExp)
chrRead = Mid(intExp, intCount, 1)
If chrRead = "." Then
Exit For
Else
strRead = strRead & chrRead
End If
Next
intExp = Cint(strRead)
intSize = (strMem / (2 ^ (intExp * (10))))
strFormat = FormatNumber(CStr(intSize), 2)
If (intExp = 0) Then
strMeasure = "MB"
ElseIf (intExp = 1) Then
strMeasure = "GB"
ElseIf (intExp = 2) Then
strMeasure = "TB"
ElseIf (intExp = 3) Then
strMeasure = "PB"
ElseIf (intExp = 4) Then
strMeasure = "EB"
End If
ByteConvertRAID = strFormat & " " & strMeasure
End Function
' Trim Processor Description
Function ProcessorName(strName)
Dim intCounter
Dim strRead
Dim chrRead, chrReadMore
For intCounter = 1 to Len(strName)
chrRead = Mid(strName, intCounter, 1)
chrReadMore = Mid(strName, intCounter + 1, 1)
If ((chrRead <> " ") Or ((chrRead = " ") And (chrReadMore <> " "))) Then
strRead = strRead & chrRead
End If
Next
ProcessorName = Trim(strRead)
End Function
' Get Hyper-Threading Status
Function GetHTStatus(strName, intProc, strID, strUnique)
strNameArray = Split(strName, vbcrlf)
strIDArray = Split(strID, vbcrlf)
strUniqueList = Split(strUnique, vbcrlf)
intTotal = 0
' Check Socket Designation
For i = 0 To UBound(strNameArray) - 1
intMark = 1
' Check for Redundancies
For j = i + 1 To UBound(strNameArray) - 1
If strNameArray(i) = strNameArray(j) Then
intMark = 0
End If
Next
' If Redundant Unique ID's Exist
For j = i + 1 To UBound(strNameArray) - 1
If strUniqueList(i) <> "" And strUniqueList(j) <> "" And _
(strUniqueList(i) <> strUniqueList(j)) Then
intMark = 1
End If
Next
' Check for NULL ProcessorID
If Trim(strIDArray(i)) = "0000000000000000" Then
intMark = 0
End If
' Calculate Total
If intMark = 1 Then
intTotal = intTotal + intMark
End If
Next
' Compare Results
If intProc = 2 * intTotal Then
GetHTStatus = "True"
Else
GetHTStatus = "False"
End If
End Function
' Get Memory Breakdown
Function MemoryBreakdown
Set colPMAItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray",,48)
For Each objPMAItem in colPMAItems
lngMax = CLng(objPMAItem.MaxCapacity)
intCount = CInt(objPMAItem.MemoryDevices)
Next
ReDim Preserve strPMArray(intCount)
Set colPMItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory",,48)
For Each objPMItem in colPMItems
strValue = strValue & objPMItem.DeviceLocator & ": "
strValue = strValue & objPMItem.Capacity / 2^20 & "MB, "
strValue = strValue & objPMItem.Speed & "MHz"
strPMArray(TrimTrailingNumber(objPMItem.Tag)) = strValue
strValue = ""
Next
j = 0
strResult = ""
For j = 0 To intCount - 1
If Trim(strPMArray(j)) = "" Then strPMArray(j) = "<Empty>"
strResult = strResult & strPMArray(j) & vbcrlf
Next
strResult = strResult & (lngMax / 2^10) & "MB"
MemoryBreakdown = strResult
End Function
' Get Part Name
Function ExtractPartName(strName)
Dim chrRead
Dim strRead
Dim i
For i = 2 To Len(strName)
chrRead = Mid(strName, Len(strName) - (i - 1), 1)
If chrRead <> Chr(34) Then
strRead = chrRead & strRead
Else
Exit For
End If
Next
ExtractPartName = strRead
End Function
' Get Trailing Number
Function TrimTrailingNumber(strNum)
Dim chrRead
Dim strRead
Dim intLen
strNum = Trim(strNum)
intLen = Len(strNum)
i = 1
For i = 1 To intLen
chrRead = Mid(strNum, intLen - (i - 1), 1)
If IsNumeric(chrRead) = "True" Then
strRead = chrRead & strRead
Else
Exit For
End If
Next
TrimTrailingNumber = strRead
End Function
' Function: WMIDateStringToDate(dtmDate)
Function WMIDateToString(dtmDate)
WMIDateToString = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & _
Left(dtmDate, 4) & " " & _
Mid(dtmDate, 9, 2) & ":" & _
Mid(dtmDate, 11, 2) & ":" & _
Mid(dtmDate, 13, 2))
End Function
' Function: GetOsVer
Function GetOsVer
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem In colOperatingSystems
GetOSVer = CSng(Left(objOperatingSystem.Version, 3))
Next
End Function
' Function: GetHPArray
Function GetHPArray(strComputer2, strUsername2, strPassword2)
' Check for 64-bit Windows
If InStr(PUBOSVer, "x64") Then
strCompaq = "Program Files (x86)\Compaq\Cpqacuxe\Bin"
Else
strCompaq = "Program Files\Compaq\Cpqacuxe\Bin"
End If
' Create Connection Object
Set objWMIServiceRem = objWMIService.Get("Win32_Process")
' Confirm Location of Compaq Array Manager
Set objHPShell = CreateObject("WScript.Shell")
Set objHPFSO = CreateObject("Scripting.FileSystemObject")
Set WshNetwork2 = WScript.CreateObject("WScript.Network")
WshNetwork2.MapNetworkDrive "", "\\" & strComputer2 & "\C$" ,,strUsername2, strPassword2
strProgram = "\\" & strComputer2 & "\C$\" & strCompaq & "\cpqacuxe.exe"
' Ensure Access is Possible
If objHPFSO.FileExists(strProgram) Then
' Process Array Config
strProcess = Chr(34) & "C:\" & strCompaq & "\cpqacuxe.exe" & Chr(34) & " -c c:\output.txt"
Process = objWMIServiceRem.Create(strProcess, null, null, intProcessID)
' Check for "output.txt"
For intTimerHP = 0 To 10
If objFSO.FileExists("\\" & strComputer2 & "\C$\output.txt") Then
Exit For
Else
WScript.Sleep(1000)
End If
Next
' Process Output
If intTimerHP < 10 Then
' Check for Locked Output File
Set objHPOutputFile = objHPFSO.GetFile("\\" & strComputer2 & "\C$\output.txt")
If objHPOutputFile.Size <> 0 Then
' Close File
Set objHPOutputFile = Nothing
' Continue Processesing File
Set objHPInputFile = objHPFSO.OpenTextFile("\\" & strComputer2 & "\C$\output.txt", ForReading)
Do Until objHPInputFile.AtEndOfStream
strHPArray = strHPArray & objHPInputFile.ReadLine & vbcrlf
Loop
' Close Input File
objHPInputFile.Close
' Close Link to Server
objHPFSO.DeleteFile("\\" & strComputer2 & "\C$\output.txt")
Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
Do While (objGetHPArray.Status = 0)
WScript.Sleep(500)
Loop
' Create String Array
strHPParse = Split(strHPArray, vbcrlf)
' Parse For Individual RAID Arrays
Dim strArrayList()
z = 0
For i = 0 To UBound(strHPParse)
j = 0
' Array and Drives
If InStr(strHPParse(i), "Array Specifications") Then
ReDim Preserve strArrayList(z)
strArrayList(z) = strArrayList(z) & strHPParse(i) & vbcrlf
For j = i + 1 To Ubound(strHPParse)
If InStr(strHPParse(j), "Array Specifications") Then
Exit For
Else
strArrayList(z) = strArrayList(z) & strHPParse(j) & vbcrlf
End If
Next
z = z + 1
End If
Next
' Process Each RAID Array
x = 0
For x = 0 To UBound(strArrayList)
strListParse = Split(strArrayList(x), vbcrlf)
For y = 0 To UBound(strListParse)
' Drives
If Left(strListParse(y), 6) = "Drive=" Then
strDrives = ""
strDrives = Split(strListParse(y), ",")
k = 0
For j = 0 To UBound(strDrives)
k = k + 1
Next
strDriveCount = k ' For Output
End If
' Hot Spare
If InStr(strListParse(y), "OnlineSpare=") Then
If InStr(strListParse(y), "OnlineSpare= No") Then
strHotSpare = strHotSpare & "N" ' For Output
Else
strHotSpare = strHotSpare & "Y" ' For Output
End If
End If
' Logical Drives
If InStr(strListParse(y), "Logical Drive Specifications") Then
' Find First Logical Drive
strRAID = Split(strListParse(y + 2), " ")
strRAIDResult = strRAIDResult & "RAID " & strRAID(1) & " / " ' For Output
strGetDrive = Split(strListParse(y + 3), " ")
strRAIDSize = strRAIDSize & ByteConvertRAID(strGetDrive(1)) & " / " ' For Output
End If
Next
' Process Results
strRAIDSize = Left(strRAIDSize, Len(strRAIDSize) - 3)
strRAIDResult = Left(strRAIDResult, Len(strRAIDResult) - 3)
strNewList = strNewList & strDriveCount & _
":" & strRAIDSize & ":" & strRAIDResult & ":" & strHotSpare & Chr(13)
' Dispose Array Variables
strDriveCount = ""
strRAIDSize = ""
strRAIDResult = ""
strHotSpare = ""
Next
' Return Array Output
GetHPArray = Left(strNewList, Len(strNewList) - 1)
Exit Function
Else ' "output.txt" Is Locked
' Close File
Set objHPOutputFile = Nothing
' Kill Remote Connection
Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
Do While (objGetHPArray.Status = 0)
WScript.Sleep(500)
Loop
GetHPArray = ""
Exit Function
End If
Else ' "output.txt" Does not Exist
' Kill Remote Connection
Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
Do While (objGetHPArray.Status = 0)
WScript.Sleep(500)
Loop
GetHPArray = ""
Exit Function
End If
Else ' "Array Manager Does not Exist
' Input not Available
Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
Do While (objGetHPArray.Status = 0)
WScript.Sleep(500)
Loop
GetHPArray = ""
Exit Function
End If
End Function
'--------------------Functions (End)--------------------'
' Set Excel Attributes
Const xlVAlignTop = -4160
Set objRange2 = objWorksheet.UsedRange
objRange2.VerticalAlignment = xlVAlignTop
' Set Font Attributes
objXLA.Cells.Font.Size = 8
objXLA.Cells.Font.Name = "Arial"
objXLA.Cells.Font.ColorIndex = 11
objXLA.Cells.EntireColumn.AutoFit
objXLA.Cells(1, 9).ColumnWidth = 30 ' RAM Slots
objXLA.Cells(1, 11).ColumnWidth = 40 ' NIC Port
objXLA.Cells(1, 13).ColumnWidth = 25 ' Connection Name
objXLA.Cells(1, 14).ColumnWidth = 25 ' Interface IP's
objXLA.Cells(1, 15).ColumnWidth = 25 ' Virtual IP's
objXLA.Cells(1, 16).ColumnWidth = 15 ' DNS1
objXLA.Cells(1, 17).ColumnWidth = 15 ' DNS2
objXLA.Cells(1, 18).ColumnWidth = 15 ' Interface Type
objXLA.Cells.HorizontalAlignment = 2 ' Drive Count
objXLA.Cells(1, 20).ColumnWidth = 20 ' Virtual IP's
objXLA.Cells(1, 21).ColumnWidth = 20 ' Virtual IP's
' Save
set objFSO2 = CreateObject("Scripting.FileSystemObject")
strFileName = objFSO2.getAbsolutePathName("") & "\Scan Results.xls"
objWorkbook.SaveAs(strFileName)
objWorkbook.Close
objXLA.Quit
' Notify User
WScript.Echo "Process Completed (" & Now & ")"
' Close Program
WScript.Quit(0)I Need my script modified to run this script and output to CSV but its so big I am not sure where to start. I don't need it in XLS at all, and I can add my own headers, cell sizes and colors, etc. so It should just output the data to a simple CSV.
On Error Resume Next
Dim PUBOSVer ' Global OS Version
' Open File For Writing
Set WshNetwork = WScript.CreateObject("WScript.Network")
Const ForReading = 1
' Get Server List
strServerFilename = "servers.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strServerFilename) Then
' Open Servers File
Set objServers = objFSO.OpenTextFile(strServerFilename, ForReading)
Else
' Server File is missing: Exit
intMsg = MsgBox("File: " & Chr(34) & UCASE(strServerFilename) & Chr(34) & _
" is either " & _
"Missing or Damaged!" & vbcrlf & _
vbcrlf & _
"This Script will now Exit.", vbCritical, "Server File Error")
WScript.Quit(0)
End If
Do Until objServers.AtEndOfStream
strNewServer = Trim(objServers.ReadLine)
strServerList = strServerList & strNewServer & vbcrlf
intServerCnt = intServerCnt + 1
Loop
' Enumerate Server Array
For a = 0 To intServerCnt - 1
strServer = Split(strServerList, vbcrlf)
Next
' Create Excel Spreadsheet
Set objXLA = CreateObject("Excel.Application")
objXLA.Visible = False
objXLA.DisplayAlerts = False
Set objWorkbook = objXLA.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)
'Excel Constants
Const xlEdgeLeft = 7
Const xlContinuous = 1
Const xlNone = -4142
Const xlMedium = -4138
Const xlThin = 2
'Set Headers
' System Information
objXLA.Cells(1,1).Value = "Service ID"
objXLA.Cells(1,2).Value = "Company Name"
objXLA.Cells(1,3).Value = "Manufacturer"
objXLA.Cells(1,4).Value = "Model"
objXLA.Cells(1,5).Value = "Operating System"
' Processors
objXLA.Cells(1,6).Value = "Processor Type"
objXLA.Cells(1,7).Value = "Processors"
' RAM
objXLA.Cells(1,8).Value = "RAM"
objXLA.Cells(1,9).Value = "Slots"
objXLA.Cells(1,10).Value = "Max Capacity"
' Network
objXLA.Cells(1,11).Value = "NIC Port"
objXLA.Cells(1,12).Value = "Speed"
objXLA.Cells(1,13).Value = "Connection Name"
objXLA.Cells(1,14).Value = "Primary IP"
objXLA.Cells(1,15).Value = "Virtual IP"
objXLA.Cells(1,16).Value = "Primary DNS"
objXLA.Cells(1,17).Value = "Secondary DNS"
' Hard Disks
objXLA.Cells(1,18).Value = "Interface"
objXLA.Cells(1,19).Value = "Physical Disks"
objXLA.Cells(1,20).Value = "Disk Size"
objXLA.Cells(1,21).Value = "Fault Tolerant"
objXLA.Cells(1,22).Value = "Hot Spare"
' Set Top Line
objXLA.Cells(1, 1).EntireRow.Font.Bold = True
objXLA.Cells(1, 1).EntireRow.Font.Underline = True
For b = 0 To UBound(strServer) - 1
strServerParts = Split(strServer(b), " ")
strComputer = strServerParts(0)
' Parse Server Information
If UBound(strServerParts) = 2 Then
strUsername = Trim(strServerParts(1))
strPassword = Trim(strServerParts(2))
End If
' Create Connection Object
Set objWMIService = Nothing
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer _
(strComputer, "root\cimv2", strUsername, strPassword)
objWMIServices.Security_.ImpersonationLevel = 3
' Check if Server Exists
For intWMICheck = 0 To 15
If Not objWMIService Is Nothing Then
Exit For
Else
WScript.Sleep(1000)
End If
Next
' Server Exists
If intWMICheck < 15 Then
' Get CPU Information
Set colProcessor = objWMIService.ExecQuery("SELECT * FROM Win32_Processor")
For Each colProc In colProcessor
strManuf = colProc.Manufacturer
strDescription = ProcessorName(colProc.Name)
strClockSpeed = colProc.CurrentClockSpeed
strSocket = strSocket & colProc.SocketDesignation & vbcrlf
strProcID = strProcID & colProc.ProcessorID & vbcrlf
strUniqueID = strUniqueID & colProc.UniqueID & vbcrlf
ProcCount = ProcCount + 1
Next
' Determine if Hyperthreading is Enabled
strHTStatus = GetHTStatus(strSocket, ProcCount, strProcID, strUniqueID)
' DC / HT Results
If strHTStatus = "True" Then
If InStr(strManuf, "Intel") Then
strDescription = strDescription & " (Dual Core or H/T)"
Else
strDescription = strDescription & " (Dual Core)"
End If
ProcCount = ProcCount / 2
End If
' Export Information
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colCS = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
' Write Basic System Information
For Each objItem in colCS
Set colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
For Each objItemOS in colOS
' Get SP Version
If objItemOS.CSDVersion <> "" Then
strSPVersion = objItemOS.CSDVersion
Else
strSPVersion = "No Service Packs Installed"
End If
If objItemOS.LastBootUpTime <> "" Then
strLastBoot = DateConvert(objItemOS.LastBootUpTime)
Else
strLastBoot = "N/A"
End If
' Set OS Version Information
PUBOSVer = objItemOS.Caption
objXLA.Cells(b + 2, 1).Value = objItemOS.csname
objXLA.Cells(b + 2, 3).Value = objItem.Manufacturer
objXLA.Cells(b + 2, 4).Value = objItem.Model
objXLA.Cells(b + 2, 5).Value = PUBOSVer & " - " & strSPVersion
objXLA.Cells(b + 2, 6).Value = strDescription
objXLA.Cells(b + 2, 7).Value = ProcCount
objXLA.Cells(b + 2, 8).Value = MemoryConvert(objItem.TotalPhysicalMemory)
Next
Next
' Get Memory Breakdown
Dim strMemBreak
strMemBreak = Split(MemoryBreakdown(), vbcrlf)
n = 0
For n = 0 To UBound(strMemBreak) - 1
strSlots = strSlots & strMemBreak(n) & Chr(10)
Next
strMaxCapacity = strMemBreak(UBound(strMemBreak))
objXLA.Cells(b + 2, 9).Value = Left(strSlots, Len(strSlots) - 1)
objXLA.Cells(b + 2, 10).Value = strMaxCapacity
' Dispose
strMemBreak = ""
strMaxCapacity = ""
strSlots = ""
'--------------Computer Information (End)------------------'
'-------------Partition Information (Start)----------------'
' Get Drive Count
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set DiskItemsParent = objWMIService.ExecQuery("Select * from Win32_DiskDrive")
intCount = DiskItemsParent.Count
' Process Drives
intDriveMark = 0
For i = 0 To intCount - 1
Set DiskItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive WHERE Index = " & i)
For Each diskItem in DiskItems
' Convert Drive Size
If diskItem.Size <> "" Then strSize = strSize & ByteConvert(diskItem.Size) & Chr(10) Else strSize = "N/A" & Chr(10)
If diskItem.StatusInfo <> "" Then strStsInfo = diskItem.StatusInfo Else strStsInfo = "N/A"
If diskItem.SCSIBus <> "" Then strSCSIBus = diskItem.SCSIBus Else strSCSIBus = "N/A"
If diskItem.SCSILogicalUnit <> "" Then strSCSILog = diskItem.SCSILogicalUnit Else strSCSILog = "N/A"
If diskItem.SCSIPort <> "" Then strSCSIPort = diskItem.SCSIPort Else strSCSIPort = "N/A"
If diskItem.SCSITargetId <> "" Then strSCSITarget = diskItem.SCSITargetId Else strSCSITarget = "N/A"
' Get Model
strModel = Split(diskItem.Model, " ")
' Detect HP Array
If (UCase(strModel(0)) = "HP" Or UCase(strModel(0)) = "COMPAQ") And intDriveMark = 0 Then
strGetHPArray = GetHPArray(strComputer, strUsername, strPassword)
If strGetHPArray <> "" Then
strSplitHP = Split(strGetHPArray, Chr(13))
For a = 0 To UBound(strSplitHP)
strSplitResult = Split(strSplitHP(a), ":")
i = i + 1
strDriveCount = strDriveCount & Trim(strSplitResult(0)) & Chr(10)
strDriveSize = strDriveSize & Trim(strSplitResult(1)) & Chr(10)
strDriveFault = strDriveFault & Trim(strSplitResult(2)) & Chr(10)
strDriveSpare = strDriveSpare & Trim(strSplitResult(3)) & Chr(10)
strInterface = strInterface & "HP SCSI" & Chr(10)
Next
' Set Controller Output
objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
intDriveMark = 1 ' Mark That Data was Obtained
Else
strDriveCount = strDriveCount & "1" & Chr(10)
strDriveSize = strDriveSize & strSize & Chr(10)
strDriveFault = strDriveFault & "N/A" & Chr(10)
strDriveSpare = strDriveSpare & "N/A" & Chr(10)
strInterface = strInterface & "HP SCSI " & Chr(10)
' Set Controller Output
intDriveMark = 1 ' Mark That Another Pass is Invalid
' Set Controller Output
objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
End If
Else
strDriveCount = strDriveCount & "1" & Chr(10)
strDriveSize = strDriveSize & strSize & Chr(10)
strDriveFault = strDriveFault & "N/A" & Chr(10)
strDriveSpare = strDriveSpare & "N/A" & Chr(10)
' Set Controller Output
intDriveMark = 1 ' Mark That Another Pass is Invalid
' Set Controller Output
objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
' Set Interface
If diskItem.InterfaceType = "IDE" Then
strInterface = strInterface & "ATA" & Chr(10)
Else
strInterface = strInterface & "SATA/SCSI" & Chr(10)
End If
End If
' Set Cell Value "Interface"
objXLA.Cells(b + 2, 18).Value = Left(strInterface, Len(strInterface) - 1)
Next
' Dispose Drive Sizes
strDriveSize = ""
Next
' Dispose Drive Values
strDriveCount = ""
strDriveFault = ""
strDriveSpare = ""
strInterface = ""
'----Partition Information (End)---------------------------'
'----Network Information (Start)---------------------------'
Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter")
i = 1
eth = 0
Dim STOREDIP(0)
intNum = 0
For Each objItem in colItems
If objItem.NetConnectionStatus <> "" Then
' Determine Connection Status
If objItem.NetConnectionStatus = 0 Then
strNetStat = "Disabled"
ElseIf objItem.NetConnectionStatus = 2 Then
strNetStat = "Connected"
ElseIf objItem.NetConnectionStatus = 7 Then
strNetStat = "Disconnected"
Else
strNetStat = "Unknown"
End If
If objItem.NetConnectionStatus <> 0 Then
' Get Network Card Information
Const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath1 = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
strKeyPath2 = "SYSTEM\CurrentControlSet\Services\NetBT\Parameters"
strHostEntry = "Hostname"
strDomainEntry = "Domain"
strNodeEntry = "DhcpNodeType"
strRoutingEntry = "IPEnableRouter"
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strHostEntry,strHostname
objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strDomainEntry,strDomain
objReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath2,strNodeEntry,dwNodeType
objReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath1,strRoutingEntry,dwIPRouting
Select Case dwNodeType
Case 4 strNodeType = "Mixed"
Case 8 strNodeType = "Hybrid"
Case Else strNodeType = dwNodeType
End Select
If dwIPRouting = 0 Then
strIPRouting = "No"
ElseIf dwIPRouting = 1 Then
strIPRouting = "Yes"
Else
strIPRouting = "?"
End If
Set colFirstNicConfig = objWMIService.ExecQuery _
("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each objFirstNicConfig In colFirstNicConfig
strDnsWins = objFirstNicConfig.DNSEnabledForWINSResolution
Next
Set colNicConfigs = objWMIService.ExecQuery _
("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
' Display per-adapter settings.
For Each objNicConfig In colNicConfigs
intIndex = objNicConfig.Index
Set objNic = objWMIService.Get("Win32_NetworkAdapter.DeviceID=" & intIndex)
' Connection Name
If GetOsVer > 5 Then
' Works only in XP / 2003
strNetConn = objNic.NetConnectionID
ElseIf GetOsVer = 5 Then
strNetConn = ""
' Get Home Drive of Remote Server
Set objShell = CreateObject("WScript.Shell")
Set objEtherName = objShell.Exec("cmd /c ipconfig | find " & Chr(34) & "Ethernet" & Chr(34))
strEtherName = objEtherName.StdOut.ReadAll()
strEtherParse = Split(strEtherName, Chr(13))
strEtherConn = Split(strEtherParse(eth), " ")
For y = 2 To UBound(strEtherConn)
strNetConn = strNetConn & " " & strEtherConn(y)
Next
' Trim Connection Name
strNetConn = Left(Trim(strNetConn), Len(Trim(strNetConn)) - 1)
Else
strNetConn = ""
End If
' IP Addresses
strIPAddresses = ""
If Not IsNull(objNicConfig.IPAddress) Then
For Each strIPAddress In objNicConfig.IPAddress
strIPAddresses = strIPAddresses & strIPAddress & " "
Next
End If
strIPCollection = Split(strIPAddresses, " ")
' Subnets
strIPSubnets = ""
If Not IsNull(objNicConfig.IPSubnet) Then
For Each strIPSubnet In objNicConfig.IPSubnet
strIPSubnets = strIPSubnets & strIPSubnet & " "
Next
End If
strSMCollection = Split(strIPSubnets, " ")
' Virtual IP's
strVirtual = ""
If UBound(strIPCollection) > 1 Then
For IPCount = 1 To UBound(strIPCollection) - 1
strVirtual = strVirtual & (strIPCollection(IPCount) & " / " & strSMCollection(IPCount)) & Chr(10)
Next
strVirtual = Left(strVirtual, Len(strVirtual) - 1)
End If
If Trim(strVirtual) = "" Then strVirtual = "N/A"
' Gateways
strDefaultIPGateways = ""
If Not IsNull(objNicConfig.DefaultIPGateway) Then
For Each strDefaultIPGateway In objNicConfig.DefaultIPGateway
strDefaultIPGateways = strDefaultIPGateways & strDefaultIPGateway & " "
Next
Else
strDefaultIPGateways = "N/A"
End If
' If IP is repeated, and was already reported.
intSkipLoop = 0
If Trim(strNetConn) <> "" Then
For j = 0 To intNum - 1
If STOREDIP(j) = strIPAddresses Then
intSkipLoop = 1
Exit For
End If
Next
If intSkipLoop = 0 Then
ReDim Preserve STOREDIP(intNum)
STOREDIP(intNum) = strIPAddresses
intNum = intNum + 1
End If
Else
intSkipLoop = 1
End If
' DNS
strDNSServerSearchOrder = ""
If Not IsNull(objNicConfig.DNSServerSearchOrder) Then
For Each strDNSServer In objNicConfig.DNSServerSearchOrder
strDNSServerSearchOrder = strDNSServerSearchOrder & strDNSServer & " "
Next
strDNS = Split(strDNSServerSearchOrder, " ")
strDNS1 = strDNS(0)
If Trim(strDNS1) = "" Then strDNS1 = "N/A"
If UBound(strDNS) > 1 Then
strDNS2 = strDNS(1)
Else
strDNS2 = "N/A"
End If
Else
strDNS1 = "N/A"
strDNS2 = "N/A"
End If
' Run Output Process
If intSkipLoop = 0 Then
' Connection Speed
strSpeed = "Unknown"
Set objWMIService2 = objSWbemLocator.ConnectServer _
(strComputer, "root\WMI", strUsername, strPassword)
objWMIServices.Security_.ImpersonationLevel = 3
Set listAdapters = objWMIService2.ExecQuery("SELECT * FROM MSNdis_LinkSpeed")
Set enumAdapters = objWMIService2.ExecQuery("SELECT * FROM MSNdis_EnumerateAdapter")
For Each objAdapter in listAdapters
For Each objEnum in enumAdapters
intEnum = Len(objEnum.DeviceName)
If objNicConfig.SettingID = Right(objEnum.DeviceName, intEnum - 8) Then
If objEnum.InstanceName = objAdapter.InstanceName Then
intLength = Len(objAdapter.NdisLinkSpeed/10000)
If intLength > 3 Then
strSpeed = Left(objAdapter.NdisLinkSpeed/10000, intLength - 3)
strSpeed = strSpeed & ".0 Gbps"
Else
strSpeed = objAdapter.NdisLinkSpeed/10000 & " Mbps"
End If
End If
End If
Next
Next
strTotalDesc = strTotalDesc & objNicConfig.Description & Chr(10)
strTotalSpeed = strTotalSpeed & strSpeed & Chr(10)
strTotalNetConn = strTotalNetConn & strNetConn & Chr(10)
strPrimaryIP = strPrimaryIP & strIPCollection(0) & " / " & strSMCollection(0) & Chr(10)
strDNSTotal1 = strDNSTotal1 & strDNS1 & Chr(10)
strDNSTotal2 = strDNSTotal2 & strDNS2 & Chr(10)
strTotalVirtual = strTotalVirtual & strVirtual & Chr(10)
i = i + 1
eth = eth + 2
' Dispose
strDescription = ""
ProcCount = 0
strClockSpeed = ""
strInterface = ""
intCount = 0
strSize = ""
strSpeed = ""
strIPCollection = ""
strVirtual = ""
strDNS = ""
strDNS1 = ""
strDNS2 = ""
End If
Next
' Output
' Trim Leading Chr(10)
If Left(strPrimaryIP, 1) = Chr(10) Then strPrimaryIP = Right(strPrimaryIP, Len(strPrimaryIP) - 1)
If Left(strTotalVirtual, 1) = Chr(10) Then strTotalVirtual = Right(strTotalVirtual, Len(strTotalVirtual) - 1)
If Left(strDNSTotal1, 1) = Chr(10) Then strDNSTotal1 = Right(strDNSTotal1, Len(strDNSTotal1) - 1)
If Left(strDNSTotal2, 1) = Chr(10) Then strDNSTotal2 = Right(strDNSTotal2, Len(strDNSTotal2) - 1)
objXLA.Cells(b + 2, 11).Value = Trim(Left(strTotalDesc, Len(strTotalDesc) - 1))
objXLA.Cells(b + 2, 12).Value = Trim(Left(strTotalSpeed, Len(strTotalSpeed) - 1))
objXLA.Cells(b + 2, 13).Value = Trim(Left(strTotalNetConn, Len(strTotalNetConn) - 1))
objXLA.Cells(b + 2, 14).Value = Trim(Left(strPrimaryIP, Len(strPrimaryIP) - 1))
objXLA.Cells(b + 2, 15).Value = Trim(Left(strTotalVirtual, Len(strTotalVirtual) - 1))
objXLA.Cells(b + 2, 16).Value = Trim(Left(strDNSTotal1, Len(strDNSTotal1) - 1))
objXLA.Cells(b + 2, 17).Value = Trim(Left(strDNSTotal2, Len(strDNSTotal2) - 1))
End If
End If
' Dispose Per Loop
strTotalDesc = ""
strTotalSpeed = ""
strTotalNetConn = ""
strPrimaryIP = ""
strDNSTotal1 = ""
strDNSTotal2 = ""
strTotalVirtual = ""
Set eth = 0
Set i = 0
Next
'------------Network Information (End)------------------'
Else
'No Data Present
objXLA.Cells(b + 2, 1).Value = strComputer
objXLA.Cells(b + 2, 3).Value = "Information Not Available"
objXLA.Cells(b + 2, 1).EntireRow.Font.Bold = True
objXLA.Cells(b + 2, 1).EntireRow.Interior.ColorIndex = 44
End If
' Dispose Per Server
ProcCount = 0
strSocket = ""
strProcID = ""
strUniqueID = ""
Set objWMIService = Nothing
Next
'-----------------Functions (Start)---------------------'
' System Memory Conversion
Function MemoryConvert(strMem)
Dim intLength
Dim intExp
Dim intSize
Dim strSize
Dim strMeasure
Dim strMemory
intLength = Len(strMem)
If (intLength Mod 4 = 0) Then
intExp = CInt((intLength / 3) - 2)
Else
intExp = CInt((intLength / 3) - 1)
End If
' Convert to Lowest Integer Value
For intCount = 1 To Len(intExp)
chrRead = Mid(intExp, intCount, 1)
If chrRead = "." Then
Exit For
Else
strRead = strRead & chrRead
End If
Next
intExp = Cint(strRead)
intSize = CLng(strMem / (2 ^ (intExp * (10))))
If Len(intSize) = 1 Then
strFormat = FormatNumber(CStr(intSize), 2)
Else
strFormat = intSize + 1
End If
If (intExp = 1) Then
strMeasure = "KB"
ElseIf (intExp = 2) Then
strMeasure = "MB"
ElseIf (intExp = 3) Then
strMeasure = "GB"
ElseIf (intExp = 4) Then
strMeasure = "TB"
ElseIf (intExp = 5) Then
strMeasure = "PB"
ElseIf (intExp = 6) Then
strMeasure = "EB"
End If
MemoryConvert = strFormat & " " & strMeasure
End Function
' System Byte Conversion
Function ByteConvert(strMem)
Dim intLength
Dim intExp
Dim intSize
Dim strSize
Dim strMeasure
Dim strMemory
intLength = Len(strMem)
If (intLength Mod 3 = 0) Then
intExp = (intLength / 3) - 1
Else
intExp = (intLength / 3)
End If
' Convert to Lowest Integer Value
For intCount = 1 To Len(intExp)
chrRead = Mid(intExp, intCount, 1)
If chrRead = "." Then
Exit For
Else
strRead = strRead & chrRead
End If
Next
intExp = Cint(strRead)
intSize = CLng(strMem / (2 ^ (intExp * (10))))
strFormat = FormatNumber(CStr(intSize), 2)
If (intExp = 1) Then
strMeasure = "KB"
ElseIf (intExp = 2) Then
strMeasure = "MB"
ElseIf (intExp = 3) Then
strMeasure = "GB"
ElseIf (intExp = 4) Then
strMeasure = "TB"
ElseIf (intExp = 5) Then
strMeasure = "PB"
ElseIf (intExp = 6) Then
strMeasure = "EB"
End If
ByteConvert = strFormat & " " & strMeasure
End Function
' System RAID Byte Conversion
Function ByteConvertRAID(strMem)
Dim intLength
Dim intExp
Dim intSize
Dim strSize
Dim strMeasure
Dim strMemory
intLength = Len(strMem)
If (intLength Mod 3 = 0) Then
intExp = (intLength / 3) - 1
Else
intExp = (intLength / 3)
End If
' Convert to Lowest Integer Value
For intCount = 1 To Len(intExp)
chrRead = Mid(intExp, intCount, 1)
If chrRead = "." Then
Exit For
Else
strRead = strRead & chrRead
End If
Next
intExp = Cint(strRead)
intSize = (strMem / (2 ^ (intExp * (10))))
strFormat = FormatNumber(CStr(intSize), 2)
If (intExp = 0) Then
strMeasure = "MB"
ElseIf (intExp = 1) Then
strMeasure = "GB"
ElseIf (intExp = 2) Then
strMeasure = "TB"
ElseIf (intExp = 3) Then
strMeasure = "PB"
ElseIf (intExp = 4) Then
strMeasure = "EB"
End If
ByteConvertRAID = strFormat & " " & strMeasure
End Function
' Trim Processor Description
Function ProcessorName(strName)
Dim intCounter
Dim strRead
Dim chrRead, chrReadMore
For intCounter = 1 to Len(strName)
chrRead = Mid(strName, intCounter, 1)
chrReadMore = Mid(strName, intCounter + 1, 1)
If ((chrRead <> " ") Or ((chrRead = " ") And (chrReadMore <> " "))) Then
strRead = strRead & chrRead
End If
Next
ProcessorName = Trim(strRead)
End Function
' Get Hyper-Threading Status
Function GetHTStatus(strName, intProc, strID, strUnique)
strNameArray = Split(strName, vbcrlf)
strIDArray = Split(strID, vbcrlf)
strUniqueList = Split(strUnique, vbcrlf)
intTotal = 0
' Check Socket Designation
For i = 0 To UBound(strNameArray) - 1
intMark = 1
' Check for Redundancies
For j = i + 1 To UBound(strNameArray) - 1
If strNameArray(i) = strNameArray(j) Then
intMark = 0
End If
Next
' If Redundant Unique ID's Exist
For j = i + 1 To UBound(strNameArray) - 1
If strUniqueList(i) <> "" And strUniqueList(j) <> "" And _
(strUniqueList(i) <> strUniqueList(j)) Then
intMark = 1
End If
Next
' Check for NULL ProcessorID
If Trim(strIDArray(i)) = "0000000000000000" Then
intMark = 0
End If
' Calculate Total
If intMark = 1 Then
intTotal = intTotal + intMark
End If
Next
' Compare Results
If intProc = 2 * intTotal Then
GetHTStatus = "True"
Else
GetHTStatus = "False"
End If
End Function
' Get Memory Breakdown
Function MemoryBreakdown
Set colPMAItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray",,48)
For Each objPMAItem in colPMAItems
lngMax = CLng(objPMAItem.MaxCapacity)
intCount = CInt(objPMAItem.MemoryDevices)
Next
ReDim Preserve strPMArray(intCount)
Set colPMItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory",,48)
For Each objPMItem in colPMItems
strValue = strValue & objPMItem.DeviceLocator & ": "
strValue = strValue & objPMItem.Capacity / 2^20 & "MB, "
strValue = strValue & objPMItem.Speed & "MHz"
strPMArray(TrimTrailingNumber(objPMItem.Tag)) = strValue
strValue = ""
Next
j = 0
strResult = ""
For j = 0 To intCount - 1
If Trim(strPMArray(j)) = "" Then strPMArray(j) = "<Empty>"
strResult = strResult & strPMArray(j) & vbcrlf
Next
strResult = strResult & (lngMax / 2^10) & "MB"
MemoryBreakdown = strResult
End Function
' Get Part Name
Function ExtractPartName(strName)
Dim chrRead
Dim strRead
Dim i
For i = 2 To Len(strName)
chrRead = Mid(strName, Len(strName) - (i - 1), 1)
If chrRead <> Chr(34) Then
strRead = chrRead & strRead
Else
Exit For
End If
Next
ExtractPartName = strRead
End Function
' Get Trailing Number
Function TrimTrailingNumber(strNum)
Dim chrRead
Dim strRead
Dim intLen
strNum = Trim(strNum)
intLen = Len(strNum)
i = 1
For i = 1 To intLen
chrRead = Mid(strNum, intLen - (i - 1), 1)
If IsNumeric(chrRead) = "True" Then
strRead = chrRead & strRead
Else
Exit For
End If
Next
TrimTrailingNumber = strRead
End Function
' Function: WMIDateStringToDate(dtmDate)
Function WMIDateToString(dtmDate)
WMIDateToString = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & _
Left(dtmDate, 4) & " " & _
Mid(dtmDate, 9, 2) & ":" & _
Mid(dtmDate, 11, 2) & ":" & _
Mid(dtmDate, 13, 2))
End Function
' Function: GetOsVer
Function GetOsVer
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem In colOperatingSystems
GetOSVer = CSng(Left(objOperatingSystem.Version, 3))
Next
End Function
' Function: GetHPArray
Function GetHPArray(strComputer2, strUsername2, strPassword2)
' Check for 64-bit Windows
If InStr(PUBOSVer, "x64") Then
strCompaq = "Program Files (x86)\Compaq\Cpqacuxe\Bin"
Else
strCompaq = "Program Files\Compaq\Cpqacuxe\Bin"
End If
' Create Connection Object
Set objWMIServiceRem = objWMIService.Get("Win32_Process")
' Confirm Location of Compaq Array Manager
Set objHPShell = CreateObject("WScript.Shell")
Set objHPFSO = CreateObject("Scripting.FileSystemObject")
Set WshNetwork2 = WScript.CreateObject("WScript.Network")
WshNetwork2.MapNetworkDrive "", "\\" & strComputer2 & "\C$" ,,strUsername2, strPassword2
strProgram = "\\" & strComputer2 & "\C$\" & strCompaq & "\cpqacuxe.exe"
' Ensure Access is Possible
If objHPFSO.FileExists(strProgram) Then
' Process Array Config
strProcess = Chr(34) & "C:\" & strCompaq & "\cpqacuxe.exe" & Chr(34) & " -c c:\output.txt"
Process = objWMIServiceRem.Create(strProcess, null, null, intProcessID)
' Check for "output.txt"
For intTimerHP = 0 To 10
If objFSO.FileExists("\\" & strComputer2 & "\C$\output.txt") Then
Exit For
Else
WScript.Sleep(1000)
End If
Next
' Process Output
If intTimerHP < 10 Then
' Check for Locked Output File
Set objHPOutputFile = objHPFSO.GetFile("\\" & strComputer2 & "\C$\output.txt")
If objHPOutputFile.Size <> 0 Then
' Close File
Set objHPOutputFile = Nothing
' Continue Processesing File
Set objHPInputFile = objHPFSO.OpenTextFile("\\" & strComputer2 & "\C$\output.txt", ForReading)
Do Until objHPInputFile.AtEndOfStream
strHPArray = strHPArray & objHPInputFile.ReadLine & vbcrlf
Loop
' Close Input File
objHPInputFile.Close
' Close Link to Server
objHPFSO.DeleteFile("\\" & strComputer2 & "\C$\output.txt")
Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
Do While (objGetHPArray.Status = 0)
WScript.Sleep(500)
Loop
' Create String Array
strHPParse = Split(strHPArray, vbcrlf)
' Parse For Individual RAID Arrays
Dim strArrayList()
z = 0
For i = 0 To UBound(strHPParse)
j = 0
' Array and Drives
If InStr(strHPParse(i), "Array Specifications") Then
ReDim Preserve strArrayList(z)
strArrayList(z) = strArrayList(z) & strHPParse(i) & vbcrlf
For j = i + 1 To Ubound(strHPParse)
If InStr(strHPParse(j), "Array Specifications") Then
Exit For
Else
strArrayList(z) = strArrayList(z) & strHPParse(j) & vbcrlf
End If
Next
z = z + 1
End If
Next
' Process Each RAID Array
x = 0
For x = 0 To UBound(strArrayList)
strListParse = Split(strArrayList(x), vbcrlf)
For y = 0 To UBound(strListParse)
' Drives
If Left(strListParse(y), 6) = "Drive=" Then
strDrives = ""
strDrives = Split(strListParse(y), ",")
k = 0
For j = 0 To UBound(strDrives)
k = k + 1
Next
strDriveCount = k ' For Output
End If
' Hot Spare
If InStr(strListParse(y), "OnlineSpare=") Then
If InStr(strListParse(y), "OnlineSpare= No") Then
strHotSpare = strHotSpare & "N" ' For Output
Else
strHotSpare = strHotSpare & "Y" ' For Output
End If
End If
' Logical Drives
If InStr(strListParse(y), "Logical Drive Specifications") Then
' Find First Logical Drive
strRAID = Split(strListParse(y + 2), " ")
strRAIDResult = strRAIDResult & "RAID " & strRAID(1) & " / " ' For Output
strGetDrive = Split(strListParse(y + 3), " ")
strRAIDSize = strRAIDSize & ByteConvertRAID(strGetDrive(1)) & " / " ' For Output
End If
Next
' Process Results
strRAIDSize = Left(strRAIDSize, Len(strRAIDSize) - 3)
strRAIDResult = Left(strRAIDResult, Len(strRAIDResult) - 3)
strNewList = strNewList & strDriveCount & _
":" & strRAIDSize & ":" & strRAIDResult & ":" & strHotSpare & Chr(13)
' Dispose Array Variables
strDriveCount = ""
strRAIDSize = ""
strRAIDResult = ""
strHotSpare = ""
Next
' Return Array Output
GetHPArray = Left(strNewList, Len(strNewList) - 1)
Exit Function
Else ' "output.txt" Is Locked
' Close File
Set objHPOutputFile = Nothing
' Kill Remote Connection
Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
Do While (objGetHPArray.Status = 0)
WScript.Sleep(500)
Loop
GetHPArray = ""
Exit Function
End If
Else ' "output.txt" Does not Exist
' Kill Remote Connection
Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
Do While (objGetHPArray.Status = 0)
WScript.Sleep(500)
Loop
GetHPArray = ""
Exit Function
End If
Else ' "Array Manager Does not Exist
' Input not Available
Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
Do While (objGetHPArray.Status = 0)
WScript.Sleep(500)
Loop
GetHPArray = ""
Exit Function
End If
End Function
'--------------------Functions (End)--------------------'
' Set Excel Attributes
Const xlVAlignTop = -4160
Set objRange2 = objWorksheet.UsedRange
objRange2.VerticalAlignment = xlVAlignTop
' Set Font Attributes
objXLA.Cells.Font.Size = 8
objXLA.Cells.Font.Name = "Arial"
objXLA.Cells.Font.ColorIndex = 11
objXLA.Cells.EntireColumn.AutoFit
objXLA.Cells(1, 9).ColumnWidth = 30 ' RAM Slots
objXLA.Cells(1, 11).ColumnWidth = 40 ' NIC Port
objXLA.Cells(1, 13).ColumnWidth = 25 ' Connection Name
objXLA.Cells(1, 14).ColumnWidth = 25 ' Interface IP's
objXLA.Cells(1, 15).ColumnWidth = 25 ' Virtual IP's
objXLA.Cells(1, 16).ColumnWidth = 15 ' DNS1
objXLA.Cells(1, 17).ColumnWidth = 15 ' DNS2
objXLA.Cells(1, 18).ColumnWidth = 15 ' Interface Type
objXLA.Cells.HorizontalAlignment = 2 ' Drive Count
objXLA.Cells(1, 20).ColumnWidth = 20 ' Virtual IP's
objXLA.Cells(1, 21).ColumnWidth = 20 ' Virtual IP's
' Save
set objFSO2 = CreateObject("Scripting.FileSystemObject")
strFileName = objFSO2.getAbsolutePathName("") & "\Scan Results.xls"
objWorkbook.SaveAs(strFileName)
objWorkbook.Close
objXLA.Quit
' Notify User
WScript.Echo "Process Completed (" & Now & ")"
' Close Program
WScript.Quit(0) -
I have adobe flash media encoder 3.1 installed and am trying to stream downloaded .avi, .mpeg, and other video files to justin.tv using ManyCam, Everything seems to be working fine, video stream is clear and not choppy. Audio on my end is clear, and in Flash media Encoder i have "SigmaTel audio device" selected as my audio output (which is my stock audio driver)..however i keep getting complaints that there is no sound to my page on justin.tv. As far as i know all my drivers are installed properly and up to date. The green audio bar on FME shows no activity. Im wondering if this ****** SigmaTel excuse of an audio driver just doesnt get along with FME? There is no option to select "stereo mix" as other forums have said to do. Can anyone please help me get sound to my justin.tv page? Or help me find a way to instal a different audio driver that is compatible with a dell piece-o-**** dimension e520. I have downloaded Realtek HD Audio, SoundMAX drivers, and a few others but the only audio driver this piece of **** dell wants to recognize is the SigmaTel Audio Device, Which WONT OUTPUT SOUND TO FME!!!!!! PLEASE HELP!! TUMOUR IS GROWING!!
Can i not buy a set of surround sound speakers that are hooked up via USB and go around this problem? I really just want to get RID of SIGMATEL forever, and use REALTEK...but it wont recognize no matter how many times i download it. fml!"The audio preview in FMLE indicates there IS audio being input"
How do you know this?
are you "Saving to file"? how is the audio in the saved file?
Adninjastrator -
Problems with my Sound Blaster Audigy Platinum Bracket dr
not to long ago i had to get a new motherboard. ever since installing all my hardware back on this new MB, my midi braket doesnt work any more. for example, i use headphones for gaming and the headphone/mic inputs on the front of the bracket wont output any sound. my remote control works fine with my mediasource software but these inputs on the front just wont work.
any suggestions would be greatly appreciated. 8)problem sorted now, everything is working fine. 8)
-
Looking for a monitor that will match the picture quality on my Macbook Pro.
Today i bought a 27" LED Monitor w/ 2560 X 1440 resolution. The specs on the box seemed to match that of a thunderbolt display yet when connected (via HDMI) the picture quality was significantly lower than that of my Macbook Pro (13.3" 2.9 Ghz July 2012). Im likely to return this monitor due to the poor quality. What i want to know is what kind of monitor is out there that will match the color and quality of my macbook pro. I am willing to lose monitor size in return for this quality but i dont want to spend $1,000 on a thunderbolt display (i spent $400 on this monitor). Any one out the with monitor knowledge to help me out in my purchasing decision?
For anyone out there with a similar problem, after a few days of researching the issue i've found a solution. The problem being that HDMI cables wont support resolution higher than 1080p (1920 x 1080) therefore using an HDMI connection, your monitor wont output to its full potential (that is ofcourse if it can support higher than 1920 x 1080). The solution is to use a DisplayPort connection. DisplayPort is the best connection for computer monitors because it can output higher resolutions than hdmi and in most cases DVI. Today it seems like everyone is using HDMI to connect everything and it has become the standard. In the case of TV/Cable HDMI is probably your best choice because it is more properly formatted for that type of display but if you want the best picture quality for computer monitors, i'd stick with a DisplayPort cable. For compatibility with your Macbook Pro/Air/iMac, you do need to buy a MiniDisplayPort to DisplayPort converter cable to make the connection.
Again this is just how to output a non-apple display to your apple computer. If you can afford them, the ThunderBolt and Apple Cinema displays are both great monitors that can output some really high quality picture as well. -
Printing the final cut movie to video
hi-
i have a project of a few scenes and and stuff thrown together compiling an hour of edited footage on fce- i would like to output this onto a mini dv tape from the computer -i have a mini dv camera ready to go with firewire attached to my mac
can someone please let me know the blow by blow- play by play action -steps of how to do this?
thanks
joshMixdown the audio.
Check that View >Video>Firewire is active. You may
have to open FCE after your camera is powered on in
VCR mode.
Go to File >Print to Video.
Put a check mark in any of the Leader boxes
required.
Select any Media and Tralier options required.
Hit OK.
Al
i was able to print to video but now it is jumping and wont output nicely -
Test your audio quality.
Go here and download RightMark Audio Analyzer.
Here are some instructions how to do it.
And please post results in html form (the program creates a html page)Some test from my own nForce Audio.
Audio Diver : 5.10.2860.0000
1st tests :
Sample rates, Analog External Loopback
16-bit, 44 kHz:
Summary
Frequency response (from 40 Hz to 15 kHz), dB: +0.17, -0.78 Good
Noise level, dB (A): -82.0 Good
Dynamic range, dB (A): 81.0 Good
THD, %: 0.0053 Very good
IMD, %: 4.036 Very poor
Stereo crosstalk, dB: -71.3 Good
General performance: Good
http://cal003104.student.utwente.nl/nForce/Analog loopback 16-bit, 44 kHz.htm
16-bit, 48 kHz:
Summary
Frequency response (from 40 Hz to 15 kHz), dB: +0.25, -0.56 Good
Noise level, dB (A): -83.2 Good
Dynamic range, dB (A): 82.5 Good
THD, %: 0.0046 Very good
IMD, %: 0.060 Good
Stereo crosstalk, dB: -73.7 Good
General performance: Good
http://cal003104.student.utwente.nl/nForce/Analog loopback 16-bit, 48 kHz.htm
16-bit, 96 kHz:
Summary
Frequency response (from 40 Hz to 15 kHz), dB: +0.25, -2.07 Average
Noise level, dB (A): -82.8 Good
Dynamic range, dB (A): 81.2 Good
THD, %: 0.0037 Very good
IMD, %: 0.045 Good
Stereo crosstalk, dB: -72.1 Good
General performance: Good
http://cal003104.student.utwente.nl/nForce/Analog loopback 16-bit, 96 kHz.htm
Conclusions :
@44.1KHz we see a high InterModulation Distortion >4% @48 and 96KHz the IMD is good, this can be explained because of the fixed 48KHz sample frequency of the nForce audio, so @44.1 the high IMD is caused by the sample-rate-conversion. @96KHz sample-rate-conversion doesn't give such a high IMD because the sample-rate-conversion-ratio is 2.00 round.
@96KHz we see the DAC and/or the ADC is and the end of its capacity, this explaines the -2.07dB at 15KHz. This also occurs when using an external DAC so my guess is this a problem of the ADC.
So use 48KHz for highest quality recording.
2nd tests :
Different Outputs, 16-bit 48KHz
Analog Out -> Analog In (Analog External loopback)
Summary
Frequency response (from 40 Hz to 15 kHz), dB: +0.25, -0.56 Good
Noise level, dB (A): -83.2 Good
Dynamic range, dB (A): 82.5 Good
THD, %: 0.0046 Very good
IMD, %: 0.060 Good
Stereo crosstalk, dB: -73.7 Good
General performance: Good
http://cal003104.student.utwente.nl/nForce/Analog loopback 16-bit, 48 kHz.htm
Digital Out Stereo -> Harman/Kardon ADP303 Digital In -> Harman/Kardon ADP303 Analog Out -> Analog In
Summary
Frequency response (from 40 Hz to 15 kHz), dB: +0.09, -0.27 Very good
Noise level, dB (A): -84.2 Good
Dynamic range, dB (A): 81.0 Good
THD, %: 0.0080 Very good
IMD, %: 0.058 Good
Stereo crosstalk, dB: -73.6 Good
General performance: Good
http://cal003104.student.utwente.nl/nForce/Digital Out Stereo - ADP303 16-bit, 48 kHz.htm
Digital Out AC3 -> Harman/Kardon ADP303 Digital In -> Harman/Kardon ADP303 Analog Out -> Analog In
Summary
Frequency response (from 40 Hz to 15 kHz), dB: +0.11, -0.31 Good
Noise level, dB (A): -83.1 Good
Dynamic range, dB (A): 80.6 Good
THD, %: 0.0080 Very good
IMD, %: 141.314 Very poor
Stereo crosstalk, dB: -73.1 Good
General performance: Good
http://cal003104.student.utwente.nl/nForce/Digital Out AC3 - ADP303 16-bit, 48 kHz.htm
Conclusions :
Stereo Digital out gives a better frequency response than analog (only when using a good DAC!!!)
AC3 out gives very strange results, I think the results one gets here are very dependent on drivers, also AC3 out is always lower quality than Stereo. However when using Digital Out Stereo to your receiver and decoding Pro-Logic sound quality should be worse than AC3.
For highest quality output use a external high quality DAC
People that are using speakersystems like 4point surround and DTT-whatever sets, should first upgrade their speakers/amplifiers and don't worry about better DAC's first.
Marcelo3d : It looks like the DAC in your sony isn't too good, however it might as well be the quality of the pre-amp or the tone controls. Try using a tape-out instead of pre-out to bypass pre-amp and tone-controls. There is however a possibility the receiver wont output digital in to analog out. When program crashes on crosstalk export you swapped left-right channels. -
Front speakers sound switches to rear speakers
X-Fi Xtreme Gamer Fatalty Professional Series
4gig RAM
E6850
X48 Chip
x64 Vista Ultimate
Creative 5. speakers
Driver: SBXF_PCDRV_LB_2_8_0008
Gaming Mode at all times
When listening music or watching film all of a sudon my L-Front, Center and R-Front speaker di'vert the sound to the L-Rear and R-Rear speakers and then after sometime they switch it back to the front speakers. This happenends in entertainment mode aswell in gaming mode. Also when using teamspeak the sound is beeing switched this is verry anoying when playing a game.
Any solution to this?Re: Front speakers sound switches to rear speakers$ X-fi Extreme Gamer
4gig Ram
AMD PhenomX4
8800 GTS
Vista Home Premium 64
Yamaha 7. receiver
3.5mm to RCA cables
You are lucky. I am yet to setup front speakers at ALL on a 7. system. The sound card simply wont output the separate channels correctly.
The front speakers output on the Back rear speakers. The subwoofer outputs on the centre speaker and the centrespeaker works on the subwoofer depending what Mood the sound card is in.
I have tried different cables and the problem has been identified specificly as the sound card.
The only reason i bought one of these cards was becos my motherboard sound died, i had no problems like this before getting a soundblaster. -
IMac12,2 osx 10.6.8. wont recognize external audio output
iMac12,2 osx 10.6.8. wont recognize external audio output via USB. The device, focusrite scarlet 2i2, works fine on my laptop not drivers are required and should work on 10.6.5. or greater. Any help would be very much appreciated.
iMac12,2 osx 10.6.8. wont recognize external audio output via USB. The device, focusrite scarlet 2i2, works fine on my laptop not drivers are required and should work on 10.6.5. or greater. Any help would be very much appreciated.
-
Audio output port moves and wont let me plug in my cable
Suddenly, when i try and put in the audio jack for my 2 speakers into my iMac it seems to not click in. When i shined a flash light at it the port it seemed to move when i plugged in the cable. This has all happened rather quickly which is making me confused. I use my iMac for gaming and never plug in cables with a heavy hand as i am young and i promised to look after this iMac. After understanding what has happened, i ask my parents what might have happened and they did not have a clue. My question is whether it is normal for the silver ring inside the port's hole usual moves and why my cable isn't clicking in.
EDIT:
- I have tested multiple audio output devices like speakers, earphones and headphones and it still wont click and it still moves.
- My iMac is running with 8gb of ram, Intel Iris Pro 1GB Graphics card and 2.7 GHz Intel Core i5 processor.
If you need any more details please request them.Clean the lint/debris from the connector.
-
Hi, I have a new MacBook Pro and I dont get video output to a beamer although I have the regular
Mini DisplayPort to VGA Adapter and it works fine with my older MacBook...
Thanks a lot for your tips...That should work. When you first hook it up it will probably have the display set in Extended Desktop mode. The Menu Bar and Dock will be on the MacBook display and your background screen on the TV but you can move the cursor onto the TV screen.
In SystemPreferences>Display on the MacBook screen there should be an Arrangement tab when you have the MacBook hooked up to the TV and both screens working. When you click the Arrangement tab do you see two monitors side by side? One of them will have a Menu Bar at the top. Just click on the Menu Bar and drag it to the second monitor. That will make the second monitor your main screen. You can now use your MacBook in Clamshell Mode with a wired or Bluetooth keyboard and mouse. http://support.apple.com/kb/HT3131 When you disconnect from the TV your Menu Bar will automatically change back to the MacBook.
Or if you want to work on the MacBook screen while showing it on a TV you can check the Mirror Display box on the lower left hand side of the Arrangement tab under the two monitors box.
If you also want audio you'll need audio cables to the TV using a 3.5mm stereo headphone jack to RCA sound plugs. You attach it from the headphone jack of your MacBook to the appropriate input plugs on your TV http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=min i-dvi&x=9&y=13#/ref=nb_sb_ss_i_2_19?url=search-alias%3Daps&field-keywords=macboo k+audio+cable&sprefix=macbook+audio+cable&rh=i%3Aaps%2Ck%3Amacbook+audio+cable -
Button wont trigger output in textarea
I am doing something wrong here and cant figure out why my second set of buttons will not give output in my textarea. I would appreciate it if anyone could help shed some light on why its not working...
public void actionPerformed(ActionEvent e)//creates the action event
if(e.getSource() == calculateBtn)
if (loanSlctBx.getSelectedItem().equals("7 years at 5.35%"))//array used to selcted term and APR bassed on the Combo Box
apr=b[0];//tells to store the 1st value to the varible
term=a[0];
else if (loanSlctBx.getSelectedItem().equals("15 years at 5.5%"))
apr=b[1];
term=a[1];//tells to store the 2nd value to the varible
else if (loanSlctBx.getSelectedItem().equals("30 years at 5.75%"))
apr=b[2];//tells to store the 3rd value to the varible
term=a[2];
// Makes all the calculation needed for the output
amnt = Double.parseDouble(amntFld.getText());
amntFld.setText(currencyComposition(amnt)); // Formats the value to use a US currencey composistion
mTerm = term*12; //sets the mTerm variable
mApr = (apr / 100) / 12; //sets the mApr with the monthly interest
pay = amnt * (mApr / (1 - Math.pow((1 + mApr), -mTerm)));//sets the pay varible with the results
double newAmnt = amnt;//sets new variable for new loan amount
//Loop to run the calulations thorughout the life of the loan
for (int i=0; i<mTerm;i++)
if (i==36||i==72||i==108||i==144||i==180||i==216||i==252||i==288||i==326||i==360)
try
Thread.sleep(500);//sleep timer
catch (InterruptedException e1)
//Prints the output for the calculations in the JTextAera one line at a time
payFld.append(i+1 +" "+currencyComposition(pay)+" "+currencyComposition(newAmnt*mApr)+" "+currencyComposition(pay-(newAmnt*(mApr))) +" "+currencyComposition(newAmnt)+"\n");
newAmnt -= pay-(newAmnt*(mApr));
if(e.getSource() == calculateBtn2)
if (e.getActionCommand().equals(calculateBtn2.getActionCommand()))
String amnt2 = amntFld2.getText();
String term2 = termFld2.getText();
String apr2 = aprFld2.getText();
else if (e.getActionCommand().equals(resetBtn.getActionCommand())) // Resets all fields
amntFld2.setText(null);
aprFld2.setText(null);
termFld2.setText(null);
payFld.setText(null);
// Makes all the calculation needed for the output
//amnt2 = Double.parseDouble(amntFld2.getText());
//amntFld2.setText(currencyComposition(amnt2)); // Formats the value to use a US currencey composistion
mTerm2 = term2*12; //sets the mTerm variable
mApr2 = (apr2 / 100) / 12; //sets the mApr with the monthly interest
pay = amnt2 * (mApr2 / (1 - Math.pow((1 + mApr2), -mTerm2)));//sets the pay varible with the results
double newAmnt2 = amnt2;//sets new variable for new loan amount
//Loop to run the calulations thorughout the life of the loan
for (int i=0; i<mTerm2;i++)
if (i==36||i==72||i==108||i==144||i==180||i==216||i==252||i==288||i==326||i==360)
try
Thread.sleep(500);//sleep timer
catch (InterruptedException e1)
//Prints the output for the calculations in the JTextAera one line at a time
payFld.append(i+1 +" "+currencyComposition(pay)+" "+currencyComposition(newAmnt2*mApr2)+" "+currencyComposition(pay-(newAmnt2*(mApr2))) +" "+currencyComposition(newAmnt2)+"\n");
newAmnt2 -= pay2-(newAmnt2*(mApr2));
// Formats the numeric values to readable currency
private String currencyComposition(double input) {
DecimalFormat df = new DecimalFormat("$###,###,###.00");
df.setMaximumFractionDigits(2);
String formattedString = df.format(input);
return formattedString;
}Does your code compile? I ask because in your "if (e.getActionCommand().equals(calculateBtn2.getActionCommand()))" block you declare a String variable amnt2 inside an if block but then use it outside the block to initialise newAmnt2.
This could work, I guess, if there were an instance variable amnt2 but that would be confusing. Actually if you are looking for light get rid of any variables of the form thingN, newThingN etc. Make the names descriptive: each variable descriptive of what it is a variable for.
To address your question (why the field doesn't change when you click the button): insert some System.out.println()s to check what code is actually being executed. Ie right at the start of actionPerformed(), again after the "if(e.getSource() == calculateBtn2)" etc. Basically everywhere you think the code should be getting to.
Also if "e.getSource() == calculateBtn2" is true won't the actionCommand of e and calculateBtn2 be the same? If so I don't really understand the intent of the code that checks them for equality.
Maybe you are looking for
-
Prerequisites of SRM Installation ?
Hi All, We are planning for a SRM 5.0 SR1 Installation, I just want to know Do I need to installa NW04s before I start with SRM installation ? If yes what is the process of setting up the SRM system ? Can anyone please let me know about this. Regards
-
Distorted stills in a slideshow created in IMovie
Hello everyone. I have created a 3 minute slideshow with stills from IPhoto, transitions, and music and I have noticed when I view the project in full screen mode there is very noticeable distortion in the video. It looks like a bad tv image, wavy li
-
FNDLOAD error in R12 vision instance on OEL5
hi, i am trying to run FNDLOAD in R12 vision instance on OEL5 on my personal installation. i am getting following error, FNDLOAD: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory how t
-
Hi in OSB project I use XQuery to display an XML structure. I what to display date type in this format: DD/MM/YYYY 24HH:MI:SS What do I need to write in XQuery and where? right now I have this element in the XQuery: <ns0:OpenedDate>{ $ServiceRequest
-
Do you need a high speed USB drive to effectively use a 5G ipod
My new 5G is working on my newer dell comp with the high speed, but not working on my older vaio without a high speed drive. Thoughts?