ROIScan Query
-
Tuesday, February 05, 2013 3:17 PM
Hi
I've seen that using WMI to query installed products can prompt a repair of the application, as such I'm scripting using parsed results of ROIScan.
Does using ROIScan have the same effect as it is querying the same information?
Many thanks,
Adam
All Replies
-
Tuesday, February 05, 2013 3:27 PM
ROIScan probably uses the installer and no WMI. The installer is what is used by WMI. WMI does not do a repair but calls the installer to do a complete validation. ROIScan must validate the install because remnants of old versions can fool the scanner. It s likely to have a specific strategy for detecting Office products.
This is a scripting forum you need to ask this kind of question in the Office forums.
¯\_(ツ)_/¯
-
Tuesday, February 05, 2013 4:08 PM
Thanks JRV,
The download page for the ROIScan script specified that I should use this forum to post queries;
"Online Peer Support
For online peer support, join The Official Scripting Guys Forum! To provide feedback or report bugs in sample scripts, please start a new discussion on the Discussions tab for this script."I'm happy to post over there if I will get a better response.
Many thanks,
Adam
-
Tuesday, February 05, 2013 4:17 PM
What download page?
ROIScan is a MS tool and not a forum script.
ROIScan uses the OFFICE WMI classes. How these work is an issue for the Office forums. Questions about the script can be asked on the Q&A page of the download site.
¯\_(ツ)_/¯
-
Tuesday, February 05, 2013 4:36 PM
http://gallery.technet.microsoft.com/scriptcenter/68b80aba-130d-4ad4-aa45-832b1ee49602
for the ROIScan VBScript, not the download - think we may be cross-purposes!
I'm looking for a way to script out installed programs and found this in the TechNet resources. I'm looking to adjust it to suit my purposes but do not want to risk repair-installations of software on scanned PCs.
Thanks
-
Tuesday, February 05, 2013 4:43 PMModerator
Hi,
As noted in the gallery entry, this script was written by Microsoft CSS. I haven't read that script and don't know specifically how it works. My suggestion is to test the script and your proposed changes on a test system. In this way you will be able to answer your own questions.
Bill
- Marked As Answer by Adam Galfskiy Tuesday, February 05, 2013 4:49 PM
-
Tuesday, February 05, 2013 8:17 PM
http://gallery.technet.microsoft.com/scriptcenter/68b80aba-130d-4ad4-aa45-832b1ee49602
for the ROIScan VBScript, not the download - think we may be cross-purposes!
I'm looking for a way to script out installed programs and found this in the TechNet resources. I'm looking to adjust it to suit my purposes but do not want to risk repair-installations of software on scanned PCs.
Thanks
As noted above, ROI does NOT use WMI WIn32_Product classes. It uses the Office classes. They just grab the specified keys and report.
As Bill noted. In all cases you would need to always test first if you are unsure of the condition of your installation.
Here is the target code:
Set oMsi = CreateObject("WindowsInstaller.Installer")This opens the MSI file after finding it in the registry and then opens the product installed base.
The script may also open one of these classes of the installed office instrumentation classes:
Set Spp = oWmiLocal.ExecQuery("SELECT ID, ApplicationId, PartialProductKey, Description, Name, LicenseStatus, LicenseStatusReason, ProductKeyID, GracePeriodRemaining, LicenseFamily, DiscoveredKeyManagementServiceMachineName, KeyManagementServicePort, VLActivationInterval, VLRenewalInterval FROM SoftwareLicensingProduct")
Set Ospp = oWmiLocal.ExecQuery("SELECT ID, ApplicationId, PartialProductKey, Description, Name, LicenseStatus, LicenseStatusReason, ProductKeyID, GracePeriodRemaining, LicenseFamily, DiscoveredKeyManagementServiceMachineName, KeyManagementServicePort, VLActivationInterval, VLRenewalInterval FROM OfficeSoftwareProtectionProduct")
Other than the registry and a couple of computer info classes it does not use Win32_Product and does not do a scan or a validation/repair of anything.
All of this can be quickly found by using a texxt editor to analyze this very large script.
The script is pretty much proprietaryy to MS Support for use in analyzing Office problems. It would have to be very safe to use as a diagnostic. Calling Win32_Product.Repair could be disastrous ot a system that is suspect.
Running Win32_Product as a query DOES NOT run 'repair' It just calls validate to test that he product installed. A repair might cause the call to hang if run remotely because it might ask for the installation media if the install set is not cached locally. Win32_Product cannot tell you the install state of a program it can only verify that the installer thinks it is installed. In the case of Office this diagnostic also checks keys and activation.
If you actually run teh scan at a command prompt you will szee that it runs very fast. If it were doing a reapir the time would be much greater as a repair takes minutes and not seconds.
If we select /full the script will walk the patch tree looking for all Office pathes and then fill in the info on these. Thiwsis mostly identical to opening "Add & Remove Programs" then selecting "show updates"
Again - post in the Office Developer forums for more current information.
Also not that durring that scan WMI is only actrive when teh license state is retrieved. After that everything is done through the registry and via file scans.
¯\_(ツ)_/¯
- Edited by jrvMicrosoft Community Contributor Tuesday, February 05, 2013 8:19 PM
- Edited by jrvMicrosoft Community Contributor Tuesday, February 05, 2013 8:20 PM

