fix(installer): use {autodesktop} for per-user desktop shortcut safety and fix IPersistFile 0x80070005 error
This commit is contained in:
parent
86e59f1e94
commit
3ac77180b4
9 changed files with 153 additions and 14 deletions
|
|
@ -62,4 +62,21 @@ public class DesktopGatewayDaemonCommandLineGateTests
|
|||
Assert.Equal(52101, config.BeaconUdpPort);
|
||||
Assert.True(config.AutoStartUdpBeacon);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate157_InstallerScript_MustUseAutoDesktop_And_MustNotContainCommonDesktop_ForPerUserSafety()
|
||||
{
|
||||
var installerPath = Path.Combine(SourceTree.Root, "build", "installer.iss");
|
||||
Assert.True(File.Exists(installerPath), "installer.iss must exist");
|
||||
|
||||
var content = File.ReadAllText(installerPath);
|
||||
|
||||
// Standard user (PrivilegesRequired=lowest) has no write permission to {commondesktop} (C:\Users\Public\Desktop).
|
||||
// Saving a shortcut to {commondesktop} throws IPersistFile::Save 0x80070005 (Access is Denied).
|
||||
// It must use {autodesktop} which resolves to {userdesktop} for standard users.
|
||||
Assert.DoesNotContain("{commondesktop}", content);
|
||||
Assert.Contains("{autodesktop}\\{#APP_NAME}", content);
|
||||
Assert.DoesNotContain("{commonprograms}", content);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue