简体   繁体   English

如何从“ iTunes中查看”之类的浏览器启动Windows应用程序?

[英]How to start a windows application from browser like “View in iTunes”?

For a website I am developing I would like to open a windows GUI application from my webpage (PHP). 对于我正在开发的网站,我想从我的网页(PHP)打开Windows GUI应用程序。 How do I do that? 我怎么做?

The behavior I am looking for is similar to that of the "View in iTunes" button in the below page: 我正在寻找的行为类似于下一页中的“在iTunes中查看”按钮的行为:

https://itunes.apple.com/us/artist/katy-perry/id64387566 https://itunes.apple.com/cn/artist/katy-perry/id64387566

You need to get the specific link which can open the application and pass parameters. 您需要获取可以打开应用程序并传递参数的特定链接。 For example make a button on your page and nest a hyperlink inside: I found this example on the windows 10 store page of microsoft which opens a specific app of the windows 10 store: 例如,在页面上创建一个按钮并在其中嵌套超链接:我在Microsoft的Windows 10商店页面上找到了此示例,该页面打开了Windows 10商店的特定应用程序:

 <a href="ms-windows-store://pdp/?productid=9WZDNCRFJ3T0&amp;referrer=unistoreweb&amp;muid=02722FE11F4B6C76309627D4194B6C5F&amp;websession=9f8f1a7d976e4a2485c950e5339443ad" class="srv_purchaseButton btn btn-primary" data-bi-name="GetAppFromNativeClientStore" data-bi-id="9WZDNCRFJ3T0" data-bi-source="DisplayCatalog"> App abrufen </a> 

The developers of the apps nearly always publish the links and parameters you can use to open the app. 应用程序的开发人员几乎总是发布可用于打开应用程序的链接和参数。 You can see that for example the parameter productid and so on get passed so the store "knows" which page it needs to show to the user. 您可以看到例如传递了参数productid等,因此商店“知道”它需要显示给用户的页面。

Here is the code behind the open in iTunes button of your example: 这是示例中在iTunes中打开按钮背后的代码:

 <a onclick="return its.detect.openItunes('https://itunes.apple.com/us/artist/katy-perry/id64387566');" href="#" class="action view-in-itunes"><span>View In iTunes</span></a> 

This iTunes link checks if your computer has itunes installed and if yes it opens the application and if not it redirects you to download itunes first for your pc. 这个iTunes链接检查您的计算机是否安装了iTunes,如果是,它将打开应用程序,否则,它将重定向您首先为您的PC下载iTunes。

The application register that launch uri during the installation process or the first opening of the app. 该应用程序会在安装过程或应用程序的首次打开过程中注册启动uri的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从浏览器打开 windows 应用程序 - How to open windows application from Browser 在Java应用程序中嵌入和与视图之类的浏览器进行交互 - embedding and interacting with a browser like view in a Java application 将下载文件从浏览器应用程序拖放到 windows 应用程序上,例如 Outlook、打印机队列 - Drag and drop download file from browser application onto windows application like Outlook, printer queue 如何在 Windows 和 macOS 上从 Web 浏览器启动应用程序? - How to launch application from web browser on Windows and macOS? 如何在浏览器窗口中从Javascript Windows Universal应用程序打开URL? - How open a url from a Javascript Windows Universal application in a browser window? 从浏览器像打印视图形式? - Print view form like from browser? 如何在TideSdk应用程序中从窗口中删除类似于窗口的边框? - How to remove windows-like border from window in TideSdk application? 如何从浏览器启动外部应用程序,如 Telegram url 链接? - How do I launch an external application from the browser like Telegram url links? 如何在Windows上连接到iTunes COM? - How do I connect to the iTunes COM on windows? 如何从浏览器与桌面应用程序通信? - how to communicate with a desktop application from browser?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM