I have a Winforms application published using ClickOnce. I want users to be able to right-click a file in Windows Explorer and select "Send To → Crawler", which should then launch my ClickOnce app and pass the selected file path as an argument.
To do this, I created a shortcut in the SendTo folder that points to the ClickOnce .appref-ms file:
string sendToPath = Environment.GetFolderPath(Environment.SpecialFolder.SendTo);
string shortcutPath = Path.Combine(sendToPath, "Crawler.lnk");
string clickOnceAppPath = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.Programs),
"Crawler",
"Crawler.appref-ms"
);
CreateShortcut(shortcutPath, clickOnceAppPath);
The shortcut does get created, and double-clicking it directly works fine. However, it doesn't appear in the actual "Send To" context menu, or doesn't work as expected when a file is sent to it.
marc_s
760k186 gold badges1.4k silver badges1.5k bronze badges
asked Jun 23, 2025 at 14:41
Ibrahem Alhofe
311 silver badge4 bronze badges
default