Views: 11k  |  Created: 07/14/2013 by: J.Frenker

Average Rating: 0
Greenshot has 1 inventory records, 0 Questions, 0 Blogs and 0 links. Please help add to this by sharing more!

Deployment Tips (2)

Most Common Setup Type
Windows Installer (Delivered as an EXE)
Average Package Difficulty Rating
Rated 1 / 5 (Very Easy) based on 2 ratings
Most Commonly Reported Deployment Method
Vendor Provided Command Line (answer file driven)
or cancel

Deployment of Greenshot

Licence: OpenSource


Easy Script to deploy Greenshot Screencapture Software, incl. deployment of default INI Configuration Files.

At 1st download the Greenshotinstaller and all Language-Packs you needed. Install Greenshot on a local computer and configure it with your own settings, then copy the Settings INI File (located in %systemdrive%\users\%username%\appdata\roaming\greenshot\).

Copy all the files in one folder (the ini file, the language files and the help files that you have downloaded from the Greenshot-Website)

Crearte Batachfiles located in the the folder:

InstallScript for Greenshot:

 @echo off
REM Log Setup Process...

REM Place Here Programname for Installation
REM =======================================
set prog1=Greenshot

REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
REM <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set ext=.log
set ext2=%date%
set logfile=%prog1%%ext2%%ext%

