Guest hanspjacobsen Posted October 30, 2007 Posted October 30, 2007 I’m trying to find out if there is a command or utility that can give me a list of which applications with versions that are installed on a terminal server. Does anyone have an easy solution without having to install a inventory solution?
Guest Chris M Posted October 30, 2007 Posted October 30, 2007 Re: Easy inventory of server hanspjacobsen wrote: > I’m trying to find out if there is a command or utility that can give me a > list of which applications with versions that are installed on a terminal > server. > Does anyone have an easy solution without having to install a inventory > solution? http://www.microsoft.com/technet/scriptcenter/guide/sas_cpm_dgls.mspx?mfr=true -- Chris M.
Guest hanspjacobsen Posted October 30, 2007 Posted October 30, 2007 Re: Easy inventory of server I'm having a problem understanding "Create an instance of the FileSystem Object" how is this done? I'm totaly green to scripting. "Chris M" wrote: > hanspjacobsen wrote: > > I’m trying to find out if there is a command or utility that can give me a > > list of which applications with versions that are installed on a terminal > > server. > > Does anyone have an easy solution without having to install a inventory > > solution? > > http://www.microsoft.com/technet/scriptcenter/guide/sas_cpm_dgls.mspx?mfr=true > > > -- > Chris M. >
Guest Chris M Posted October 30, 2007 Posted October 30, 2007 Re: Easy inventory of server hanspjacobsen wrote: > I'm having a problem understanding "Create an instance of the FileSystem > Object" how is this done? I'm totaly green to scripting. The script itself is there at the bottom of the page. Just copy and paste it into a file and give it a .vbs extension, then run it on the server you want to grab the software list from. It will dump the software list into c:\scripts\software.tsv which you can open in Excel, Notepad or similar. In answer to your actual question, the part of the script that creates a FileSystem object is this line: Set objFSO = CreateObject("Scripting.FileSystemObject") -- Chris. > "Chris M" wrote: > >> hanspjacobsen wrote: >>> I’m trying to find out if there is a command or utility that can give me a >>> list of which applications with versions that are installed on a terminal >>> server. >>> Does anyone have an easy solution without having to install a inventory >>> solution? >> http://www.microsoft.com/technet/scriptcenter/guide/sas_cpm_dgls.mspx?mfr=true >> >> >> -- >> Chris M. >>
Guest hanspjacobsen Posted October 30, 2007 Posted October 30, 2007 Re: Easy inventory of server I tried the script on windows 2003 and receive an error in line 14. But it works fine on Vista and returns the result. Any suggestions? "Chris M" wrote: > hanspjacobsen wrote: > > I'm having a problem understanding "Create an instance of the FileSystem > > Object" how is this done? I'm totaly green to scripting. > > The script itself is there at the bottom of the page. Just copy and > paste it into a file and give it a .vbs extension, then run it on the > server you want to grab the software list from. > > It will dump the software list into c:\scripts\software.tsv which you > can open in Excel, Notepad or similar. > > In answer to your actual question, the part of the script that creates a > FileSystem object is this line: > > Set objFSO = CreateObject("Scripting.FileSystemObject") > > > -- > Chris. > > > > "Chris M" wrote: > > > >> hanspjacobsen wrote: > >>> I’m trying to find out if there is a command or utility that can give me a > >>> list of which applications with versions that are installed on a terminal > >>> server. > >>> Does anyone have an easy solution without having to install a inventory > >>> solution? > >> http://www.microsoft.com/technet/scriptcenter/guide/sas_cpm_dgls.mspx?mfr=true > >> > >> > >> -- > >> Chris M. > >> >
Guest Chris M Posted October 30, 2007 Posted October 30, 2007 Re: Easy inventory of server hanspjacobsen wrote: > I tried the script on windows 2003 and receive an error in line 14. > But it works fine on Vista and returns the result. > Any suggestions? What's the error message? -- Chris. > "Chris M" wrote: > >> hanspjacobsen wrote: >>> I'm having a problem understanding "Create an instance of the FileSystem >>> Object" how is this done? I'm totaly green to scripting. >> The script itself is there at the bottom of the page. Just copy and >> paste it into a file and give it a .vbs extension, then run it on the >> server you want to grab the software list from. >> >> It will dump the software list into c:\scripts\software.tsv which you >> can open in Excel, Notepad or similar. >> >> In answer to your actual question, the part of the script that creates a >> FileSystem object is this line: >> >> Set objFSO = CreateObject("Scripting.FileSystemObject") >> >> >> -- >> Chris. >> >> >>> "Chris M" wrote: >>> >>>> hanspjacobsen wrote: >>>>> I’m trying to find out if there is a command or utility that can give me a >>>>> list of which applications with versions that are installed on a terminal >>>>> server. >>>>> Does anyone have an easy solution without having to install a inventory >>>>> solution? >>>> http://www.microsoft.com/technet/scriptcenter/guide/sas_cpm_dgls.mspx?mfr=true >>>> >>>> >>>> -- >>>> Chris M. >>>>
Guest Richard Mueller [MVP] Posted October 31, 2007 Posted October 31, 2007 Re: Easy inventory of server "Chris M" <nobody@nowhere.special> wrote in message news:fg8fa7$qs5$1@aioe.org... > hanspjacobsen wrote: >> I tried the script on windows 2003 and receive an error in line 14. >> But it works fine on Vista and returns the result. >> Any suggestions? > > What's the error message? > > -- > Chris. > Also, is line 14 the following? For Each objSoftware in colSoftware -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net --
Guest hanspjacobsen Posted October 31, 2007 Posted October 31, 2007 Re: Easy inventory of server Yes line 14 is For Each objSoftware in colSoftware The error message is Line 14 char 1 error 0x80041010 code 80041010. Have tried the script on XP and it works fine but has failed on to windows 2003 servers. "Richard Mueller [MVP]" wrote: > > "Chris M" <nobody@nowhere.special> wrote in message > news:fg8fa7$qs5$1@aioe.org... > > hanspjacobsen wrote: > >> I tried the script on windows 2003 and receive an error in line 14. > >> But it works fine on Vista and returns the result. > >> Any suggestions? > > > > What's the error message? > > > > -- > > Chris. > > > > Also, is line 14 the following? > > For Each objSoftware in colSoftware > > -- > Richard Mueller > Microsoft MVP Scripting and ADSI > Hilltop Lab - http://www.rlmueller.net > -- > > >
Guest Richard Mueller [MVP] Posted October 31, 2007 Posted October 31, 2007 Re: Easy inventory of server Does it help to change this line: Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") To this: Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ & strComputer & "\root\cimv2") I've heard that authenticationLevel can be required on W2k3. -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net -- "hanspjacobsen" <hanspjacobsen@discussions.microsoft.com> wrote in message news:AADD0207-A06B-411E-9617-939A71962771@microsoft.com... > Yes line 14 is For Each objSoftware in colSoftware > The error message is Line 14 char 1 error 0x80041010 code 80041010. > Have tried the script on XP and it works fine but has failed on to windows > 2003 servers. > > "Richard Mueller [MVP]" wrote: > >> >> "Chris M" <nobody@nowhere.special> wrote in message >> news:fg8fa7$qs5$1@aioe.org... >> > hanspjacobsen wrote: >> >> I tried the script on windows 2003 and receive an error in line 14. >> >> But it works fine on Vista and returns the result. >> >> Any suggestions? >> > >> > What's the error message? >> > >> > -- >> > Chris. >> > >> >> Also, is line 14 the following? >> >> For Each objSoftware in colSoftware >> >> -- >> Richard Mueller >> Microsoft MVP Scripting and ADSI >> Hilltop Lab - http://www.rlmueller.net >> -- >> >> >>
Guest hanspjacobsen Posted October 31, 2007 Posted October 31, 2007 Re: Easy inventory of server No it didn't help. I receive the same result when logged on as a regular domain user or a domain administrator "Richard Mueller [MVP]" wrote: > Does it help to change this line: > > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") > > To this: > > Set objWMIService = GetObject("winmgmts:" _ > & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ > & strComputer & "\root\cimv2") > > I've heard that authenticationLevel can be required on W2k3. > > -- > Richard Mueller > Microsoft MVP Scripting and ADSI > Hilltop Lab - http://www.rlmueller.net > -- > > "hanspjacobsen" <hanspjacobsen@discussions.microsoft.com> wrote in message > news:AADD0207-A06B-411E-9617-939A71962771@microsoft.com... > > Yes line 14 is For Each objSoftware in colSoftware > > The error message is Line 14 char 1 error 0x80041010 code 80041010. > > Have tried the script on XP and it works fine but has failed on to windows > > 2003 servers. > > > > "Richard Mueller [MVP]" wrote: > > > >> > >> "Chris M" <nobody@nowhere.special> wrote in message > >> news:fg8fa7$qs5$1@aioe.org... > >> > hanspjacobsen wrote: > >> >> I tried the script on windows 2003 and receive an error in line 14. > >> >> But it works fine on Vista and returns the result. > >> >> Any suggestions? > >> > > >> > What's the error message? > >> > > >> > -- > >> > Chris. > >> > > >> > >> Also, is line 14 the following? > >> > >> For Each objSoftware in colSoftware > >> > >> -- > >> Richard Mueller > >> Microsoft MVP Scripting and ADSI > >> Hilltop Lab - http://www.rlmueller.net > >> -- > >> > >> > >> > > >
Guest Chris M Posted October 31, 2007 Posted October 31, 2007 Re: Easy inventory of server hanspjacobsen wrote: > No it didn't help. I receive the same result when logged on as a regular > domain user or a domain administrator In a similar vein, it might be the security settings. Try: Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,SystemProfile}!\\" & strComputer & "\root\cimv2") That might not work though... it could be any of the security settings on this page that is required (I just guessed at the SystemProfile one): http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_arib.mspx?mfr=true -- Chris. > "Richard Mueller [MVP]" wrote: > >> Does it help to change this line: >> >> Set objWMIService = GetObject("winmgmts:" _ >> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >> >> To this: >> >> Set objWMIService = GetObject("winmgmts:" _ >> & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ >> & strComputer & "\root\cimv2") >> >> I've heard that authenticationLevel can be required on W2k3.
Guest hanspjacobsen Posted November 1, 2007 Posted November 1, 2007 Re: Easy inventory of server Chris you where correct this didn't work. Why dosen't it work with windows 2003 when it works fine with xp and vista. "Chris M" wrote: > hanspjacobsen wrote: > > No it didn't help. I receive the same result when logged on as a regular > > domain user or a domain administrator > > In a similar vein, it might be the security settings. Try: > > Set objWMIService = > GetObject("winmgmts:{impersonationLevel=impersonate,SystemProfile}!\\" & > strComputer & "\root\cimv2") > > That might not work though... it could be any of the security settings > on this page that is required (I just guessed at the SystemProfile one): > > http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_arib.mspx?mfr=true > > -- > Chris. > > > > "Richard Mueller [MVP]" wrote: > > > >> Does it help to change this line: > >> > >> Set objWMIService = GetObject("winmgmts:" _ > >> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") > >> > >> To this: > >> > >> Set objWMIService = GetObject("winmgmts:" _ > >> & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ > >> & strComputer & "\root\cimv2") > >> > >> I've heard that authenticationLevel can be required on W2k3. >
Guest Chris M Posted November 1, 2007 Posted November 1, 2007 Re: Easy inventory of server hanspjacobsen wrote: > Chris you where correct this didn't work. > Why dosen't it work with windows 2003 when it works fine with xp and vista. I ran the script on one of our 2003 machines here and it didn't work either. It took a bit of digging, but I have found the reason (I think!). The Win32_Product class that the script uses is not available by default on Server 2003. You can install it by following the steps towards the bottom of this page: http://www.microsoft.com/technet/scriptcenter/resources/qanda/jul05/hey0712.mspx Please note that I haven't tested this. I'm pretty sure that this will resolve the problem though. -- Chris. > "Chris M" wrote: > >> hanspjacobsen wrote: >>> No it didn't help. I receive the same result when logged on as a regular >>> domain user or a domain administrator >> In a similar vein, it might be the security settings. Try: >> >> Set objWMIService = >> GetObject("winmgmts:{impersonationLevel=impersonate,SystemProfile}!\\" & >> strComputer & "\root\cimv2") >> >> That might not work though... it could be any of the security settings >> on this page that is required (I just guessed at the SystemProfile one): >> >> http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_arib.mspx?mfr=true >> >> -- >> Chris. >> >> >>> "Richard Mueller [MVP]" wrote: >>> >>>> Does it help to change this line: >>>> >>>> Set objWMIService = GetObject("winmgmts:" _ >>>> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>>> >>>> To this: >>>> >>>> Set objWMIService = GetObject("winmgmts:" _ >>>> & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ >>>> & strComputer & "\root\cimv2") >>>> >>>> I've heard that authenticationLevel can be required on W2k3.
Guest hanspjacobsen Posted November 1, 2007 Posted November 1, 2007 Re: Easy inventory of server Hi Chris it worked doing as you suggested but the result of the dump was quit different from xp and vista. It only retturend around half of the software the is listed in add remove program list. mostly it's spesialized software that isn't returned although they are listed under add remove programs.. "Chris M" wrote: > hanspjacobsen wrote: > > Chris you where correct this didn't work. > > Why dosen't it work with windows 2003 when it works fine with xp and vista. > > > I ran the script on one of our 2003 machines here and it didn't work > either. It took a bit of digging, but I have found the reason (I think!). > > The Win32_Product class that the script uses is not available by default > on Server 2003. > > You can install it by following the steps towards the bottom of this page: > > http://www.microsoft.com/technet/scriptcenter/resources/qanda/jul05/hey0712.mspx > > > Please note that I haven't tested this. I'm pretty sure that this will > resolve the problem though. > > -- > Chris. > > > > > "Chris M" wrote: > > > >> hanspjacobsen wrote: > >>> No it didn't help. I receive the same result when logged on as a regular > >>> domain user or a domain administrator > >> In a similar vein, it might be the security settings. Try: > >> > >> Set objWMIService = > >> GetObject("winmgmts:{impersonationLevel=impersonate,SystemProfile}!\\" & > >> strComputer & "\root\cimv2") > >> > >> That might not work though... it could be any of the security settings > >> on this page that is required (I just guessed at the SystemProfile one): > >> > >> http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_arib.mspx?mfr=true > >> > >> -- > >> Chris. > >> > >> > >>> "Richard Mueller [MVP]" wrote: > >>> > >>>> Does it help to change this line: > >>>> > >>>> Set objWMIService = GetObject("winmgmts:" _ > >>>> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") > >>>> > >>>> To this: > >>>> > >>>> Set objWMIService = GetObject("winmgmts:" _ > >>>> & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ > >>>> & strComputer & "\root\cimv2") > >>>> > >>>> I've heard that authenticationLevel can be required on W2k3. >
Guest Chris M Posted November 1, 2007 Posted November 1, 2007 Re: Easy inventory of server hanspjacobsen wrote: > Hi Chris it worked doing as you suggested but the result of the dump was quit > different from xp and vista. It only retturend around half of the software > the is listed in add remove program list. mostly it's spesialized software > that isn't returned although they are listed under add remove programs.. To be expected, unfortunately. W32_Product will only return programs that have correctly registered themselves with the WMI provider when they were installed (typically, MSI installer packages and similar) Perhaps do some googling around and see if you can find anyone else who has had a similar problem with W32_Product and how they solved it. One way of doing it that I can think of would be to pull the Add/Remove programs info from the registry. Not sure if that would give you version numbers though. Chris. > "Chris M" wrote: > >> hanspjacobsen wrote: >>> Chris you where correct this didn't work. >>> Why dosen't it work with windows 2003 when it works fine with xp and vista. >> >> I ran the script on one of our 2003 machines here and it didn't work >> either. It took a bit of digging, but I have found the reason (I think!). >> >> The Win32_Product class that the script uses is not available by default >> on Server 2003. >> >> You can install it by following the steps towards the bottom of this page: >> >> http://www.microsoft.com/technet/scriptcenter/resources/qanda/jul05/hey0712.mspx >> >> >> Please note that I haven't tested this. I'm pretty sure that this will >> resolve the problem though. >> >> -- >> Chris. >> >> >> >>> "Chris M" wrote: >>> >>>> hanspjacobsen wrote: >>>>> No it didn't help. I receive the same result when logged on as a regular >>>>> domain user or a domain administrator >>>> In a similar vein, it might be the security settings. Try: >>>> >>>> Set objWMIService = >>>> GetObject("winmgmts:{impersonationLevel=impersonate,SystemProfile}!\\" & >>>> strComputer & "\root\cimv2") >>>> >>>> That might not work though... it could be any of the security settings >>>> on this page that is required (I just guessed at the SystemProfile one): >>>> >>>> http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_arib.mspx?mfr=true >>>> >>>> -- >>>> Chris. >>>> >>>> >>>>> "Richard Mueller [MVP]" wrote: >>>>> >>>>>> Does it help to change this line: >>>>>> >>>>>> Set objWMIService = GetObject("winmgmts:" _ >>>>>> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>>>>> >>>>>> To this: >>>>>> >>>>>> Set objWMIService = GetObject("winmgmts:" _ >>>>>> & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ >>>>>> & strComputer & "\root\cimv2") >>>>>> >>>>>> I've heard that authenticationLevel can be required on W2k3.
Recommended Posts