Video Screencast Help

Script to check for .net 4.0 framework

Created: 21 Aug 2012 • Updated: 03 Oct 2012 | 3 comments
This issue has been solved. See solution.

I have a job to install a program that requires .net 4.0 framework and am looking to save time if it is already installed.. 

I'm looking for a script to do the following

1) check for .net 4.0 framework, if installed, proceed to step 3, if not installed, proceed to step 2
2) copy & install .net framework, then proceed to step 3
3) copy & install the program

If anyone can help, I'd appreciate it. Thanks.

Comments 3 CommentsJump to latest comment

andykn101's picture

Assuning you're talking about DS 6.9 you could use a condition to look for .NET 4.0 in Applications.

Authorised Symantec Consultant (ASC) with Endpoint Management Limited, an Authorised Symantec Delivery Provider based in the UK.

Connect Etiquette: Please "Mark as Solution" posts that fix your problem.

BBC's picture

In either environment, you can run a simple command line to determine if it is installed and react on that.

for /f "delims==" %%a in ('wmic qfe get HotFixID ^| FIND /C /I "KB968930"') DO SET /A KB=%%a
IF %KB% geq 1 GOTO XP

ECHO "FrameWork Core NOT found"

ECHO "FrameWork Core FOUND !!."

The above is of course just an example, but the return code can be used in the 7.x environment as well to then act with a condition on the script output.


PS: The example checks for the WMFW Core on XP

ianatkin's picture

Marking BBC's post here as the answer to this one as jhbpjf has not come back with further issues.

Ian Atkin, IT Services, Oxford University, UK

Connect Etiquette: "Mark as Solution" those posts which assist you most in resolving your problem, and give a thumbs up to useful articles and downloads