Skip to content

Commit

Permalink
Add package parameter to remove desktop icon
Browse files Browse the repository at this point in the history
  • Loading branch information
flcdrg committed Sep 18, 2024
1 parent dc911e5 commit b5268bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dell-command-configure/dell-command-configure.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>dell-command-configure</id>
<version>4.12.0</version>
<version>4.12.0.20240918</version>
<packageSourceUrl>https://github.com/flcdrg/au-packages/tree/master/dell-command-configure</packageSourceUrl>
<owners>flcdrg</owners>
<title>Dell Command | Configure (Install)</title>
Expand All @@ -25,6 +25,12 @@ Dell Command | Configure supports the following Windows operating systems:
- Windows 10
- Windows Preinstallation Environment (Windows PE)

#### Package parameters

- '/RemoveDesktopShortcut' - Remove the desktop shortcut

Example: `choco install dell-command-configure --params="'/RemoveDesktopShortcut'"`

#### Package updates

There is not currently automatic updates for this package. Either leave a comment below, use the 'Contact Maintainer' link, or create an issue in the package source GitHub repository to notify the maintainer of new versions.
Expand Down
8 changes: 8 additions & 0 deletions dell-command-configure/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ $packageArgs = @{
}

Install-ChocolateyPackage @packageArgs

# Remove desktop shortcut (unfortunately there is no way to disable desktop icon in installer)
$pp = Get-PackageParameters

if ($pp['RemoveDesktopShortcut']) {
$sharedDesktop = [System.Environment]::GetFolderPath([Environment+SpecialFolder]::CommonDesktopDirectory)
Remove-Item "$sharedDesktop\Dell Command Configure Wizard.lnk" -Force -ErrorAction SilentlyContinue
}

0 comments on commit b5268bd

Please sign in to comment.