cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Scott_Talley
Engaged Sweeper II
Any chance that someone who knows more about the installers than I do could develop a script for installing Greenshot? I've tried and totally failed 😞
1 ACCEPTED SOLUTION
MakeBug
Champion Sweeper
Not a big deal...this worked for me (just save it as .xml and import into lansweeper):
<?xml version="1.0" encoding="utf-8"?>
<Package>
<Name>Greenshot</Name>
<Description></Description>
<ShutdownOption>0</ShutdownOption>
<ShutdownTime>0</ShutdownTime>
<MaxDuration>300</MaxDuration>
<Rescan>False</Rescan>
<RunMode>2</RunMode>
<Steps>
<Step>
<Nr>1</Nr>
<Name>Install</Name>
<Type>1</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-3</Failure>
<Path>{PackageShare}\Various\Greenshot.exe</Path>
<Parameters>/verysilent</Parameters>
<MSIParameters>/i /qn /norestart</MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>"{PackageShare}\Various\Greenshot.exe" /verysilent</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>2</Nr>
<Name>Kill IE</Name>
<Type>3</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-2</Success>
<Failure>-3</Failure>
<Path>iexplorer.exe</Path>
<Parameters>/f </Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>taskkill /im iexplorer.exe /f </Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
</Steps>
<SoftwareVersion>5233</SoftwareVersion>
</Package>


