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.
This topic is 4 years and 2 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
kaipowershell
Posts: 2
Last visit: Thu Mar 26, 2020 5:42 am

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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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
Last visit: Thu Mar 26, 2020 5:42 am

Re: Problem passing Arguments to Win10 Secondary Tile App

Post by kaipowershell »

Thanks, that works and is way easier than the Tile call!
This topic is 4 years and 2 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked