Problem passing Arguments to Win10 Secondary Tile App

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
kaipowershell
Posts: 2
Joined: Wed Mar 25, 2020 6:26 pm

Problem passing Arguments to Win10 Secondary Tile App

Post by kaipowershell »

I am trying to open the Win10 bluetooth configuration page via PowerShell shortcut.

In a nutshell:

start-process -FilePath "shell:appsFolder\windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" -ArgumentList "Page=SettingsPageDevices"

does open the device settings, but the argument to navigate to the Bluetooth Devices is not taken, as it does from Window's native function (clicking the tile directly opens the Bluetooth devices page).

Background: I exported the tile settings using:
Export-StartLayout -UseDesktopApplicationID -Path m:\layout.xml
That gave me:
<start:SecondaryTile AppUserModelID="windows.immersivecontrolpanelcw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" TileID="SystemSettingsL2_SettingsPageDevices" DisplayName="" [...] Arguments="page=SettingsPageDevices" [...] />

When I call the above to start it in the same way, I am not getting to the arguments being applied. I tried many different notations for the args instead of the a=b format eg. "--a b", "-a b", "/a b", "/a:b", "a b", "a:b" "a,b", but nothing works, it always ends the call without applying the arguments.

Thanks for any help.

jvierra
Posts: 14456
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Problem passing Arguments to Win10 Secondary Tile App

Post by jvierra »

This is the easiest way to open "Bluetooth Devices"

Start-Process 'shell:::{28803F59-3A75-4058-995F-4EE5503B023C}'

jvierra
Posts: 14456
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Problem passing Arguments to Win10 Secondary Tile App

Post by jvierra »

If you want the Windows 10 settings page for that:

Start-Process 'ms-settings:bluetooth'

kaipowershell
Posts: 2
Joined: Wed Mar 25, 2020 6:26 pm

Re: Problem passing Arguments to Win10 Secondary Tile App

Post by kaipowershell »

Thanks, that works and is way easier than the Tile call!

Locked