![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | win32_product in windows 2003 Hi,Everyone: I got this script from microsoft.com.But this script is not available in windows 2003.I meet a error: line:16 char:1 error:0x80041010 code:80041010 source:null --- Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.CreateTextFile("c:\scripts\software.tsv", True) strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSoftware = objWMIService.ExecQuery _ ("Select * from Win32_Product") objTextFile.WriteLine "Caption" & vbtab & _ "Description" & vbtab & "Identifying Number" & vbtab & _ "Install Date" & vbtab & "Install Location" & vbtab & _ "Install State" & vbtab & "Name" & vbtab & _ "Package Cache" & vbtab & "SKU Number" & vbtab & "Vendor" & vbtab _ & "Version" For Each objSoftware in colSoftware objTextFile.WriteLine objSoftware.Caption & vbtab & _ objSoftware.Description & vbtab & _ objSoftware.IdentifyingNumber & vbtab & _ objSoftware.InstallDate2 & vbtab & _ objSoftware.InstallLocation & vbtab & _ objSoftware.InstallState & vbtab & _ objSoftware.Name & vbtab & _ objSoftware.PackageCache & vbtab & _ objSoftware.SKUNumber & vbtab & _ objSoftware.Vendor & vbtab & _ objSoftware.Version Next objTextFile.Close please help me. -- ©²SmileRuner©¤©¤©¤©¤ ©§tzh#hnopensource.com ¡¡ ©§¡¡¡¡ ©§www.overmcse.com ©§Blogs.itecn.net/blogs/smileruner¡¡¡¡ ©º©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤ |
My System Specs![]() |
| | #2 (permalink) |
| | Re: win32_product in windows 2003 "smileruner" <tzh@xxxxxx> wrote in message news:1F02D624-1B2B-4052-B70D-E8349E2C05EE@xxxxxx Quote: > Hi,Everyone: > I got this script from microsoft.com.But this script is not available > in windows 2003.I meet a error: > line:16 > char:1 > error:0x80041010 > code:80041010 > source:null > > --- > > Set objFSO = CreateObject("Scripting.FileSystemObject") > Set objTextFile = objFSO.CreateTextFile("c:\scripts\software.tsv", True) > strComputer = "." > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") > Set colSoftware = objWMIService.ExecQuery _ > ("Select * from Win32_Product") > objTextFile.WriteLine "Caption" & vbtab & _ > "Description" & vbtab & "Identifying Number" & vbtab & _ > "Install Date" & vbtab & "Install Location" & vbtab & _ > "Install State" & vbtab & "Name" & vbtab & _ > "Package Cache" & vbtab & "SKU Number" & vbtab & "Vendor" & vbtab _ > & "Version" > For Each objSoftware in colSoftware > objTextFile.WriteLine objSoftware.Caption & vbtab & _ > objSoftware.Description & vbtab & _ > objSoftware.IdentifyingNumber & vbtab & _ > objSoftware.InstallDate2 & vbtab & _ > objSoftware.InstallLocation & vbtab & _ > objSoftware.InstallState & vbtab & _ > objSoftware.Name & vbtab & _ > objSoftware.PackageCache & vbtab & _ > objSoftware.SKUNumber & vbtab & _ > objSoftware.Vendor & vbtab & _ > objSoftware.Version > Next > objTextFile.Close > > please help me. > -- > ?SmileRuner---- > ?tzh#hnopensource.com > ? > ?www.overmcse.com > ?Blogs.itecn.net/blogs/smileruner > ?----------- We can't tell which is line 16, but most likely one of the properties is not supported in Windows Server 2003. It may be hard to tell from the documentation. However, by trial and error you can figure out which one or more properties will raise an error. This link should help: http://msdn.microsoft.com/en-us/libr...78(VS.85).aspx -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: win32_product in windows 2003 Thanks for your replay. Look this: --- strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colApps = objWMIService.ExecQuery _ ("Select * from Win32_Product") For Each objApp in colApps Wscript.Echo objApp.Caption Next --- It is not available in 2003.I had read that airticle,I can not find any information usefull for me .can you help me ?3QS "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in message news:OYN1FeanJHA.4392@xxxxxx Quote: > > "smileruner" <tzh@xxxxxx> wrote in message > news:1F02D624-1B2B-4052-B70D-E8349E2C05EE@xxxxxx Quote: >> Hi,Everyone: >> I got this script from microsoft.com.But this script is not available >> in windows 2003.I meet a error: >> line:16 >> char:1 >> error:0x80041010 >> code:80041010 >> source:null >> >> --- >> >> Set objFSO = CreateObject("Scripting.FileSystemObject") >> Set objTextFile = objFSO.CreateTextFile("c:\scripts\software.tsv", True) >> strComputer = "." >> Set objWMIService = GetObject("winmgmts:" _ >> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >> Set colSoftware = objWMIService.ExecQuery _ >> ("Select * from Win32_Product") >> objTextFile.WriteLine "Caption" & vbtab & _ >> "Description" & vbtab & "Identifying Number" & vbtab & _ >> "Install Date" & vbtab & "Install Location" & vbtab & _ >> "Install State" & vbtab & "Name" & vbtab & _ >> "Package Cache" & vbtab & "SKU Number" & vbtab & "Vendor" & vbtab _ >> & "Version" >> For Each objSoftware in colSoftware >> objTextFile.WriteLine objSoftware.Caption & vbtab & _ >> objSoftware.Description & vbtab & _ >> objSoftware.IdentifyingNumber & vbtab & _ >> objSoftware.InstallDate2 & vbtab & _ >> objSoftware.InstallLocation & vbtab & _ >> objSoftware.InstallState & vbtab & _ >> objSoftware.Name & vbtab & _ >> objSoftware.PackageCache & vbtab & _ >> objSoftware.SKUNumber & vbtab & _ >> objSoftware.Vendor & vbtab & _ >> objSoftware.Version >> Next >> objTextFile.Close >> >> please help me. >> -- >> ?SmileRuner---- >> ?tzh#hnopensource.com ? ?www.overmcse.com >> ?Blogs.itecn.net/blogs/smileruner ?----------- > > We can't tell which is line 16, but most likely one of the properties is > not supported in Windows Server 2003. It may be hard to tell from the > documentation. However, by trial and error you can figure out which one or > more properties will raise an error. This link should help: > > http://msdn.microsoft.com/en-us/libr...78(VS.85).aspx > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: win32_product in windows 2003 Thanks for your replay. Look this: --- strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colApps = objWMIService.ExecQuery _ ("Select * from Win32_Product") For Each objApp in colApps Wscript.Echo objApp.Caption Next --- It is not available in 2003.I had read that airticle,I can not find any information usefull for me .can you help me ?3QS "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in message news:OYN1FeanJHA.4392@xxxxxx Quote: > > "smileruner" <tzh@xxxxxx> wrote in message > news:1F02D624-1B2B-4052-B70D-E8349E2C05EE@xxxxxx Quote: >> Hi,Everyone: >> I got this script from microsoft.com.But this script is not available >> in windows 2003.I meet a error: >> line:16 >> char:1 >> error:0x80041010 >> code:80041010 >> source:null >> >> --- >> >> Set objFSO = CreateObject("Scripting.FileSystemObject") >> Set objTextFile = objFSO.CreateTextFile("c:\scripts\software.tsv", True) >> strComputer = "." >> Set objWMIService = GetObject("winmgmts:" _ >> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >> Set colSoftware = objWMIService.ExecQuery _ >> ("Select * from Win32_Product") >> objTextFile.WriteLine "Caption" & vbtab & _ >> "Description" & vbtab & "Identifying Number" & vbtab & _ >> "Install Date" & vbtab & "Install Location" & vbtab & _ >> "Install State" & vbtab & "Name" & vbtab & _ >> "Package Cache" & vbtab & "SKU Number" & vbtab & "Vendor" & vbtab _ >> & "Version" >> For Each objSoftware in colSoftware >> objTextFile.WriteLine objSoftware.Caption & vbtab & _ >> objSoftware.Description & vbtab & _ >> objSoftware.IdentifyingNumber & vbtab & _ >> objSoftware.InstallDate2 & vbtab & _ >> objSoftware.InstallLocation & vbtab & _ >> objSoftware.InstallState & vbtab & _ >> objSoftware.Name & vbtab & _ >> objSoftware.PackageCache & vbtab & _ >> objSoftware.SKUNumber & vbtab & _ >> objSoftware.Vendor & vbtab & _ >> objSoftware.Version >> Next >> objTextFile.Close >> >> please help me. >> -- >> ?SmileRuner---- >> ?tzh#hnopensource.com ? ?www.overmcse.com >> ?Blogs.itecn.net/blogs/smileruner ?----------- > > We can't tell which is line 16, but most likely one of the properties is > not supported in Windows Server 2003. It may be hard to tell from the > documentation. However, by trial and error you can figure out which one or > more properties will raise an error. This link should help: > > http://msdn.microsoft.com/en-us/libr...78(VS.85).aspx > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Win32_Product InstallDate | PowerShell | |||
| win32_product uninstall method | PowerShell | |||
| win32_product not valid | PowerShell | |||
| Get-WmiObject Win32_Product | PowerShell | |||
| WMI Object Win32_Product and Pipeline woes | PowerShell | |||