+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
Wired Networks Thread, Deploying .Net Framework 4 in Technical; Hi All, I need to upgrade PARS to the latest version but also need to deploy .Net Framework 4 to ...
  1. #1
    Steven's Avatar
    Join Date
    Apr 2007
    Location
    Morecambe
    Posts
    114
    Thank Post
    6
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Deploying .Net Framework 4

    Hi All, I need to upgrade PARS to the latest version but also need to deploy .Net Framework 4 to enable this to work correctly. Could someone point me in the right direction of deploying Framework 4 (We don't have a WSUS)

    Thank you.

  2. #2
    Mcshammer_dj's Avatar
    Join Date
    Feb 2007
    Location
    Portsmouth
    Posts
    928
    Thank Post
    35
    Thanked 160 Times in 129 Posts
    Rep Power
    93
    if you have a wsus setup then allow it and this will update all PC etc


    If not then a network share and a batch file will also work

  3. #3
    Steven's Avatar
    Join Date
    Apr 2007
    Location
    Morecambe
    Posts
    114
    Thank Post
    6
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Do you have a link to a script I could maybe use?

    Thanks.

  4. #4

    Join Date
    Jan 2010
    Location
    North Yorkshire
    Posts
    77
    Thank Post
    0
    Thanked 16 Times in 14 Posts
    Rep Power
    16
    Look what I worked on today! It pretty simple VBS to run the install if the PC's name doesn't have a text file in a folder. (I'm pretty new to VBS to all you expects out there tear it apart please, feedback is welcome). If you delete the txt file it should reinstall (If needed, update etc?)

    Code:
    On Error Resume Next
    'VBS DotNet Install Script - Rob Holmes 2011
    
    'Sets objects
    	Set objshell = CreateObject("WScript.Shell")
    	Set WshNetwork = WScript.CreateObject("WScript.Network")
    	Set objFSO = CreateObject("Scripting.FileSystemObject")
    	Set WSHShell = WScript.CreateObject("WScript.Shell")
    
    'Set variables - /////EDIT FROM HERE\\\\
    'Get the host name from the PC running the script
    	pcname =  WshNetwork.ComputerName
    
    'Path to folder where the PC named text file will be created.
    	dotnetpc = "\\server\REMINST\Applications\DotNet\Installed PCs\" & pcname & ".txt"
    
    'Path to the exe installer, could be used for future versions as well.
    	dotnetexe = "\\server\REMINST\Applications\DotNet\4.0\dotNetFx40_Full_x86_x64.exe /q /norestart"
    
    'End of variables /////EDIT TO HERE\\\\\
    'You shouldn't need to edit below this line
    
    'Check if PC already has DotNet installed from folder on server
    If objFSO.FileExists (dotnetpc) Then
    	'Do nothing, DotNet is installed.
    Else
    	'Installs DotNet	
    	WshShell.Run(dotnetexe)
    	'Create file to show PC has had Dotnet installed
    	objFSO.CreateTextFile dotnetpc
    End If

  5. Thanks to robyholmes from:

    glen_j (24th June 2011)

  6. #5

    Join Date
    Nov 2006
    Location
    Kendal
    Posts
    1,555
    Thank Post
    112
    Thanked 177 Times in 144 Posts
    Rep Power
    71
    I don't know if PARS is an additional product and you have SIMS as well but if you do SOLUS3 will also allow you to deploy .Net 4 framework too.

  7. #6
    Steven's Avatar
    Join Date
    Apr 2007
    Location
    Morecambe
    Posts
    114
    Thank Post
    6
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Hi, Tried your script but can't seem to get the setup file to run, it leaves the text document on the server to say its been installed but it hasn't?

    Any ideas?

    Thanks

  8. #7

    Join Date
    Jan 2010
    Location
    North Yorkshire
    Posts
    77
    Thank Post
    0
    Thanked 16 Times in 14 Posts
    Rep Power
    16
    Umm, well one problem I did find was it wouldn't wait for the installer to finish before writing the text file, but it should run it even if it doesn't install. You made the change to the EXE location and its somewhere that users can read and exc? Are you running it by GPO startup scripts or just manually?

    I will try and find away of making the script wait for the installer to finish before writing the file. Maybe some on on here knows. (Maybe this thread would be better in the scripts section?)

  9. #8


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,754
    Thank Post
    221
    Thanked 2,627 Times in 1,937 Posts
    Rep Power
    779
    You can create an AIP with the MSI...

    http://blogs.msdn.com/b/astebner/arc.../10020299.aspx

  10. #9

    Join Date
    Mar 2009
    Posts
    4
    Thank Post
    0
    Thanked 7 Times in 3 Posts
    Rep Power
    0
    Thanks for the script. Modified it slightly to just check for the Dotnet 4 reg key to skip installed PCs.
    Can now have this run at startup from GPO and can just apply to container with all staff PC.

    Code:
    'VBS DotNet 4 Install Script - Micheal Cross 2011
    'Credit to Rob Holmes 2011 http://www.edugeek.net/forums/networ...ework-4-a.html
    
    Option Explicit
    
    'Declare variables
    	Dim dotnetexe
    	Dim WSHShell
    	
    'Set path to the exe installer.	
    	dotnetexe = "\\cpsictserver\netlogon\msi\dotNetFx40_Full_x86_x64.exe /q /norestart"
    	Set WSHShell = WScript.CreateObject("WScript.Shell")
    	
    'Check if PC already has DotNet installed
    	If KeyExists("HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Install") Then
    		'Do nothing, DotNet is installed.
    	Else
    		'Installs DotNet	
    		WshShell.Run(dotnetexe)
    	End If
    
    Function KeyExists(key)
        Dim objShell
        'On Error Resume Next
        Set objShell = CreateObject("WScript.Shell")
            objShell.RegRead (key)
        Set objShell = Nothing
        If Err = 0 Then KeyExists = True
    End Function

  11. 3 Thanks to d13373d:

    Ben-UK (27th July 2011), glen_j (24th June 2011), zag (23rd August 2011)

  12. #10

    Join Date
    Apr 2009
    Location
    Essex
    Posts
    66
    Thank Post
    7
    Thanked 8 Times in 7 Posts
    Rep Power
    12
    Quote Originally Posted by d13373d View Post
    Thanks for the script. Modified it slightly to just check for the Dotnet 4 reg key to skip installed PCs.
    Can now have this run at startup from GPO and can just apply to container with all staff PC.

    Code:
    'VBS DotNet 4 Install Script - Micheal Cross 2011
    'Credit to Rob Holmes 2011 http://www.edugeek.net/forums/networ...ework-4-a.html
    
    Option Explicit
    
    'Declare variables
    	Dim dotnetexe
    	Dim WSHShell
    	
    'Set path to the exe installer.	
    	dotnetexe = "\\cpsictserver\netlogon\msi\dotNetFx40_Full_x86_x64.exe /q /norestart"
    	Set WSHShell = WScript.CreateObject("WScript.Shell")
    	
    'Check if PC already has DotNet installed
    	If KeyExists("HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Install") Then
    		'Do nothing, DotNet is installed.
    	Else
    		'Installs DotNet	
    		WshShell.Run(dotnetexe)
    	End If
    
    Function KeyExists(key)
        Dim objShell
        'On Error Resume Next
        Set objShell = CreateObject("WScript.Shell")
            objShell.RegRead (key)
        Set objShell = Nothing
        If Err = 0 Then KeyExists = True
    End Function
    Hi, i wonder if you can help. I have just got round to testing this out for one of my environments that do not have WSUS in place.

    During my testing i was receiving errors regarding the registry key. (Error attached)

    Whilst looking at a few machine i think that the reg path is one step further "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\1003\Install" and have highlighted the section in bold.

    If i amend the script to this path and run it on a machine that has it installed it is correct and does nothing.

    However if i run this on a machine that DOES require Dot Net 4 i recevie the same error as attached.

    k1q32x.png

    Can anyone help, very new to VBS.
    Last edited by Steve_T; 18th July 2011 at 07:14 PM.

  13. #11

    Join Date
    Mar 2009
    Posts
    4
    Thank Post
    0
    Thanked 7 Times in 3 Posts
    Rep Power
    0
    Hi Steve,

    I have noticed a slight error in my code that must have been carried over from testing.
    The Function to check the registry key has a line commented out that shouldn't be. If you replace the function with this code it should work.
    Code:
    Function KeyExists(key)
        Dim objShell
        On Error Resume Next
        Set objShell = CreateObject("WScript.Shell")
            objShell.RegRead (key)
        Set objShell = Nothing
        If Err = 0 Then KeyExists = True
    End Function
    EDIT: Looking in my registry I have an "Install" key in both "Full" and "Full\1033" folders so either will work.
    Last edited by d13373d; 19th July 2011 at 11:52 AM.

  14. 2 Thanks to d13373d:

    Ben-UK (27th July 2011), Steve_T (20th July 2011)

  15. #12

    Join Date
    Apr 2009
    Location
    Essex
    Posts
    66
    Thank Post
    7
    Thanked 8 Times in 7 Posts
    Rep Power
    12
    Great help, thanks very much. Worked a treat.

  16. #13
    Ben-UK's Avatar
    Join Date
    Jan 2010
    Location
    Nottingham
    Posts
    40
    Thank Post
    6
    Thanked 2 Times in 2 Posts
    Rep Power
    10
    Hello,

    Trying to make use of your script at the moment, thanks !

    However cant seem to get it to work

    I have the script set to run at start up but nothings happening, windows displays running start up scripts for 5 seconds then displays the user login box (win xp sp3)

    If I try running the script while logged on it runs and opens the "open file security warning" box for dotNetFx40_Full_x86_x64.exe with Run or Cancel options that i have to manually select. I was under the understanding the /q switch in the script should stop this ??

    Any help would be great !

  17. #14

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Isn't it a /s you want? Silent run of exe, My understanding was /Q only mutes echo replies, Not everything? (May be misunderstanding but worth trying it)

    Steve

  18. #15
    Ben-UK's Avatar
    Join Date
    Jan 2010
    Location
    Nottingham
    Posts
    40
    Thank Post
    6
    Thanked 2 Times in 2 Posts
    Rep Power
    10
    Thanks for the reply. Tired it but did not work

    This is what i need to do, The Open File - Security Warning dialog box is displayed when you try to silently install a hotfix or an update by using a Visual Basic script in Windows XP Service Pack 2

    Where would i add this code to your script to get it to work ??

    set oShell= CreateObject("Wscript.Shell")
    set oEnv = oShell.Environment("PROCESS")
    oEnv("SEE_MASK_NOZONECHECKS") = 1
    oShell.Run "c:\ms04-038\WindowsXP-KB834707-x86-enu /quiet /passive /norestart",0,True
    oEnv.Remove("SEE_MASK_NOZONECHECKS")

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. .NET Framework 4
    By Chuckster in forum Windows
    Replies: 13
    Last Post: 27th June 2011, 01:06 PM
  2. .NET Framework
    By soapyfish in forum Office Software
    Replies: 3
    Last Post: 24th August 2010, 07:39 PM
  3. Deploying .net framework 2.0 via WSUS 3.0
    By randle in forum Windows
    Replies: 7
    Last Post: 3rd October 2007, 01:21 PM
  4. .net Framework 3.0
    By AnnDroyd in forum Windows
    Replies: 5
    Last Post: 25th September 2007, 09:18 AM
  5. Deploying .net Framework 3
    By sidewinder in forum Windows
    Replies: 6
    Last Post: 22nd June 2007, 07:49 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •