Jump to content

Computer Info UDF's


 Share

Recommended Posts

I did try to restart - it said that it was already started. I am the admin of the computer I am running the tests on...anything else you can think of?

The requested service has already been started.

More help is available by typing NET HELPMSG 2182.

C:\Documents and Settings\*********>NET HELPMSG 2182

The requested service has already been started.

EXPLANATION

You tried to start a service that is already running.

ACTION

To display a list of active services, type:

NET START

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

"net stop winmgmt"

"net start winmgmt" ???

And Add

#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator

#RequireAdmin

at the top of your script (to run it with Admin rights).

Edit:

Also what's your OS+SP, seems XP-SP2 is the minimum requirement.

Edited by KaFu
Link to comment
Share on other sites

Stop service (was connected to firewall - so stopped that service too)

Restarted service - same issue

restarted firewall service - same issue

XP Pro, SP 3

I added those two lines to the top of the CompInfoExamples.au3 - did not prompt me for username or password - just ran with the same error message.

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Link to comment
Share on other sites

OK - that might be above my head, but will look at it tomorrow - thanks for your help.

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Adding this to the top of your script should do:

$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")    ; Initialize a COM error handler
Func MyErrFunc()
  Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !"    & @CRLF  & @CRLF & _
             "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _
             "err.windescription:"   & @TAB & $oMyError.windescription & @CRLF & _
             "err.number is: "       & @TAB & hex($oMyError.number,8)  & @CRLF & _
             "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _
             "err.scriptline is: "   & @TAB & $oMyError.scriptline   & @CRLF & _
             "err.source is: "       & @TAB & $oMyError.source       & @CRLF & _
             "err.helpfile is: "       & @TAB & $oMyError.helpfile     & @CRLF & _
             "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _
            )
Endfunc
Link to comment
Share on other sites

Yea, I think that would have taken me some time to write - thanks for your time. The following was produced:

We intercepted a COM Error !

err.description is:

err.windescription:

err.number is: 80041014

err.lastdllerror is: 0

err.scriptline is: 57

err.source is:

err.helpfile is:

err.helpcontext is:

did a google search for (err number 80041014)

from http://www.computerperformance.co.uk/Logon/code/code_80041014.htm

From the CMD prompt, navigate to the %windir%\System32\Wbem directory (use /s for no popups - i ran it without the silent and got a lot of pop ups) then run the following command line: for %i in (*.dll) do RegSvr32 /s %i

found these dll files were loaded but the dllregisterserver entry point was not found - the file can not be registered

found this from MS http://support.microsoft.com/kb/249873 (about regsvr32 error msgs)

wmiapres.dll

winmgmtr.dll

wbemcomn.dll

provthrd.dll

gramedyn.dll

After the .DLLs have been re-registered you will then need to re-register any .EXE files found in the Wbem folder,

except for Mofcomp.exe and Wmic.exe.

For example, to re-register the executable file Scrcons.exe type the following from the command prompt:

regsvr32 /s scrcons.exe

regsvr32 /s unsecapp.exe

regsvr32 /s wbemtest.exe

regsvr32 /s winmgmt.exe

regsvr32 /s wmiadap.exe

regsvr32 /s wmiapsrv.exe

regsvr32 /s wmiprvse.exe

on each of these get loaded but the dllregisterserver entry point was not found - *.exe does not appear to be .dll or .ocx file

reran code and got (with a popup ->> Error! | Array contains no information)

We intercepted a COM Error !

err.description is:

err.windescription:

err.number is: 80041010

err.lastdllerror is: 0

err.scriptline is: 63

err.source is:

err.helpfile is:

err.helpcontext is:

after looking up that error 80041010 found http://blogs.technet.com/b/smsandmom/archive/2008/08/27/configmgr-2007-client-installation-fails-with-unable-to-compile-the-file-ccmclasses-mof.aspx

TEMP=C:\DOCUME~1\%username%2\LOCALS~1\Temp

when i ran the following it still did not change the TEMP location - reverted back to TEMP=C:\DOCUME~1\%username%2\LOCALS~1\Temp

set temp C:\Windows\Temp, i then went into my computer properties for enviroments variables and changed it there and it stuck

ran the script and same com error:

We intercepted a COM Error !

err.description is:

err.windescription:

err.number is: 80041010

err.lastdllerror is: 0

err.scriptline is: 63

err.source is:

err.helpfile is:

err.helpcontext is:

