Test .net 2 is installed then run app from cd

daverage

Active member
Joined
Aug 29, 2006
Messages
26
Programming Experience
Beginner
Hey all.
I have an application that I want to autrun from a cd, without installation.
It is written in vb2005 so needs .net 2 framework.
How can I check if the framework is installed, install it if it is not then run the application.
I tried clickonce, but it installs the app to a cache folder, but it must run from the cd

Cheers
 
You can write a VBScript that uses Windows Script Host (WSH) to check registry for framework key. "KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy" branch is often used I see from web searches, there is a key for each framework version installed there. If not already installed script will execute framework installer, this is basic IF-ELSE conditional in VBScript. Then script executes the app.

I believe this script can be started from the cds Autorun.inf. Here is some info about Autorun.
 
I had looked at that as well as a vb6 app to do it, seems a bit crap to have to do it that way though lol.
 
Back
Top