Launch a desktop shortcut. Specifically Netflix app on windows 10
-
Im trying to create a command to launch Netflix on win10. its only installable as an app from the windows app store. The folder the app is in is a hidden one and i cannot open it. I found a way to make a link to the app on the desktop but cant get the bat file to work. This is my bat:
f "%1"=="on" "c:\users\Tom\Desktop\Netflix.lnk"
if "%1"=="off" taskkill /im netflix.appI dont think thats right.. any idea on the proper way to launch an app or how to get the actual launch to work. If i look in properties from the shortcut as to the location i dont get the full location and there is no .exe or anything.
Any help on this would be great and i suspect help anyone making a link to any of these windows apps..
-
@Neflhiem , it looks like you're making a SmartThings switch for this. I like the idea.
I found that this command starts the Windows Store version of Netflix:
start netflix:
I also found that this command stops it:
taskkill /f /im wwahost.exe
Here's how people can find the name of the Windows Store app (like netflix) to put after start and before :
-
Open a PowerShell window
-
Search for the app you want to launch like this:
Get-AppxPackage | where {$_.name -ilike "*netflix*"}
-
You should see output like this:
Name : 4DF9E0F8.Netflix Publisher : CN=52120C15-ACFA-47FC-A7E3-4974DBA79445 Architecture : X64 ResourceId : Version : 6.44.212.0 PackageFullName : 4DF9E0F8.Netflix_6.44.212.0_x64__mcm4njqhnhss8 InstallLocation : C:\Program Files\WindowsApps\4DF9E0F8.Netflix_6.44.212.0_x64__mcm4njqhnhss8 IsFramework : False PackageFamilyName : 4DF9E0F8.Netflix_mcm4njqhnhss8 PublisherId : mcm4njqhnhss8 IsResourcePackage : False IsBundle : False IsDevelopmentMode : False IsPartiallyStaged : False
-
You're only interested in the InstallLocation value. Open that folder in Windows Explorer.
-
Now open the AppxManifest.xml file. Scroll down until you see a section like this:
<Extensions> <uap:Extension Category="windows.search" /> <uap:Extension Category="windows.protocol"> <uap:Protocol Name="netflix" />
That protocol name value is what you need to start the app with a command like "start netflix:"
Here's how I found the name of the task to kill (wwahost.exe in this case):
- Open Task Manager
- Right-click Netflix (under Processes tab)
- Click Go to details
EDIT: There's an easier and more consistent method for creating a command that runs a Windows Store app here.
-
-
@Russ awesome thanks!
-
Hi,
I know i am too late for the party but a workaround for someone that might be struggling with this, is to create a .vbs file.
Open notepad and paste:
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys("^{Esc}")
WScript.Sleep(1000)
WshShell.SendKeys("netflix")
WScript.Sleep(100)
WshShell.SendKeys "{ENTER}"Feel free to replace any app downloaded from Microsoft store (and of course you can find it by just searching).
Then save as -> script_name.vbs
Save as type: All FilesAnd you are done. Watch your computer take over!!!! Terminator style
-