From 3f80aee2fc1d0a0e460fd187d103689469648aad Mon Sep 17 00:00:00 2001
From: Manuel Thalmann <m@nuth.ch>
Date: Thu, 27 Jul 2023 01:27:47 +0200
Subject: [PATCH] Add a start menu shortcut to RetroArch

---
 scripts/Windows/Software/RetroArch/Manage.ps1 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/Windows/Software/RetroArch/Manage.ps1 b/scripts/Windows/Software/RetroArch/Manage.ps1
index 8086a60c..f4087c4d 100644
--- a/scripts/Windows/Software/RetroArch/Manage.ps1
+++ b/scripts/Windows/Software/RetroArch/Manage.ps1
@@ -2,6 +2,8 @@
 . "$PSScriptRoot/../../Scripts/Context.ps1";
 
 $null = New-Module {
+    Import-Module "KnownFolders";
+    Import-Module "$env:ChocolateyInstall/lib/chocolatey/tools/chocolateyInstall/helpers/chocolateyInstaller.psm1";
     $path = "C:/tools/RetroArch-Win64";
     $softwareName = "RetroArch";
 
@@ -25,6 +27,9 @@ $null = New-Module {
 
         $context.AddNextcloudSync(
             "$path\system",
-            "/Saved Games/RetroArch/System")
+            "/Saved Games/RetroArch/System");
+
+        Write-Information "Creating a Start Menu Icon";
+        Install-ChocolateyShortcut -ShortcutFilePath "$((Get-KnownFolder -SpecialFolder CommonStartMenu).Path)/RetroArch.lnk" -TargetPath (Get-Command retroarch).Source;
     }
 }