REM Create Logfolder
REM ----------------
 if exist "%systemdrive%\logs" (
  goto step2
  ) else (
  goto step1
  mkdir "%systemdrive%\logs"
REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
REM <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

echo ##############################     >>%systemdrive%\logs\%logfile%
echo # %computername%       >>%systemdrive%\logs\%logfile%
echo #         >>%systemdrive%\logs\%logfile%
echo # Script based installation for     >>%systemdrive%\logs\%logfile%
echo # %prog1%        >>%systemdrive%\logs\%logfile%
echo #         >>%systemdrive%\logs\%logfile%
echo # Path to Intalllog: %systemdrive%\logs    >>%systemdrive%\logs\%logfile%
echo #         >>%systemdrive%\logs\%logfile%
echo # Installation Date: %date%     >>%systemdrive%\logs\%logfile%
echo # Installation Time: %time:~0,8%     >>%systemdrive%\logs\%logfile%
echo ##############################     >>%systemdrive%\logs\%logfile%
echo #         >>%systemdrive%\logs\%logfile%
echo #         >>%systemdrive%\logs\%logfile%
echo #         >>%systemdrive%\logs\%logfile%
echo #         >>%systemdrive%\logs\%logfile%
echo #         >>%systemdrive%\logs\%logfile%
echo [%time:~0,8%] Installing %prog1%     >>%systemdrive%\logs\%logfile%
 if exist "%PROGRAMFILES%\Greenshot" (
  goto step12
  ) else (
  goto step11
  Greenshot-INSTALLER- /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /LOG="%systemdrive%\logs\Greenshot.log"
  if errorlevel 1 goto instError
  echo [%time:~0,8%] Installation for %prog1% complete  >>%systemdrive%\logs\%logfile%
  goto step13
  echo [%time:~0,8%] The Programm %prog1% already installed >>%systemdrive%\logs\%logfile%
  goto ende
  REM Copy default config to Greenshotfolder
  REM ======================================
  xcopy /q /y Greenshot.ini "%PROGRAMFILES%\Greenshot\"
  xcopy /q /y greenstart.cmd "%PROGRAMFILES%\Greenshot\"  

  REM Create Link to Startscript
  REM ==========================
  echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
  echo sLinkFile = "%systemdrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\greenshot.lnk" >> %SCRIPT%
  echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
  echo oLink.TargetPath = "%programfiles%\Greenshot\greenstart.cmd" >> %SCRIPT%
  echo oLink.Save >> %SCRIPT%

  cscript /nologo %SCRIPT%
  if ERRORLEVEL 1 goto failedLink
  echo [%time:~0,8%] Autostart Link created   >>%systemdrive%\logs\%logfile%
  goto endCS
  echo [%time:~0,8%] Failed to create Startup Link  >>%systemdrive%\logs\%logfile%
  del %SCRIPT%
  REM Install Language Package - depend on given Language
  REM ==================================================
  if %1==DE goto lpDe
  if %1==FR goto lpFR
  if %1==ES goto lpES
  if %1==IT goto lpIT
  if %1==PL goto lpPL
  if %1==TR goto lpTR
  if %1==NL goto lpNL  
  goto paramError
  echo [%time:~0,8%] Copy Languagepack %1    >>%systemdrive%\logs\%logfile%
  xcopy language-de-DE.xml %programfiles%\Greenshot\Languages
  goto ende
  echo [%time:~0,8%] Copy Languagepack %1    >>%systemdrive%\logs\%logfile%
  xcopy language-es-ES.xml %programfiles%\Greenshot\Languages
  xcopy help-es-ES.html %programfiles%\Greenshot\Languages
  goto ende
  echo [%time:~0,8%] Copy Languagepack %1    >>%systemdrive%\logs\%logfile%
  xcopy language-fr-FR.xml %programfiles%\Greenshot\Languages
  goto ende
  echo [%time:~0,8%] Copy Languagepack %1    >>%systemdrive%\logs\%logfile%
  xcopy language-nl-NL.xml %programfiles%\Greenshot\Languages
  goto ende
  echo [%time:~0,8%] Copy Languagepack %1    >>%systemdrive%\logs\%logfile%
  xcopy language-it-IT.xml %programfiles%\Greenshot\Languages
  xcopy help-it-IT.html %programfiles%\Greenshot\Languages
  goto ende

  echo [%time:~0,8%] Copy Languagepack %1    >>%systemdrive%\logs\%logfile%
  xcopy language-pl-PL.xml %programfiles%\Greenshot\Languages
  xcopy help-pl-PL.html %programfiles%\Greenshot\Languages
  goto ende

  echo [%time:~0,8%] Copy Languagepack %1    >>%systemdrive%\logs\%logfile%
  xcopy language-tr-TR.xml %programfiles%\Greenshot\Languages
  goto ende

  echo [%time:~0,8%] Installer for %prog1% failed   >>%systemdrive%\logs\%logfile%
  goto ende

  echo [%time:~0,8%] Error - wrong Parameter [ %1 ]   >>%systemdrive%\logs\%logfile%
  goto ende

Startup Script/Batch for Autostart

 iF EXIST "%systemdrive%\Users\%USERNAME%\AppData\Roaming\Greenshot\Greenshot.ini" GOTO START

xcopy /q /y "%PROGRAMFILES%\Greenshot\Greenshot.ini" "%systemdrives%\Users\%USERNAME%\AppData\Roaming\Greenshot\"


start "" "%programfiles%\Greenshot\greenshot.exe"


What does the Scripts do:

The installation script create a log folder and logfile for the installation, install Greenshot and copy the startup batch and config to the greenshot folder. A vbs script created in the batch create a link from the startup batch into the autostart folder, this script check if the config INI are already located in the users appdata\roaming folder and when not it copy the default config so every user have the same settings.

The  Startup VAR for the script are the language code, with this you can install directly the language packs and help files for the neede languages (for me: DE = GERMAN, FR=FRANCE, ES=SPAIN, IT=ITALY, PL = POLSKI, TR=TURKE, NL=NETHERLAND).

In my Installationfolder are located this files:

  • Greenshot.ini
  • Greenshot-INSTALLER-
  • greenstart.cmd
  • help-es-ES.html
  • help-it-IT.hmtl
  • help-pl-PL.html
  • help-tr-TR.html
  • install_greenshot.cmd
  • language-de-DE.xml
  • language-es-ES.xml
  • language-fr-FR.xml
  • language-it-IT.xml
  • language-nl-NL.xml
  • language-pl-PL.xml
  • language-tr-TR.xm

The XML and HTML files are download directly from the greenshot webside.

Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: Very Easy
Platform(s): Windows
  • Hi,
    I've tryied the script, but it doesn't copy the language - the .ini is copied but the language not (I've tryied with help-it-IT.html and language-it-IT.xml)
Please log in to comment
Command Line

Greenshot-whichever-version.exe" /LOADINF="InstallConfig.inf" /VERYSILENT /NORUN



Respectively, install in English, in x86 program files, compact installation without extra stuff, (no sure about components) and no startup.  However, it will launch the website at the end of the installation.

Setup Information:
Setup Type: Windows Installer (Delivered as an EXE)
Deployment Method Used: Vendor Provided Command Line (answer file driven)
Deployment Difficulty: Very Easy
Platform(s): Windows
  • Hi,

    Thanks for this tips. That's help me to build my msi.
    on tips maybe help other people, For the auto start , i've add key in register HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run : String Greenshot value : "C:\my_path\greenshot.exe

    Thanks lot
Please log in to comment

Inventory Records (1)

View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.





Questions & Answers (0)

Questions & Answers related to Greenshot Greenshot

Blogs (0)

Blog posts related to Greenshot Greenshot

Reviews (0)

Reviews related to Greenshot Greenshot