在我们的项目中,我们将删除注册表项,以使非管理员用户能够安装它。
我们当前的代码如下,我试图从XML文件中注释掉该部分但是失败了。
我们是否有可能在没有注册表项的情况下创建shotcut?感谢。
<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>
答案 0 :(得分:0)
HKCU是每用户输入,这不应干扰您实现每用户安装的目标。您可以使用http://blogs.msdn.com/b/rflaming/archive/2006/09/30/778690.aspx为每个用户创建一个可安装程序包。
要回答您的问题,我尝试了没有注册表值的安装。程序被允许构建(出现ICE38 / ICE41错误),我能够看到安装MSI后的链接