Jump to content

Enable Microsoft .NET Framework 3.5.1 Script


Recommended Posts

I am writing an autoit script to enable .net framework 3.5.1 for both http activation and non-http activation in the windows features dialog in Windows 7.

The script is really simple. Write to the command line with a command line prompt I found online.

I have tested the script on 64 bit and 32 bit machines with mixed results. Every time I run the script the blue half filled mark comes up so it is doing something. Do any of you have any ideas on how to get this to work.

The scrip is below

SplashTextOn(".Net Framework 3.5.1", "Turning on .NET 3.5.1", 200, 100)

sleep(3000)

SplashOff()

Run("C:\Windows\System32\cmd.exe /c start /w ocsetup NetFx3;WCF-HTTP-Activation;WCF-NonHTTP-Activation")

WinWaitActive("[ClASS:ConsoleWindowClass]")

WinWaitClose("[CLASS:ConsoleWindowClass]")

Link to post
Share on other sites

First of all, you are supposed to put your script in code form like this:

SplashTextOn(".Net Framework 3.5.1", "Turning on .NET 3.5.1", 200, 100)
sleep(3000)
SplashOff()

Run("C:\Windows\System32\cmd.exe /c start /w ocsetup NetFx3;WCF-HTTP-Activation;WCF-NonHTTP-Activation")
WinWaitActive("[ClASS:ConsoleWindowClass]")
WinWaitClose("[CLASS:ConsoleWindowClass]")

Now as to why you are getting inconsistent results, take a look at this:

http://technet.microsoft.com/en-us/library/cc766272%28WS.10%29.aspx

OCSetup is available as part of the Windows Vista® and Windows Server® 2008 operating system. This tool replaces Sysocmgr.exe, which is included in the Windows XP and Windows Server 2003 operating systems.

Therefore, if you run this on anything older than Vista, it will not work correctly.

#include <ByteMe.au3>

Link to post
Share on other sites

First of all, you are supposed to put your script in code form like this:

SplashTextOn(".Net Framework 3.5.1", "Turning on .NET 3.5.1", 200, 100)
sleep(3000)
SplashOff()

Run("C:\Windows\System32\cmd.exe /c start /w ocsetup NetFx3;WCF-HTTP-Activation;WCF-NonHTTP-Activation")
WinWaitActive("[ClASS:ConsoleWindowClass]")
WinWaitClose("[CLASS:ConsoleWindowClass]")

Now as to why you are getting inconsistent results, take a look at this:

http://technet.microsoft.com/en-us/library/cc766272%28WS.10%29.aspx

Therefore, if you run this on anything older than Vista, it will not work correctly.

My apologies I am new to the forum. I will be sure to format my questions better next time.

I am only running this on Windows 7 machines and getting inconsistent results. Anything else you could think of.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...