Fix shortcut string issues.

This commit is contained in:
Caelan Sayler
2023-12-31 22:37:48 +00:00
parent caf1e688b6
commit 877cfc49b0
2 changed files with 23 additions and 23 deletions

View File

@@ -14,6 +14,7 @@ using Velopack.Compression;
using Velopack.Packaging;
using Velopack.Packaging.Commands;
using Velopack.Packaging.Windows.Commands;
using Velopack.Windows;
namespace Velopack.Packaging.Tests;
@@ -279,6 +280,11 @@ public class WindowsPackTests
var shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Programs", id + ".lnk");
Assert.True(File.Exists(shortcutPath));
var lnk = new ShellLink(shortcutPath);
var currentPath = Path.Combine(tmpInstallDir, "current");
Assert.Equal(currentPath, lnk.WorkingDirectory);
Assert.Equal(appPath, lnk.Target);
// check registry exists
string installDate = null;
string uninstallRegSubKey = @"Software\Microsoft\Windows\CurrentVersion\Uninstall";