Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - win32_product in windows 2003

Reply
 
Old 03-05-2009   #1 (permalink)
smileruner


 
 

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 SpecsSystem Spec
Old 03-05-2009   #2 (permalink)
Richard Mueller [MVP]


 
 

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 SpecsSystem Spec
Old 03-05-2009   #3 (permalink)
smileruner


 
 

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 SpecsSystem Spec
Old 03-05-2009   #4 (permalink)
smileruner


 
 

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 SpecsSystem Spec
Reply

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46