Flexible Security For Your Peace of Mind
Deploy Greenshot (open source application) with Specops Deploy / App

Deploy Greenshot (open source application) with Specops Deploy / App

(Last updated on August 2, 2018)

Greenshot is an open source screenshot tool, similar to the Windows Snipping Tool, but with more functionalities – and it’s free. In this blog, I will demonstrate how to install an open source application such as Greenshot with Specops Deploy / App in a simple and standardized way.

There are three steps you need to follow for deployment:

Step 1: Silent install

Make sure that the application can be installed silently. Download the application to the c:\temp folder on a test machine. Open a command prompt as administrator and run the application with the silent switch /? – in this case: Greenshot-INSTALLER-1.2.6.7-RELEASE.exe /?

Setup

When you see the silent switch, select /VERYSILENT: Greenshot-INSTALLER-1.2.6.7-RELEASE.exe /VERYSILENT is the correct switch for a silent installation.

Step 2: Silent uninstall

Many open source applications use an uninstall.exe file under the program files folder after the installation. I found an unins.000.exe in c:\program files\greenshot.

I tried the same silent switch for the uninstall like this: %ProgramFiles%\greenshot\unins000.exe /VERYSILENT

You cannot uninstall the application if it is running. You need to close the application first or run a command called TaskKill during uninstallation, see the Uninstall.cmd part below to copy the working solution.

Step 3: Disable application update

The application automatically looks for new versions. You should disable the application update as most users are not local admins, and should not be presented an upgrade option.

Find the greenshot.ini in the profile folder C:\Users\MyUserName\AppData\Roaming\Greenshot and copy the file to the root folder where the greenshot.exe resides. Edit the greenshot.ini file and change the line UpdateCheckInterval=1 to UpdateCheckInterval=0.

Add steps 1-3 to Specops Deploy / App

All I have to do now is to put all three steps into deploy /app.

I created two script files in the root folder called Install.cmd and Uninstall.cmd allowing my x86 package to be installed and uninstalled on both x86 and x64 windows OS without any problems.

Install.cmd

IF "%PROCESSOR_ARCHITECTURE%" ==  "AMD64" GOTO X64

:X86

REM **** x86 ****

ECHO X86

Greenshot-INSTALLER-1.2.6.7-RELEASE.exe /VERYSILENT

Goto END

 

:X64

REM **** x64 ****

ECHO X64

Greenshot-INSTALLER-1.2.6.7-RELEASE.exe /VERYSILENT

 

:END

copy .\greenshot.ini "c:\program files\greenshot\greenshot.ini" /Y

 

Uninstall.cmd

IF "%PROCESSOR_ARCHITECTURE%" ==  "AMD64" GOTO X64

:X86

REM **** x86 ****

ECHO X86

taskkill /IM greenshot.exe /t /f

"%ProgramFiles%\greenshot\unins000.exe" /VERYSILENT

Goto END

 

:X64

REM **** x64 ****

ECHO X64

taskkill /IM greenshot.exe /t /f

"%ProgramFiles%\greenshot\unins000.exe" /VERYSILENT

 

:END

rmdir "C:\program files\greenshot" /S /Q

The root folder where all four files reside should look like:

Root folder

Now I can create a new legacy package in Specops Deploy / App that points to install.cmd.

Installation Options

Uninstallation options

The uninstall command should be: %SpecopsDeployExecuteDir%\uninstall.cmd

Deployment options

Enable the Uninstall the package if the deployments fall “Out of scope of Management” checkbox.

Now you will have a working Package that will install, uninstall silently and not update on its own over internet. The package will also work on both x86 and x64 platforms.

Happy deployment!

 

Tags: , ,

Written by

Johan Soderstrom

Product Specialist, Specops Software

More Articles
Back to Blog