简体   繁体   English

如何使应用程序在Mac上自动运行?

[英]How to make application autorun on Mac?

I want to make my application autorun, like using autorun.inf on Windows. 我想使我的应用程序自动运行,就像在Windows上使用autorun.inf一样。 I googled and there is one way for me to do that: "On the Mac side there are many applications you can buy for creating a Finder window that looks a certain way but all these changes can be made within finder. You then will need to copy the DS_Store file to the CD and finder will automatically apply any changes that you have made. 我用谷歌搜索,有一种方法可以做到这一点:“在Mac上,您可以购买许多应用程序来创建看起来像某种方式的Finder窗口,但是所有这些更改都可以在finder中进行。然后,您需要将DS_Store文件复制到CD,Finder会自动应用所做的任何更改。

Also using -hfs-openfolder will cause it to open automatically when inserted on the mac." 同样,使用-hfs-openfolder会使它在Mac上插入时自动打开。”

Can anyone tell me more clearly about that, or is there any other way? 谁能更清楚地告诉我这件事,还是有其他办法吗? Thanks so much. 非常感谢。

According to this page , you should be able to do that with bless : 根据这个页面 ,你应该能够做到这一点与bless

sudo bless --folder "/Volumes/discName" --openfolder "/Volumes/discName"

The man page confirms that, at least on 10.6.8. 手册页至少在10.6.8上对此进行了确认。 I don't have Lion in front of me right now. 我现在没有狮子在我面前。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM