We name this batch file DISTRIB.BAT. If you place this batch file in a folder together with the setup program the installed version can be checked every time you run the batch file.
If the version does not match the one set in the VersionName variable the setup program is started. Change the settings in the beginning of the batch file to match your environment. You can include the Ghostscript distribution folder GS together with this if you want to distribute Ghostscript with the batch file.