0

I've got a UWP app with a VCD where I can get Cortana to recognise my test command (so working). However, I'd like to be able to tidy up all custom commands (ideally by identifying appname/command prefix and command, failing that by wiping an appname/command prefix completely, failing that wiping all custom commands).

Here's my working VCD:

<?xml version="1.0" encoding="utf-8" ?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2">
  <CommandSet xml:lang="en-gb" Name="VoiceDemoCommandSet_en-us">
        <AppName>Do</AppName>
        <Example>Placeholder</Example>

        <Command Name="Test">
            <Example>a test</Example>
            <ListenFor RequireAppName="BeforePhrase">a test</ListenFor>
            <Feedback>You've triggered the test command</Feedback>
            <Navigate />
        </Command>
  </CommandSet>
</VoiceCommands>

For example, how can I clear the registered "Do a Test" command?

frackham
  • 406
  • 4
  • 15
  • Have you checked this [document](https://learn.microsoft.com/en-us/cortana/voice-commands/dynamically-modify-voice-command-definition-vcd-phrase-lists)? – Nico Zhu Nov 24 '20 at 14:05
  • @NicoZhu-MSFT Yes, nothing in there about removing a previously registered command. This is about phrase lists (using parameterised listenfor/feedback values), but thank you for looking. – frackham Nov 24 '20 at 17:37
  • 1
    I'm afraid there is no such api could uninstall installed command file. – Nico Zhu Nov 25 '20 at 13:03
  • Fair enough - that sounds like the answer, if you post it I'll mark it as such. Thank you :) – frackham Nov 25 '20 at 23:52
  • Ok, I will post the answer below. – Nico Zhu Nov 26 '20 at 06:15

1 Answers1

1

How can I dynamically clear custom VCD commands from Cortana?

Derive from official document, VoiceCommandDefinitionManager only contains InstallCommandDefinitionsFromStorageFileAsync, and there is no such api could uninstall installed command file. I'm afraid you can't remove installed command file, if you do want this feature, please post your requirement with windows feed back hub app.

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36