/build/static/layout/Breadcrumb_cap_w.png

to check if .net frame work 2.0 mmc 3.0 and Windows remote Mgmt

Hi
.net 2.0 or greater
mmc 3.0
Windows remote Mgmt
These three are going to be the prereq of my application i need to check if these 3 applications were installed or not on workstations.If these are installed then my app will run with out any issues if not installed then i need to install them first and run my application .i've exe for these 3 apps.i'm n't sure how to go with the logic using vb script.
Thanks in advance

0 Comments   [ + ] Show comments

Answers (10)

Posted by: anonymous_9363 14 years ago
Red Belt
0
There are some choices to make. Do you want to simply check for a file's existence of its version? Or maybe the installation registry data (HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode])? Or other registry data? A combination of some/all of those?

At the end of the day, there are many scripts around which will check a file's existence. File version retrieval is trickier, especially in VBScript but it can be done - check out JSware's file operation scripts. Additionally, there are scripts which can retrieve registry data. JSWare has a very good class file for registry acces which, if you're a serious scripter, will quickly become part of your toolkit.
Posted by: murali.bhat 14 years ago
Purple Belt
0
See if this helps.


Set objShell = CreateObject("Wscript.shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")

strComputer ="."

'Check for .NetFramework 2 or higher

Const HKEY_LOCAL_MACHINE = &H80000002
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

strValue = ""

on error resume next
strValue = objShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\Version")
on error goto 0

If strValue = "" then
on error resume next
strValue = objShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Version")
on error goto 0

If strValue = "" then
on error resume next
strValue = objShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\Version")
on error goto 0
End If

End If

If strValue = "" then
msgbox "No .Net Framework!"
Else
msgbox ".Net Framework version : " & strValue
End If

msgbox "MMC version : " & objFSO.GetFileVersion("c:\windows\system32\mmc.exe")

Set objShell = Nothing
Set objFSO = Nothing
Posted by: harshakola 14 years ago
Orange Belt
0
i will try to run this script and will let u know.but if these 3 app weren't installed then i need to install this .let me know how to do this.
thanks
Posted by: murali.bhat 14 years ago
Purple Belt
0
Assign the strValue to a Property and use this Property in the Launch Condiction of the msi.

Session.Property("NETFRAMEWORKS") = strValue
Session.Property("MMCVERSION") = objFSO.GetFileVersion("c:\windows\system32\mmc.exe")

In the Launch condition, use the below command :
NETFRAMEWORKS <= "2" followed by the message.
MMCVERSION <= "3" followed by the message.
Posted by: anonymous_9363 14 years ago
Red Belt
0
let me know how to do this.Installing an application involves executing a program. Again, instead of expecting others to do your work for nothing, do some work for yourself and find a script that does that. If you find yourself having trouble integrating what you have, then come back and ask questions.
Posted by: harshakola 14 years ago
Orange Belt
0
Hi Murali,
I'm bit confused with what you are saying.can you explain clearly.from my understanding i feel like i need to do declare a property in the property table as NETFRAMEWORK=strvalue and how abt windows remote managment .is taht going to be the same as mmc version. please make your time and explain in detail.Thanks for your responses.
Posted by: murali.bhat 14 years ago
Purple Belt
0
Yes, you need to declare the property NETFRAMEWORK, MMCVERSION, WINREM in Property table. Set the default values as "0". Let the vbscript change the default values.
I am not sure about the remote management. If you have a file, you can check its version just like mmc version.
Posted by: harshakola 14 years ago
Orange Belt
0
hi Murali
i've assigned values 0 the above mentioned properties. But i'm not clear abt this script

Assign the strValue to a Property and use this Property in the Launch Condiction of the msi.

Session.Property("NETFRAMEWORKS") = strValue
Session.Property("MMCVERSION") = objFSO.GetFileVersion("c:\windows\system32\mmc.exe")

In the Launch condition, use the below command :
NETFRAMEWORKS <= "2" followed by the message.
MMCVERSION <= "3" followed by the message.
can u explain how to work from here.
i mean where to use exactly the following script.How to use them in launch condition tables.I've an exe files with me.which needs to install if we don't have higher versions of these applications.

Thanks for your time murali rally appreciate your help.
Posted by: murali.bhat 14 years ago
Purple Belt
0
Copy the entire script to the vb custom action and make the custom action to run before the launch condition. Set the condition as "NOT Installed"
Posted by: anonymous_9363 14 years ago
Red Belt
0
I had assumed that your question was purely based on script but now it turns out that the script will be running as part of an MSI installation.

Why complicate things with script? You should be using the AppSearch and LaunchCondition actions and their associated tables.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