Chris Moxon
2015-07-06 16:52:30 UTC
I have a msi that has its InstallScope set to "perMachine" and it creates a shortcut which is available to all the users:
<Directory Id="ProgramMenuFolder">
<Directory Id="CompanyShortcutsDir" Name="My Company" />
</Directory>
<Component Id="CMP_MainExeShortcut"
Directory="CompanyShortcutsDir"
Guid="{B857CD9E-XXXX-YYYY-F2090C50C985}">
<Shortcut Id="MyExeStartShortcut"
Name="My Product"
Description="$(var.WIX_PRODNAME)"
Target="[APPLICATIONFOLDER]MyApp.exe"
WorkingDirectory="APPLICATIONFOLDER"
Icon="my.ico" />
<RemoveFolder Id="RemoveCompanyShortcutsDir"
On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\MyCompany"
Name="MainExeShortcut"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
and the shortcut does indeed appear for all the users - so far so good !!
But I also have this fragment of code:
<Component Id="CMP_MainExeShortcutCompat"
Directory="CompanyShortcutsDir"
Guid="{C748B7C6-XXXX-YYYY-7CB1823774DC}">
<RegistryValue Root="HKMU"
Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
Name="[APPLICATIONFOLDER]MyApp.exe"
Type="string"
Value="~ WIN7RTM"
KeyPath="yes"/>
</Component>
who's purpose is to set the "Compatibility Mode" on the shortcut to be "Windows 7" - but this only happens for the user that installed our product, it doesn't get set on the shortcut for the other users who are likely to login to the PC.
Does anyone know how I can set this flag on the shortcut for all the users ?
Many Thanks,
Chris.
If you've received this email by mistake, we're sorry for bothering you. It may contain information that's confidential, so please delete it without sharing it. And if you let us know, we can try to stop it from happening again. Thank you.
We may monitor any emails sent or received by us, or on our behalf. If we do, this will be in line with relevant law and our own policies.
Eque2 Limited. Registered in England at Freetrade Exchange, 37 Peter Street, Manchester, M2 5GB. Registered number 08179642.
<Directory Id="ProgramMenuFolder">
<Directory Id="CompanyShortcutsDir" Name="My Company" />
</Directory>
<Component Id="CMP_MainExeShortcut"
Directory="CompanyShortcutsDir"
Guid="{B857CD9E-XXXX-YYYY-F2090C50C985}">
<Shortcut Id="MyExeStartShortcut"
Name="My Product"
Description="$(var.WIX_PRODNAME)"
Target="[APPLICATIONFOLDER]MyApp.exe"
WorkingDirectory="APPLICATIONFOLDER"
Icon="my.ico" />
<RemoveFolder Id="RemoveCompanyShortcutsDir"
On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\MyCompany"
Name="MainExeShortcut"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
and the shortcut does indeed appear for all the users - so far so good !!
But I also have this fragment of code:
<Component Id="CMP_MainExeShortcutCompat"
Directory="CompanyShortcutsDir"
Guid="{C748B7C6-XXXX-YYYY-7CB1823774DC}">
<RegistryValue Root="HKMU"
Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
Name="[APPLICATIONFOLDER]MyApp.exe"
Type="string"
Value="~ WIN7RTM"
KeyPath="yes"/>
</Component>
who's purpose is to set the "Compatibility Mode" on the shortcut to be "Windows 7" - but this only happens for the user that installed our product, it doesn't get set on the shortcut for the other users who are likely to login to the PC.
Does anyone know how I can set this flag on the shortcut for all the users ?
Many Thanks,
Chris.
If you've received this email by mistake, we're sorry for bothering you. It may contain information that's confidential, so please delete it without sharing it. And if you let us know, we can try to stop it from happening again. Thank you.
We may monitor any emails sent or received by us, or on our behalf. If we do, this will be in line with relevant law and our own policies.
Eque2 Limited. Registered in England at Freetrade Exchange, 37 Peter Street, Manchester, M2 5GB. Registered number 08179642.