Still looking for more info on the errror 80041010 - any ideas?

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Link to comment
Share on other sites

Ok - I will test on another computer - when I get time, thanks again for your help.

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Possibly

_GetNetworkConnections()

_

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Link to comment
Share on other sites

Possibly

_GetNetworkConnections()

_

Do you have this function? I looked in help and on the forum and found only this page containing the word. And how does getting the network connection info work with the problems I am having? Thanks for your suggestion - or maybe this was for someone else?

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

  • 6 months later...

I was looking for information about a Hard Drive and didn't see it so I found this and edited it to fit along with this UDF.

Func _ComputerGetHDD(ByRef $aHDDInfo)
    Local $colItems, $objWMIService, $objItem
    Dim $aHDDInfo[1][51], $i = 1

    $objWMIService = ObjGet("winmgmts:" & $cI_Compname & "rootCIMV2")
    $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_DiskDrive", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

    If IsObj($colItems) Then
        For $objItem In $colItems
            ReDim $aHDDInfo[UBound($aHDDInfo) + 1][51]
            $aHDDInfo[$i][0]  = $objItem.Name
            $aHDDInfo[$i][1]  = $objItem.Availability
            $aHDDInfo[$i][2]  = $objItem.BytesPerSector
            $aHDDInfo[$i][3]  = $objItem.Capabilities(0)
            $aHDDInfo[$i][4]  = $objItem.CapabilityDescriptions(0)
            $aHDDInfo[$i][5]  = $objItem.Caption
            $aHDDInfo[$i][6]  = $objItem.CompressionMethod
            $aHDDInfo[$i][7]  = $objItem.ConfigManagerErrorCode
            $aHDDInfo[$i][8]  = $objItem.ConfigManagerUserConfig
            $aHDDInfo[$i][9]  = $objItem.CreationClassName
            $aHDDInfo[$i][10] = $objItem.DefaultBlockSize
            $aHDDInfo[$i][11] = $objItem.Description
            $aHDDInfo[$i][12] = $objItem.DeviceID
            $aHDDInfo[$i][13] = $objItem.ErrorCleared
            $aHDDInfo[$i][14] = $objItem.ErrorDescription
            $aHDDInfo[$i][15] = $objItem.ErrorMethodology
            $aHDDInfo[$i][16] = $objItem.FirmwareRevision
            $aHDDInfo[$i][17] = $objItem.Index
            $aHDDInfo[$i][18] = __StringToDate($objItem.InstallDate)
            $aHDDInfo[$i][19] = $objItem.InterfaceType
            $aHDDInfo[$i][20] = $objItem.LastErrorCode
            $aHDDInfo[$i][21] = $objItem.Manufacturer
            $aHDDInfo[$i][22] = $objItem.MaxBlockSize
            $aHDDInfo[$i][23] = $objItem.MaxMediaSize
            $aHDDInfo[$i][24] = $objItem.MediaLoaded
            $aHDDInfo[$i][25] = $objItem.MediaType
            $aHDDInfo[$i][26] = $objItem.MinBlockSize
            $aHDDInfo[$i][27] = $objItem.Model
            $aHDDInfo[$i][28] = $objItem.NeedsCleaning
            $aHDDInfo[$i][29] = $objItem.NumberOfMediaSupported
            $aHDDInfo[$i][30] = $objItem.Partitions
            $aHDDInfo[$i][31] = $objItem.PNPDeviceID
            $aHDDInfo[$i][32] = $objItem.PowerManagementCapabilities
            $aHDDInfo[$i][33] = $objItem.PowerManagementSupported
            $aHDDInfo[$i][34] = $objItem.SCSIBus
            $aHDDInfo[$i][35] = $objItem.SCSILogicalUnit
            $aHDDInfo[$i][36] = $objItem.SCSIPort
            $aHDDInfo[$i][37] = $objItem.SCSITargetId
            $aHDDInfo[$i][38] = $objItem.SectorsPerTrack
            $aHDDInfo[$i][39] = $objItem.SerialNumber
            $aHDDInfo[$i][40] = $objItem.Signature
            $aHDDInfo[$i][41] = $objItem.Size
            $aHDDInfo[$i][42] = $objItem.Status
            $aHDDInfo[$i][43] = $objItem.StatusInfo
            $aHDDInfo[$i][44] = $objItem.SystemCreationClassName
            $aHDDInfo[$i][45] = $objItem.SystemName
            $aHDDInfo[$i][46] = $objItem.TotalCylinders
            $aHDDInfo[$i][47] = $objItem.TotalHeads
            $aHDDInfo[$i][48] = $objItem.TotalSectors
            $aHDDInfo[$i][49] = $objItem.TotalTracks
            $aHDDInfo[$i][50] = $objItem.TracksPerCylinder

            $i += 1
        Next
        $aHDDInfo[0][0] = UBound($aHDDInfo) - 1
        If $aHDDInfo[0][0] < 1 Then
            SetError(1, 1, 0)
        EndIf
    Else
        SetError(1, 2, 0)
    EndIf
