Jump to content

Only install if it hasn't been installed before


Recommended Posts

I'm including paint.net in an installer and I only want to install it if it hasn't already been installed, or a previous version exists. Is it, therefore, possible to find out if it has been installed and what version has been installed?

Link to comment
Share on other sites

What installer are you including it in? Be sure to follow the licensing: if you're charging for your service or whatever in any way, then you can't include Paint.NET.

The installer acts as an installer and a reinstaller. It's an important diagnostic tool. If you need to check the currently installed version of Paint.NET, then do the following:

1. Query this registry key to determine where it's installed: HKEY_LOCAL_MACHINE / Software / Paint.NET / TARGETDIR . On my system it equals "C:\Program Files\Paint.NET." If your installer is 32-bit on a 64-bit system, and you try to access that location, it will be redirected to "Program Files (x86)" so you will need to use the Win32 APIs to turn off the redirection while poking around at Paint.NET.

2. Append \PaintDotNet.exe to that path and use the standard methods to query the version of the file.

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...