How to install and run SIlverlight application through AppleScript?

倖福魔咒の 提交于 2019-12-12 01:23:14

问题


I have a Silverlight application ("file1.xap" - not ".app" it is ".xap"). How do I install and run it using AppleScript on MAC OS X?


回答1:


Besides the fact that your applet probably won't have permissions to install anything on Mac OS X 10.7 and later, you should be able to just copy the application package from any location to the applications folder:

tell application "Finder"
    copy file "Your Application Name.app" of disk "Your Application Name" to the application folder of the startup disk
    open file "TextEdit.app" of the application folder of the startup disk
end tell

If this doesn't work for you, then you need to explain more.




回答2:


You need to make sure that .xap file is Out-Of-Browser enabled (I suspect it is). Then instead of running the .xap file directly, open the .xap in a browser and right click it to "Install" the .xap file. Silverlight will then download a .app file that you can run on OSX.



来源:https://stackoverflow.com/questions/17757296/how-to-install-and-run-silverlight-application-through-applescript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!