EndFunc ;_ComputerGetHDD
Link to comment
Share on other sites

  • 1 month later...

Hey sorry for noobie question, but I would like to integrate this into part of one of my scripts for diagnostics. I'd like to know what syntax to use to call up a single attribute of _ComputerGetProcessors or _ComputerGetOSs instead of the entire array. I plan to organize individual attributes instead of having them all mashed together and I'm a VBA newbie so the help file isnt really doing much on teaching me syntax in a circumstance like this

Link to comment
Share on other sites

  • 2 years later...

You can look at the code inside the functions you want to use and remove only the parts you need. This is taken from _ComputerGetProcessors. For example, you could easily save any of these values to a variable:

Opt("MustDeclareVars",1)
Local $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2"), $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", 0x30), $objItem
For $objItem In $colItems
    ConsoleWrite($objItem.AddressWidth & @CR)
    ConsoleWrite($objItem.Architecture & @CR)
    ConsoleWrite($objItem.Availability & @CR)
    ConsoleWrite($objItem.Description & @CR)
    ConsoleWrite($objItem.ConfigManagerErrorCode & @CR)
    ConsoleWrite($objItem.ConfigManagerUserConfig & @CR)
    ConsoleWrite($objItem.CpuStatus & @CR)
    ConsoleWrite($objItem.CreationClassName & @CR)
    ConsoleWrite($objItem.CurrentClockSpeed & @CR)
    ConsoleWrite($objItem.CurrentVoltage & @CR)
    ConsoleWrite($objItem.DataWidth & @CR)
    ConsoleWrite($objItem.DeviceID & @CR)
    ConsoleWrite($objItem.ErrorCleared & @CR)
    ConsoleWrite($objItem.ErrorDescription & @CR)
    ConsoleWrite($objItem.ExtClock & @CR)
    ConsoleWrite($objItem.Family & @CR)
    ConsoleWrite($objItem.L2CacheSize & @CR)
    ConsoleWrite($objItem.L2CacheSpeed & @CR)
    ConsoleWrite($objItem.LastErrorCode & @CR)
    ConsoleWrite($objItem.Level & @CR)
    ConsoleWrite($objItem.LoadPercentage & @CR)
    ConsoleWrite($objItem.Manufacturer & @CR)
    ConsoleWrite($objItem.MaxClockSpeed & @CR)
    ConsoleWrite($objItem.OtherFamilyDescription & @CR)
    ConsoleWrite($objItem.PNPDeviceID & @CR)
    ConsoleWrite($objItem.PowerManagementCapabilities(0) & @CR)
    ConsoleWrite($objItem.PowerManagementSupported & @CR)
    ConsoleWrite($objItem.ProcessorId & @CR)
    ConsoleWrite($objItem.ProcessorType & @CR)
    ConsoleWrite($objItem.Revision & @CR)
    ConsoleWrite($objItem.Role & @CR)
    ConsoleWrite($objItem.SocketDesignation & @CR)
    ConsoleWrite($objItem.Status & @CR)
    ConsoleWrite($objItem.StatusInfo & @CR)
    ConsoleWrite($objItem.Stepping & @CR)
    ConsoleWrite($objItem.SystemCreationClassName & @CR)
    ConsoleWrite($objItem.SystemName & @CR)
    ConsoleWrite($objItem.UniqueId & @CR)
    ConsoleWrite($objItem.UpgradeMethod & @CR)
    ConsoleWrite($objItem.Version & @CR)
    ConsoleWrite($objItem.VoltageCaps & @TAB  & @CR)
Next
Link to comment
Share on other sites

  • 8 months later...
  • 2 months later...

_ComputerGetSystem or Motherboard doesn't get model of new motherboard's, are you still working on this great UDF?

the UDF needs no changes, your WMI don't return that value. You can use ScriptOMatic your self and see.

Edited by argumentum
spelling

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

  • 9 months later...

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...