Deploiement de Greenshot

Ce forum est destiné au support entre utilisateurs de logiciel OPSI
guillaume
Beiträge: 7
Registriert: 19 Feb 2019, 18:08

Deploiement de Greenshot

Beitragvon guillaume » 06 Aug 2019, 22:30

Bonjour,

Je cherche à déployer Greenshot proprement :
- en retirant l'ouverture de la page web à la fin de l'installation
- en mettant le logiciel en français
- en désactivant la popup de mise à jour

Je n'ai pas trouvé de solution pour effectuer cela de façon automatisée avec OPSI. Avez vous réussi à faire cela, si oui, avez vous quelques pistes à me donner ?

Merci

Benutzeravatar
SisterOfMercy
Beiträge: 1016
Registriert: 22 Jun 2012, 19:18

Re: Deploiement de Greenshot

Beitragvon SisterOfMercy » 09 Aug 2019, 10:39

My installscript manually copies files.

Code: Alles auswählen

[Actions]
requiredWinstVersion >= "4.11.5.14"

DefVar $LogDir$
DefVar $ProductId$ 
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $ExitCode$
DefVar $INST_SystemType$
DefVar $INST_MsVersion$

DefStringList $ProductInfo$
DefVar $DisplayVersion$
DefVar $DisplayName$
set $ProductInfo$ = getProductMap
set $DisplayVersion$ = getValue("productversion", $ProductInfo$)
set $DisplayName$ = getValue("name", $ProductInfo$)

set $INST_MsVersion$ = GetMsVersionInfo
Set $INST_SystemType$ = GetSystemType
Set $LogDir$ = "%SystemDrive%\tmp"

;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$       = "greenshot"
Set $MinimumSpace$    = "500 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\Greenshot"

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
   LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
   isFatalError
   ; Stop process and set installation status to failed
endif
if CompareDotSeparatedNumbers($INST_MsVersion$, "<", "5.1")
   LogError "Windows XP or newer is required for " + $ProductId$ 
   isFatalError
endif
   
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$

if FileExists("%ScriptPath%\delsub3264.opsiscript")
   comment "Start uninstall sub section"
   Sub "%ScriptPath%\delsub3264.opsiscript"
endif
   
comment "installing"

if ($INST_SystemType$ = "x86 System")
   Message "Installing " + $ProductId$ + "..."
   comment "Copy files"
   Files_install_32 /32Bit
   comment "Patch ini-files"   
   Patches_greenshot-fixed.ini $InstallDir32$ + "\greenshot-fixed.ini"
   Patches_greenshot-defaults.ini $InstallDir32$ + "\greenshot-defaults.ini"   
   comment "Patch Registry"
   Registry_install /32Bit
   Registry_install_AllProfiles /AllNTUserDats
   comment "Create shortcuts"
   LinkFolder_install
endif

if ($INST_SystemType$ = "64 Bit System")
   Message "Installing " + $ProductId$ + "..."
   comment "Copy files"
   Files_install_32 /64Bit
   comment "Patch ini-files"   
   Patches_greenshot-fixed.ini $InstallDir32$ + "\greenshot-fixed.ini"
   Patches_greenshot-defaults.ini $InstallDir32$ + "\greenshot-defaults.ini"
   comment "Patch Registry"
   Registry_install /32Bit
   Registry_install_AllProfiles /AllNTUserDats
   comment "Create shortcuts"
   LinkFolder_install
endif

[Files_install_32]
copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"

[Patches_greenshot-fixed.ini]
set [Core] UpdateCheckInterval=0
set [Core] IsFirstLaunch=False

[Patches_greenshot-defaults.ini]
set [Core] Language=en-US
set [Core] PlayCameraSound=False
set [Core] OutputFileFormat=png
set [Core] OutputPrintFooter=False
set [Core] IECapture=False

[Registry_install]
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$ProductId$]
set "Comments" = "Installed with OPSI"
set "DisplayIcon" = "$InstallDir32$\Greenshot.exe"
set "DisplayVersion" = "$DisplayVersion$"
set "NoModify" = REG_DWORD:00000001
set "NoRepair" = REG_DWORD:00000001
set "NoRemove" = REG_DWORD:00000001
set "Publisher" = "Greenshot Team"
set "DisplayName" = "$DisplayName$ $DisplayVersion$"
set "UninstallString" = "$InstallDir32$\Greenshot.exe"
set "InstallLocation" = "$InstallDir32$"

[Registry_install_AllProfiles]
; Remove stored start menu order
deletekey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu]

[LinkFolder_install]
set_basefolder common_programs
set_subfolder ""
set_link
    name: "Greenshot"
    target: "$InstallDir32$\Greenshot.exe"
    parameters:
    working_dir: "$InstallDir32$"
    icon_file: "$InstallDir32$\Greenshot.exe"
    icon_index: 0
end_link


contents of files directory:

Code: Alles auswählen

Languages\help-en-US.html
Languages\help-nl-NL.html
Languages\language-en-US.xml
Languages\language-nl-NL.xml
Greenshot.exe
Greenshot.exe.config
greenshot-defaults.ini
greenshot-fixed.ini
GreenshotPlugin.dll
LinqBridge.dll
log4net.dll
log4net.xml
readme.txt
Zuletzt geändert von SisterOfMercy am 09 Aug 2019, 17:18, insgesamt 1-mal geändert.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!

guillaume
Beiträge: 7
Registriert: 19 Feb 2019, 18:08

Re: Deploiement de Greenshot

Beitragvon guillaume » 09 Aug 2019, 17:12

Thank you SisterofMercy, i do not expect so much, that's really appreciated !!
I'll try it asap and change this post as resolved if everything's OK