
Start "" "C:\Program Files\Greenshot\greenshot.exe"Ī link to greenshot.cmd is created and put in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\". Xcopy /q /y "C:\Users\Default\AppData\Roaming\Greenshot\config.dat" "C:\Users\%USERNAME%\AppData\Roaming\Greenshot\" IF EXIST "C:\Users\%USERNAME%\AppData\Roaming\Greenshot\config.dat" GOTO START The DOS script is located in "C:\program files\greenshot\" and named greenshot.cmd The configuration file is copied to "C:\Users\Default\AppData\Roaming\Greenshot\config.dat". The greenshot package is installed with the parameters in the note above this one. user setting by deploying the configuration file to the default user profile and created a DOS script that check for the config file when greenshot is loaded by a new user. Then write another script call Greenshot_ActiveSetup, with the following lines and copy it into your ActiveSetup folder (remember to keep your config file in the same location as the script when compiling as it will copy the config file into & "\Greenshot")įileInstall( & "\Greenshot\config.dat",1)

RegWrite("HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\" & $AppName,"Version","REG_SZ","1") RegWrite("HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\" & $AppName,"StubPath","REG_EXPAND_SZ",C:\Temp\ActiveSetup\" & $AppName & "\" & $EXEName) Active setup to copy files to each users profileĭirCreate("C:\Temp\ActiveSetup\" & $AppName) This location to store the active setup is an example, it can be anywhere all users can access, just rememebr to change it in all locations in the & "\ActiveSetup\" & $EXEName, "C:\Temp\ActiveSetup\" & $AppName & "\" & $EXEName,1)
#GREENSHOT MSI PACKAGE INSTALL#
In your install script include the lines: If I didn’t show a tab, it because there is nothing to set.Active setups are a cleaner way to install the config file fo each user as they will automatically run when the user logs on for the first time after they are installed.Ĭreate an directory in your install folder below your install script called ActiveSetup In the Content Tab, make sure it is pointing to your ConfigMgr Content Source. Now that we have our Content created, in ConfigMgr
#GREENSHOT MSI PACKAGE UPDATE#
How many days between every update check? (0=no checks) I also copy a file into the program folder that disables the update notifications Here are some of the addons that are disabled in this install (Left = Default, Right = Modified Install via.
#GREENSHOT MSI PACKAGE DOWNLOAD#
I also copied a couple of preference files (in the download available), this is also supposed to disable automatic updates and disables Community features (Save to Flickr, etc)Ĭomponents=plugins,plugins\ocr,plugins\titlefix

If exist "%ProgramFiles(x86)%\Greenshot\" rmdir "%ProgramFiles(x86)%\Greenshot\" /S /Q

If exist "%ProgramFiles%\Greenshot\" rmdir "%ProgramFiles%\Greenshot\" /S /Q "C:\Program Files\Greenshot\unins000.exe" /VERYSILENT /NORESTART Uninstall Script (Uninstall_Greenshot.cmd) Note, in most of my scripts, I use this line instead of the actual installer name “for %%i in (*.exe) do cmd /c %%I” – This way, each time the installer is updated, I don’t need to change the script, just copy the folder contents and replace the installer file. If exist "%ProgramFiles(x86)%\Greenshot\" xcopy /i /r /h /e /y greenshot-fixed.ini "%ProgramFiles(x86)%\Greenshot\" If exist "%ProgramFiles%\Greenshot\" xcopy /i /r /h /e /y greenshot-fixed.ini "%ProgramFiles%\Greenshot\"

REM Using FOR Loop to find any EXE file and run it with these argumentsįor %%i in (*.exe) do cmd /c %%i /LOADINF="Greenshot.inf" /VERYSILENT /NORESTART \\ConfigMgrSourceServer\Apps\GreenShot\VersionNumber\Įcho *** This will kill Greenshot Processes *** Quick Note, I use Greenshot for all of the screen captures on my site.
