在我们的项目中,我们将删除注册表项以使非管理员用户能够安装它。
我们当前的代码如下,我试图从 XML 文件中注释掉该部分,但失败了。
有没有机会我们可以在没有注册表项的情况下创建快照?谢谢。
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="C85221B1-70CA-455D-B322-093543BD4DF0">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="$(var.ProductName)"
Description="$(var.ProductDescription)"
Target="[APPLICATIONROOTDIRECTORY]OMOffline.exe"
WorkingDirectory="APPLICATIONROOTDIRECTORY" />
<Shortcut Id="RemoteAssistance"
Name="Request Remote Assistance"
Description="Starts Remote Assistance and creates a password-protected RA ticket that is attached to a new Remote Assistance invitation. The User must enter the e-mail address of the Helper in the To field to send the message to the Helper."
Target="[SystemFolder]MSRA.exe"
Arguments="/email"/>
<Shortcut Id="UninstallProduct"
Name="Uninstall $(var.ProductName)"
Target="[SystemFolder]msiexec.exe"
Arguments="/x [ProductCode] SQLSERVER="[SQLSERVER]""
Description="Uninstalls $(var.ProductName)" />
<RemoveFolder Id="RemoveApplicationProgramsFolder"
Directory="ApplicationProgramsFolder"
On="uninstall"/>
<!--<RegistryValue Root="HKCU" Key="Software\$(var.ProductManufacturer)\$(var.ProductName)" Name="shortcutsinstalled" Type="integer" Value="1" KeyPath="yes"/>-->
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="DesktopShortcut" Guid="C03900DF-FFD8-44B8-AA42-1BC72BB9E1F4">
<Shortcut Id="ApplicationDesktopShortcut"
Name="$(var.ProductName)"
Description="$(var.ProductDescription)"
Target="[APPLICATIONROOTDIRECTORY]OMOffline.exe"
WorkingDirectory="APPLICATIONROOTDIRECTORY" />
<!--<RegistryValue Root="HKCU" Key="Software\$(var.ProductManufacturer)\$(var.ProductName)" Name="desktopshortcutinstalled" Type="integer" Value="1" KeyPath="yes"/>-->
</Component>
</DirectoryRef>