Skip to content

Commit

Permalink
remove dependency on Registrar.exe to avoid AV FPs
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhngtu committed Oct 25, 2021
1 parent 2c19c3e commit e22c8c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 28 deletions.
4 changes: 0 additions & 4 deletions VietType.sln
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,9 @@ Global
{8882E9D2-7670-4906-98F5-60A147BF5ECA}.Release|x64.ActiveCfg = Release|x64
{8882E9D2-7670-4906-98F5-60A147BF5ECA}.Release|x64.Build.0 = Release|x64
{21FE5325-5162-4B68-9D65-397FC99D82B1}.Debug|Win32.ActiveCfg = Debug|Win32
{21FE5325-5162-4B68-9D65-397FC99D82B1}.Debug|Win32.Build.0 = Debug|Win32
{21FE5325-5162-4B68-9D65-397FC99D82B1}.Debug|x64.ActiveCfg = Debug|x64
{21FE5325-5162-4B68-9D65-397FC99D82B1}.Debug|x64.Build.0 = Debug|x64
{21FE5325-5162-4B68-9D65-397FC99D82B1}.Release|Win32.ActiveCfg = Release|Win32
{21FE5325-5162-4B68-9D65-397FC99D82B1}.Release|Win32.Build.0 = Release|Win32
{21FE5325-5162-4B68-9D65-397FC99D82B1}.Release|x64.ActiveCfg = Release|x64
{21FE5325-5162-4B68-9D65-397FC99D82B1}.Release|x64.Build.0 = Release|x64
{1139CE87-C648-4D3C-8F2A-61AB9D04C396}.Debug|Win32.ActiveCfg = Debug|x86
{1139CE87-C648-4D3C-8F2A-61AB9D04C396}.Debug|x64.ActiveCfg = Debug|x86
{1139CE87-C648-4D3C-8F2A-61AB9D04C396}.Release|Win32.ActiveCfg = Release|x86
Expand Down
28 changes: 12 additions & 16 deletions VietTypeSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ SPDX-License-Identifier: GPL-3.0-only
<Condition Message="32-bit setup can only run on a 32-bit OS.">Installed OR (NOT VersionNT64)</Condition>
<?endif ?>

<SetProperty Id="RegisterCategories" Value='"[#Registrar.exe]" 0 0' After="CostFinalize" Sequence="execute" />
<SetProperty Id="RegisterCategoriesRollback" Value='"[#Registrar.exe]" 1 0' After="CostFinalize" Sequence="execute" />
<SetProperty Id="UnregisterCategories" Value='"[#Registrar.exe]" 1 0' After="CostFinalize" Sequence="execute" />
<SetProperty Id="UnregisterCategoriesRollback" Value='"[#Registrar.exe]" 0 0' After="CostFinalize" Sequence="execute" />
<SetProperty Id="RegisterCategories" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunRegisterCategories' After="CostFinalize" Sequence="execute" />
<SetProperty Id="RegisterCategoriesRollback" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunUnregisterCategories' After="CostFinalize" Sequence="execute" />
<SetProperty Id="UnregisterCategories" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunUnregisterCategories' After="CostFinalize" Sequence="execute" />
<SetProperty Id="UnregisterCategoriesRollback" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunRegisterCategories' After="CostFinalize" Sequence="execute" />

<SetProperty Id="RegisterProfiles" Value='"[#Registrar.exe]" 0 1' After="CostFinalize" Sequence="execute" />
<SetProperty Id="RegisterProfilesRollback" Value='"[#Registrar.exe]" 1 1' After="CostFinalize" Sequence="execute" />
<SetProperty Id="UnregisterProfiles" Value='"[#Registrar.exe]" 1 1' After="CostFinalize" Sequence="execute" />
<SetProperty Id="UnregisterProfilesRollback" Value='"[#Registrar.exe]" 0 1' After="CostFinalize" Sequence="execute" />
<SetProperty Id="RegisterProfiles" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunRegisterProfiles' After="CostFinalize" Sequence="execute" />
<SetProperty Id="RegisterProfilesRollback" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunUnregisterProfiles' After="CostFinalize" Sequence="execute" />
<SetProperty Id="UnregisterProfiles" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunUnregisterProfiles' After="CostFinalize" Sequence="execute" />
<SetProperty Id="UnregisterProfilesRollback" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunRegisterProfiles' After="CostFinalize" Sequence="execute" />

<SetProperty Id="ActivateProfiles" Value='"[#Registrar.exe]" 0 2' After="CostFinalize" Sequence="execute" />
<SetProperty Id="DeactivateProfiles" Value='"[#Registrar.exe]" 1 2' After="CostFinalize" Sequence="execute" />
<SetProperty Id="ActivateProfiles" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunActivateProfiles' After="CostFinalize" Sequence="execute" />
<SetProperty Id="DeactivateProfiles" Value='"[%SystemRoot]\System32\rundll32.exe" "[#VietTypeATL32.dll]",RunDeactivateProfiles' After="CostFinalize" Sequence="execute" />

<InstallExecuteSequence>
<Custom Action="RegisterCategoriesRollback" After="InstallFiles">(NOT Installed) OR REINSTALL</Custom>
Expand Down Expand Up @@ -98,10 +98,6 @@ SPDX-License-Identifier: GPL-3.0-only
</Component>
<?endif ?>

<Component Win64="no" Directory="INSTALLFOLDER">
<File Id="Registrar.exe" Source="$(var.SolutionDir)\Win32\$(var.Configuration)\Registrar.exe" Name="Registrar.exe" />
</Component>

<Component Win64="no" Directory="INSTALLFOLDER">
<File Source="$(var.SolutionDir)\LICENSE" Name="LICENSE" />
</Component>
Expand All @@ -122,8 +118,8 @@ SPDX-License-Identifier: GPL-3.0-only
<Fragment>
<ComponentGroup Id="ShortcutComponents" Directory="ShortcutFolder">
<Component>
<Shortcut Id="ActivateShortcut" Name="Enable VietType" Target="[!Registrar.exe]" Arguments="0 2" WorkingDirectory="INSTALLFOLDER" />
<Shortcut Id="DeactivateShortcut" Name="Disable VietType" Target="[!Registrar.exe]" Arguments="1 2" WorkingDirectory="INSTALLFOLDER" />
<Shortcut Id="ActivateShortcut" Name="Enable VietType" Target="[%SystemRoot]\System32\rundll32.exe" Arguments='"[!VietTypeATL32.dll]",RunActivateProfiles' WorkingDirectory="INSTALLFOLDER" />
<Shortcut Id="DeactivateShortcut" Name="Disable VietType" Target="[%SystemRoot]\System32\rundll32.exe" Arguments='"[!VietTypeATL32.dll]",RunDeactivateProfiles' WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="CleanupShortcuts" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\VietType" Name="RegistrarShortcut" Type="integer" Value="1" KeyPath="yes" />
</Component>
Expand Down
8 changes: 0 additions & 8 deletions VietTypeSetup/VietTypeSetup.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\VietTypeRegistrar\VietTypeRegistrar.vcxproj">
<Name>VietTypeRegistrar</Name>
<Project>{21fe5325-5162-4b68-9d65-397fc99d82b1}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
Expand Down

0 comments on commit e22c8c4

Please sign in to comment.