There is an supported (and dare I say easier) way to deploy Paint.net. The installer has a "/createMsi" switch, which creates a custom msi file (based on your preferences) which you can then deploy with a GP. eg:
This switch is described very well in the documentation. Unfortuantly I couldn't find a copy of the documentation on their web page, so the easiest way to get it is to install a copy of paint.net locally and go to Help topics.
Alternatively, the relevant page is at:
You can create an .msi file by using the command line switch
/createMsi /auto. This will create an MSI package suitable for silent/AD/GPO installsation.
The /auto switch skips configuration of options and automatically accepts the license agreement.
Values from HKLM\Software\Paint.NET (if they exist) will be incorporated into the MSI as well. All properties specified on the command line are merged into the MSI package, so no further transforms are neccessary.
Run PaintDotNet_2_xx.exe /? for more info or read the help files after installing.
PROPERTY=VALUE - Sets an MSI property. Paint.NET specific properties are TARGETDIR=installDir, CHECKFORBETAS=0 or 1, CHECKFORUPDATES=0 or 1, JPGPNGBMPEDITOR=0 or 1, TGAEDITOR=0 or 1. Multiple properties may be specified.
I wanted to put Paint.NET into GPO, but it wasn't MSI instalation. So this is a guide how to extract the MSI package from the EXE setup, how to modify it (create transform) to be able to use it with GPO and last how to add extra localization to it.
1. Extract MSI from Setup.EXE
On testing machine run the standard setup. The MSI package will be copied to %ProgramFiles%\Paint.NET\Staging - take it from there.
2. Adapt for using with Active Directory GPO
Unfortunatelly the MSI does not work, if you try to use it, it requests to be run from setup exe file. Fortunatelly the solution is easy: if you set up property USINGWIZARD to value 1, the MSI will run and install with the default settings (default INSTALLDIR to %ProgramFiles%\Paint.NET etc.), but probably this is OK for majority of cases.
So just simply create a small transform, in the transform you just add new property USINGWIZARD=1 and that's all.
Now you can deploy Paint.NET via GPO.
3. Add localization to the setup
All right, if you are English or German, the localization is included in the standard setup. But if you want to use other localizations, you can download them from Paint.NET homepage and you must add them to the setup.
So, download localization for your prefered language from the Paint.NET website. Each localization is one ZIP file containing one *.resources file. Extract the file to your disk, we need to add it to the installation.
I will describe in Wise Package Studio 5.6
Create new transform on the MSI package. Also you can use the transform created in section 2, it's up to ou.
In WPS go to Setup Editor (tabs in the bottom-left). Switch to Components tab and create new component. Name it whatever you like, although I prefer to give it name like A_Something, so my modifications stay at the top.
Don't modify anything else, just hit OK button to finish creating ne component.
Now switch to Tables tab and in the left column select table Component. Find the component you created (sort the table by clicking on the Component column header, if you named it like me, it will be at the top).
Modify the value in Directory_ column value to TARGETDIR (select from combo box).
Modify Attributes column value to 256.
Go back to Components tab. Select your component, right click on it and select New->File. Browse for your localization file.
Again right click on your component and select Details. Make sure that File Key Path field is set to the file selected in previous paragraph.
Now Compile the transform, that's all. The compilation will create 2 files, one *.MST and one *.CAB, you need both.