Skip to content

Commit

Permalink
Move Shortcuts to their own folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl committed Dec 15, 2021
1 parent ca38b3f commit 28c25b1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions MSEdgeRedirect.au3
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,16 @@ Func RunInstall(ByRef $aConfig, ByRef $aSettings)
Switch $aSettings[$sStartMenu]

Case "Full"
FileCreateShortcut(@LocalAppDataDir & "\MSEdgeRedirect\MSEdgeRedirect.exe", @AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect - Settings.lnk", @LocalAppDataDir & "\MSEdgeRedirect\", "/change")
DirCreate(@AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect")
FileCreateShortcut(@LocalAppDataDir & "\MSEdgeRedirect\MSEdgeRedirect.exe", @AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect\Settings.lnk", @LocalAppDataDir & "\MSEdgeRedirect\", "/change")
ContinueCase

Case "App Only"
FileCreateShortcut(@LocalAppDataDir & "\MSEdgeRedirect\MSEdgeRedirect.exe", @AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect.lnk", @LocalAppDataDir & "\MSEdgeRedirect\", $sArgs)
DirCreate(@AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect")
FileCreateShortcut(@LocalAppDataDir & "\MSEdgeRedirect\MSEdgeRedirect.exe", @AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect\MSEdgeRedirect.lnk", @LocalAppDataDir & "\MSEdgeRedirect\", $sArgs)

Case Else
;;;

EndSwitch
EndIf
Expand Down Expand Up @@ -419,8 +422,7 @@ Func RunRemoval($bUpdate = False)
RegDelete($sHive & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MSEdgeRedirect")

FileDelete(@StartupDir & "\MSEdgeRedirect.lnk")
FileDelete(@AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect.lnk")
FileDelete(@AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect - Settings.lnk")
DirRemove(@AppDataDir & "\Microsoft\Windows\Start Menu\Programs\MSEdgeRedirect", $DIR_REMOVE)

If IsAdmin() Then
For $iLoop = 1 To $aEdges[0] Step 1
Expand Down

0 comments on commit 28c25b1

Please sign in to comment.