Jump to content

Chaining .NET and Paint.NET installers


Recommended Posts

.NET itself supports unattended installation so I'm not sure why this would be an issue? It's a good idea to keep up with .NET updates, just like it's a good idea to keep up with Windows Updates.

 

As for the PDN setup exe bundling the .NET 4.6.1 installer, I'm not sure what this would solve. Unattended installation of Paint.NET via MSI has never included installation of .NET, you've always had to deal with that separately. It's the setup EXE that does chaining of .NET + Paint.NET installation, and that requires showing a UI.

 

If you can push down the Paint.NET installer exe and run it with "/auto" (as described at http://www.getpaint.net/doc/latest/UnattendedInstallation.html) then that'll do .NET as well. You just can't do an MSI push and also get .NET installed.

 

The problem that I have run into with the latest version of PDN requiring .NET 4.6.1 is the chain.

I have a script install .NET 4.6.1 and after that completes, the script runs the PDN executable installer.

.NET 4.6.1 appears to require a reboot for the install to complete and satisfy the PDN requirements.

 

dotNet461.exe /passive /norestart

 

Paintdotnet\setup.exe /auto DESKTOPSHORTCUT=0

 

//install some other apps

 

shutdown /r /t 1

 

.NET goes through the motions and looks to complete the installation. Paint.NET then pops up the dialog box saying "This will install .NET framework 4.6.1 and paint.net." and requires clicking 'ok', defeating the purpose of /auto.

Am I missing something? My current thought is to write the .NET framework registry key that I assume the PDN installer is checking to bluff it past 4.6.1 since the reboot will satisfy everybody, just in a different order.

Thanks!

Link to comment
Share on other sites

I presume you're running the "full" .NET installer, not the "web" one which downloads .NET and then installs it (which is what Paint.NET is bundled with).

 

Paint.NET is looking at the registry key "HKEY_LOCAL_MACHINE \ Software \ Microsoft \ NET Framework Setup \ NDP \ v4 \ Full" for a REG_SZ value of TargetVersion >= "4.6" or Version >= "4.6" 

 

I suppose you could fake that registry key after you install .NET itself, but I can't make any promise about it actually working since I haven't tested it and it sounds super scary.

 

You could, of course, just do a reboot after installing .NET, then install everything else. But, fwiw, Paint.NET does precisely what you want to do here when it's in charge of installing .NET: it sees that .NET reported "reboot required", ignores it, installs Paint.NET anyway, and then prompts the user to reboot. And by that I mean that what you're trying to accomplish is perfectly reasonable because it's what Paint.NET does itself on millions of PCs.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Thanks for the registry key information.

 

You are correct that I am using the offline installer for .NET Framework 4.6.1. Microsoft has added .NET 4.6.1 to WSUS for Windows 7 and Server 2012 but requires the offline installer for Windows 8.1, which is what I am currently installing in my enterprise.

 

My only problem with letting Paint.NET handle the installation of the .NET framework is that it requires clicking "OK" on the notice that PDN will install .NET and PDN with the /auto parameter. If it was silent and a parameter allowed me to confirm installing .NET, and that would work.

 

It looks like my idea to change the registry entry may not work because I have to take ownership and change permissions on that key.

Link to comment
Share on other sites

/auto isn't designed to handle the case of .NET being installed as well. I don't know why Paint.NET doesn't detect that .NET is installed at that point. Perhaps .NET's installation doesn't set those registry keys until after the reboot.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...