Skip to content

Commit

Permalink
Silently fail when making desktop shortcut (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Jul 22, 2023
1 parent 46e671e commit cefe7cd
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ private void CheckInstallMigration()

public static void CheckInstall()
{
App.Logger.WriteLine("[Bootstrapper::StartRoblox] Checking install");
App.Logger.WriteLine("[Bootstrapper::CheckInstall] Checking install");

// check if launch uri is set to our bootstrapper
// this doesn't go under register, so we check every launch
Expand Down Expand Up @@ -502,8 +502,16 @@ public static void CheckInstall()
{
if (!File.Exists(DesktopShortcutLocation))
{
ShellLink.Shortcut.CreateShortcut(Directories.Application, "", Directories.Application, 0)
.WriteToFile(DesktopShortcutLocation);
try
{
ShellLink.Shortcut.CreateShortcut(Directories.Application, "", Directories.Application, 0)
.WriteToFile(DesktopShortcutLocation);
}
catch (Exception ex)
{
App.Logger.WriteLine("[Bootstrapper::CheckInstall] Could not create desktop shortcut, aborting");
App.Logger.WriteLine($"[Bootstrapper::CheckInstall] {ex}");
}
}

// one-time toggle, set it back to false
Expand Down

0 comments on commit cefe7cd

Please sign in to comment.