Skip to content

Commit 588f6dd

Browse files
committed
Use Send To in Windows context menu (fixes #10)
1 parent 3f9634e commit 588f6dd

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "blackhole"
3-
version = "4.0.2"
3+
version = "4.1.0"
44
authors = ["William Venner <[email protected]>"]
55
edition = "2018"
66
repository = "https://github.com/WilliamVenner/blackhole"

wix/main.wxs

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,26 @@
3333
<Component Id='startup' Guid='*' Win64='$(var.Win64)'>
3434
<RegistryValue Root="HKCU" Key="Software\Microsoft\Windows\CurrentVersion\Run" Name="Blackhole" Value='"[APPLICATIONFOLDER]blackhole.exe" --purge' Type="string" KeyPath="yes" Action="write"/>
3535
</Component>
36-
37-
<Component Id='contextmenu' Guid='*' Win64='$(var.Win64)'>
38-
<RegistryValue Root="HKCR" Key="*\shell\Blackhole" Value='Blackhole' Type="string" KeyPath="yes" Action="write"/>
39-
<RegistryValue Root="HKCR" Key="*\shell\Blackhole" Name="Icon" Value='"[APPLICATIONFOLDER]blackhole.exe"' Type="string" KeyPath="no" Action="write"/>
40-
<RegistryValue Root="HKCR" Key="*\shell\Blackhole\command" Value='"[APPLICATIONFOLDER]blackhole.exe" --send "%1"' Type="string" KeyPath="no" Action="write"/>
41-
42-
<RegistryValue Root="HKCR" Key="Folder\shell\Blackhole" Value='Blackhole' Type="string" KeyPath="no" Action="write"/>
43-
<RegistryValue Root="HKCR" Key="Folder\shell\Blackhole" Name="Icon" Value='"[APPLICATIONFOLDER]blackhole.exe"' Type="string" KeyPath="no" Action="write"/>
44-
<RegistryValue Root="HKCR" Key="Folder\shell\Blackhole\command" Value='"[APPLICATIONFOLDER]blackhole.exe" --send "%1"' Type="string" KeyPath="no" Action="write"/>
45-
</Component>
4636
</Directory>
4737
</Directory>
38+
<Directory Id="SendToFolder" />
4839
</Directory>
4940

41+
<DirectoryRef Id="SendToFolder">
42+
<Component Id="ApplicationSendToShortcut" Guid="13FF38CE-787D-46A6-A2D3-06C7B5663A88">
43+
<Shortcut Id="ApplicationSendToShortcut"
44+
Name="Blackhole"
45+
Description="Sends the file or folder to your Blackhole"
46+
Target="[APPLICATIONFOLDER]blackhole.exe"
47+
Arguments="--send"
48+
WorkingDirectory="APPLICATIONFOLDER"
49+
Show="minimized"
50+
/>
51+
<RegistryValue Root="HKCU" Key="Software\Blackhole" Name="SendToInstalled" Type="integer" Value="1" KeyPath="yes"/>
52+
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
53+
</Component>
54+
</DirectoryRef>
55+
5056
<Feature Id='Binaries' Title='Application' Description='Installs all binaries and the license.' Level='1' ConfigurableDirectory='APPLICATIONFOLDER' AllowAdvertise='no' Display='expand' Absent='disallow'>
5157
<ComponentRef Id='License'/>
5258

@@ -57,8 +63,8 @@
5763
<ComponentRef Id='startup'/>
5864
</Feature>
5965

60-
<Feature Id='ContextMenuReg' Title='Add Blackhole to context menu' Description='Adds "Blackhole" option to the right click menu on files and folders, which moves them to the BLACKHOLE.' Level='1' AllowAdvertise='no' Display='expand' Absent='allow'>
61-
<ComponentRef Id='contextmenu'/>
66+
<Feature Id='ApplicationSendToShortcut' Title='Add Blackhole to "Send To"' Description='Adds "Blackhole" option to the "Send To" menu, which moves them to the BLACKHOLE.' Level='1' AllowAdvertise='no' Display='expand' Absent='allow'>
67+
<ComponentRef Id='ApplicationSendToShortcut'/>
6268
</Feature>
6369

6470
<SetProperty Id='ARPINSTALLLOCATION' Value='[APPLICATIONFOLDER]' After='CostFinalize'/>

0 commit comments

Comments
 (0)