mirror of
https://github.com/greenshot/greenshot
synced 2025-07-06 04:52:16 -07:00
add install option to disable the default win11 prtscr tool (#484)
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
This commit is contained in:
parent
f862e79485
commit
a3e65fee6f
1 changed files with 19 additions and 0 deletions
|
@ -181,6 +181,8 @@ Root: HKCU; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: "
|
||||||
Root: HKCU; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
|
Root: HKCU; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
|
||||||
Root: HKCU; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE,0"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
|
Root: HKCU; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE,0"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
|
||||||
Root: HKCU; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
|
Root: HKCU; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
|
||||||
|
; Disable the default PRTSCR Snipping Tool in Windows 11
|
||||||
|
Root: HKCU; Subkey: Control Panel\Keyboard; ValueType: dword; ValueName: "PrintScreenKeyForSnippingEnabled"; ValueData: "0"; Flags: uninsdeletevalue; Check: ShouldDisableSnippingTool
|
||||||
; HKEY_LOCAL_MACHINE - for all users when admin
|
; HKEY_LOCAL_MACHINE - for all users when admin
|
||||||
Root: HKLM; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
|
Root: HKLM; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
|
||||||
Root: HKLM; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
|
Root: HKLM; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
|
||||||
|
@ -269,6 +271,7 @@ en.win10=Windows 10 plug-in
|
||||||
en.UninstallIconDescription=Uninstall
|
en.UninstallIconDescription=Uninstall
|
||||||
en.ShowLicense=Show license
|
en.ShowLicense=Show license
|
||||||
en.ShowReadme=Show Readme
|
en.ShowReadme=Show Readme
|
||||||
|
en.disablewin11snippingtool=Disable Win11 default PrtScr snipping tool
|
||||||
|
|
||||||
de.confluence=Confluence Plug-in
|
de.confluence=Confluence Plug-in
|
||||||
de.default=Standard installation
|
de.default=Standard installation
|
||||||
|
@ -281,6 +284,7 @@ de.optimize=Optimierung der Leistung, kann etwas dauern.
|
||||||
de.startgreenshot={#ExeName} starten
|
de.startgreenshot={#ExeName} starten
|
||||||
de.startup={#ExeName} starten wenn Windows hochfährt
|
de.startup={#ExeName} starten wenn Windows hochfährt
|
||||||
de.win10=Windows 10 Plug-in
|
de.win10=Windows 10 Plug-in
|
||||||
|
de.disablewin11snippingtool=Deaktiviere das Standard Windows 11 Snipping Tool auf "Druck"
|
||||||
|
|
||||||
es.confluence=Extensión para Confluence
|
es.confluence=Extensión para Confluence
|
||||||
es.default=${default}
|
es.default=${default}
|
||||||
|
@ -482,6 +486,7 @@ Name: "compact"; Description: "{code:CompactInstall}"
|
||||||
Name: "custom"; Description: "{code:CustomInstall}"; Flags: iscustom
|
Name: "custom"; Description: "{code:CustomInstall}"; Flags: iscustom
|
||||||
|
|
||||||
[Components]
|
[Components]
|
||||||
|
Name: "disablesnippingtool"; Description: {cm:disablewin11snippingtool}; Flags: disablenouninstallwarning; Types: default full custom; Check: IsWindows11OrNewer()
|
||||||
Name: "greenshot"; Description: "Greenshot"; Types: default full compact custom; Flags: fixed
|
Name: "greenshot"; Description: "Greenshot"; Types: default full compact custom; Flags: fixed
|
||||||
;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: full
|
;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: full
|
||||||
Name: "plugins\box"; Description: {cm:box}; Types: full custom; Flags: disablenouninstallwarning
|
Name: "plugins\box"; Description: {cm:box}; Types: full custom; Flags: disablenouninstallwarning
|
||||||
|
@ -531,6 +536,7 @@ Name: "languages\ukUA"; Description: {cm:ukUA}; Types: full custom; Flags: disab
|
||||||
Name: "languages\viVN"; Description: {cm:viVN}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('e')
|
Name: "languages\viVN"; Description: {cm:viVN}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('e')
|
||||||
Name: "languages\zhCN"; Description: {cm:zhCN}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('a')
|
Name: "languages\zhCN"; Description: {cm:zhCN}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('a')
|
||||||
Name: "languages\zhTW"; Description: {cm:zhTW}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('9')
|
Name: "languages\zhTW"; Description: {cm:zhTW}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('9')
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
// Do we have a regular user trying to install this?
|
// Do we have a regular user trying to install this?
|
||||||
function IsRegularUser(): Boolean;
|
function IsRegularUser(): Boolean;
|
||||||
|
@ -745,6 +751,19 @@ begin
|
||||||
Result := IsWindowsVersionOrNewer(10, 0);
|
Result := IsWindowsVersionOrNewer(10, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function IsWindows11OrNewer: Boolean;
|
||||||
|
var
|
||||||
|
WindowsVersion: TWindowsVersion;
|
||||||
|
begin
|
||||||
|
GetWindowsVersionEx(WindowsVersion);
|
||||||
|
Result := (WindowsVersion.Major >= 10) and (WindowsVersion.Build >= 22000);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function ShouldDisableSnippingTool: Boolean;
|
||||||
|
begin
|
||||||
|
Result := IsComponentSelected('disablesnippingtool');
|
||||||
|
end;
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\{#ExeName}.exe"; Description: "{cm:startgreenshot}"; Parameters: "{code:GetParamsForGS}"; WorkingDir: "{app}"; Flags: nowait postinstall runasoriginaluser
|
Filename: "{app}\{#ExeName}.exe"; Description: "{cm:startgreenshot}"; Parameters: "{code:GetParamsForGS}"; WorkingDir: "{app}"; Flags: nowait postinstall runasoriginaluser
|
||||||
Filename: "https://getgreenshot.org/thank-you/?language={language}&version={#Version}"; Flags: shellexec runasoriginaluser
|
Filename: "https://getgreenshot.org/thank-you/?language={language}&version={#Version}"; Flags: shellexec runasoriginaluser
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue