dongqixian8474 2015-10-03 09:42
浏览 109
已采纳

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

For a website I am developing I would like to open a windows GUI application from my webpage (PHP). 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:

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

  • 写回答

1条回答 默认 最新

  • duanchandun1860 2015-10-03 10:16
    关注

    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:

    <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.

    Here is the code behind the open in iTunes button of your example:

    <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.

    The application register that launch uri during the installation process or the first opening of the app.

    </div>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度