Remember that you have to set the correct path to the installer. Also I set the user to "scanning credentials" because that user has administrator privileges in our network.
I added the kill-command because the installation still opens the website in silent mode (not the best solution but I couldn't figure out a better way). Maybe you also have to change this if you use a different browser as default.
But overall not a big thing. Btw. I hate executables that are not unpackable to get the msi.

View solution in original post

6 REPLIES 6
Michael_V
Champion Sweeper III
Thanks, never heard of greenshot before, I replaced my old version of snagit with it.
PeterJG
Champion Sweeper II
here is my package xml .. have it to remove and lock the uninstall option from users.

<?xml version="1.0" encoding="utf-8"?>
<Package>
<Name>Greenshot</Name>
<Description>1.2.8.12 (11.23.15)</Description>
<ShutdownOption>0</ShutdownOption>
<ShutdownTime>0</ShutdownTime>
<MaxDuration>900</MaxDuration>
<Rescan>True</Rescan>
<RunMode>-1</RunMode>
<Steps>
<Step>
<Nr>1</Nr>
<Name>Check if Installed</Name>
<Type>5</Type>
<ReturnCodes></ReturnCodes>
<Success>2</Success>
<Failure>4</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command></Command>
<EditMode>False</EditMode>
<Conditions>
<Condition>
<Type>1</Type>
<SpecOne>C:\Program Files\Greenshot</SpecOne>
<SpecTwo>Greenshot.exe</SpecTwo>
<Operator>1</Operator>
<Value></Value>
</Condition>
</Conditions>
</Step>
<Step>
<Nr>2</Nr>
<Name>Upgrade</Name>
<Type>5</Type>
<ReturnCodes></ReturnCodes>
<Success>3</Success>
<Failure>-2</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command></Command>
<EditMode>False</EditMode>
<Conditions>
<Condition>
<Type>1</Type>
<SpecOne>C:\Program Files\Greenshot</SpecOne>
<SpecTwo>greenshot.exe</SpecTwo>
<Operator>9</Operator>
<Value>1.2.8.12</Value>
</Condition>
<Condition>
<Type>1</Type>
<SpecOne>C:\Program Files\Greenshot</SpecOne>
<SpecTwo>greenshot.exe</SpecTwo>
<Operator>1</Operator>
<Value></Value>
</Condition>
</Conditions>
</Step>
<Step>
<Nr>3</Nr>
<Name>Terminate Greenshot.exe</Name>
<Type>3</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-1</Failure>
<Path>greenshot.exe</Path>
<Parameters>/f /t</Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>taskkill /im greenshot.exe /f /t</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>4</Nr>
<Name>Install Greenshot</Name>
<Type>1</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-1</Failure>
<Path>{PackageShare}\Installers\greenshot\greenshot_setup.exe</Path>
<Parameters>/VERYSILENT /NOCANCEL /SUPPRESSMSGBOXES /LANG=English /NORESTART /SP-</Parameters>
<MSIParameters>/i /qn /norestart</MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>"{PackageShare}\Installers\greenshot\greenshot_setup.exe" /VERYSILENT /NOCANCEL /SUPPRESSMSGBOXES /LANG=English /NORESTART /SP-</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>5</Nr>
<Name>wait 5</Name>
<Type>2</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-1</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>timeout /t 5 /nobreak</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>6</Nr>
<Name>Remove uninstall icon</Name>
<Type>2</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-1</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>for /r "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Greenshot" %d in (UNINST~1.LNK) do @if exist "%d" del /q /f "%d"</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>7</Nr>
<Name>wait 5</Name>
<Type>2</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-1</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>timeout /t 5 /nobreak</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>8</Nr>
<Name>Remove Uninstall Program</Name>
<Type>2</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-1</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>for /r "C:\Program Files\Greenshot" %d in (unins000.exe) do @if exist "%d" del /q /f "%d"</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>9</Nr>
<Name>wait 5</Name>
<Type>2</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-1</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>timeout /t 5 /nobreak</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>10</Nr>
<Name>Lock Control Pannel Ad_Remove</Name>
<Type>2</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-1</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Greenshot_is1" /v "NoModify" /t REG_DWORD /d "1" /f &amp;&amp; Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Greenshot_is1" /v "NoRemove" /t REG_DWORD /d "1" /f &amp;&amp; Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Greenshot_is1" /v "NoRepair" /t REG_DWORD /d "1" /f</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>11</Nr>
<Name>Enable Auto-Start</Name>
<Type>2</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-2</Success>
<Failure>-3</Failure>
<Path></Path>
<Parameters></Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "Greenshot" /t REG_SZ /d "C:\Program Files\Greenshot\Greenshot.exe" /f</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
</Steps>
<SoftwareVersion>6013</SoftwareVersion>
</Package>
Terry_Jamro
Engaged Sweeper II
Here is what I'm using to install Greenshot.

Some of our computers have an older version of Greenshot, so I added a Kill process first. This works for upgrades and new installs. In addition I added /LANG=English because I found the install was popping up asking me to select a language. Adjust the install folder for your environment and filename depending on the version.


<?xml version="1.0" encoding="UTF-8"?>

-<Package>

<Name>Greenshot</Name>

<Description/>

<ShutdownOption>0</ShutdownOption>

<ShutdownTime>0</ShutdownTime>

<MaxDuration>300</MaxDuration>

<Rescan>False</Rescan>

<RunMode>1</RunMode>


-<Steps>


-<Step>

<Nr>1</Nr>

<Name>Kill Greenshot</Name>

<Type>3</Type>

<ReturnCodes>0,1641,3010</ReturnCodes>

<Success>-1</Success>

<Failure>-1</Failure>

<Path>Greenshot.exe</Path>

<Parameters>/f /t</Parameters>

<MSIParameters/>

<MSIName/>

<MSIVersion/>

<Command>taskkill /im Greenshot.exe /f /t </Command>

<EditMode>False</EditMode>

<Conditions/>

</Step>


-<Step>

<Nr>2</Nr>

<Name>Install Greenshot</Name>

<Type>1</Type>

<ReturnCodes>0,1641,3010</ReturnCodes>

<Success>-2</Success>

<Failure>-3</Failure>

<Path>{PackageShare}\Installers\Greenshot\Greenshot-INSTALLER-1.2.8.12-RELEASE.exe</Path>

<Parameters>/VERYSILENT /SUPPRESSMSGBOXES /LANG=English /NORESTART /SP</Parameters>

<MSIParameters>/i /qn /norestart</MSIParameters>

<MSIName/>

<MSIVersion/>

<Command>"{PackageShare}\Installers\Greenshot\Greenshot-INSTALLER-1.2.8.12-RELEASE.exe" /VERYSILENT /SUPPRESSMSGBOXES /LANG=English /NORESTART /SP</Command>

<EditMode>False</EditMode>

<Conditions/>

</Step>

</Steps>

<SoftwareVersion>6013</SoftwareVersion>

</Package>
crashff
Champion Sweeper
You can also do batch installs of software, including Greenshot, by using Ninite.com 's installer through Lansweeper as well. (this make for fast and easy batch updating of things like chrome, java, acrobat, etc.
PeterJG
Champion Sweeper II
i've use /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- switches on my deployments if you want totally silent.
MakeBug
Champion Sweeper
Not a big deal...this worked for me (just save it as .xml and import into lansweeper):
<?xml version="1.0" encoding="utf-8"?>
<Package>
<Name>Greenshot</Name>
<Description></Description>
<ShutdownOption>0</ShutdownOption>
<ShutdownTime>0</ShutdownTime>
<MaxDuration>300</MaxDuration>
<Rescan>False</Rescan>
<RunMode>2</RunMode>
<Steps>
<Step>
<Nr>1</Nr>
<Name>Install</Name>
<Type>1</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-1</Success>
<Failure>-3</Failure>
<Path>{PackageShare}\Various\Greenshot.exe</Path>
<Parameters>/verysilent</Parameters>
<MSIParameters>/i /qn /norestart</MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>"{PackageShare}\Various\Greenshot.exe" /verysilent</Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
<Step>
<Nr>2</Nr>
<Name>Kill IE</Name>
<Type>3</Type>
<ReturnCodes>0,1641,3010</ReturnCodes>
<Success>-2</Success>
<Failure>-3</Failure>
<Path>iexplorer.exe</Path>
<Parameters>/f </Parameters>
<MSIParameters></MSIParameters>
<MSIName></MSIName>
<MSIVersion></MSIVersion>
<Command>taskkill /im iexplorer.exe /f </Command>
<EditMode>False</EditMode>
<Conditions />
</Step>
</Steps>
<SoftwareVersion>5233</SoftwareVersion>
</Package>


Remember that you have to set the correct path to the installer. Also I set the user to "scanning credentials" because that user has administrator privileges in our network.
I added the kill-command because the installation still opens the website in silent mode (not the best solution but I couldn't figure out a better way). Maybe you also have to change this if you use a different browser as default.
But overall not a big thing. Btw. I hate executables that are not unpackable to get the msi.