我一直在试图想出一种方法来自动运行一系列托管在USB闪存驱动器上的HTML页面。这些都是静态页面,并且都链接到我的闪存驱动器根目录中的index.html。
我尝试这样设置一个autorun.inf文件:
[autorun]
open=index.html我也尝试过这个:
[autorun]
shellexecute=index.html我试过这个:
[autorun]
open=wscript.exe autorun.vbs其中autorun.vbs如下所示:
Call WScript.CreateObject("WScript.Shell").Run("index.html", 1)到目前为止,我还没有幸运地让应用程序显示在自动运行对话框上。我甚至有一个更健壮的autorun.inf,类似于这个:
[autorun]
shellexecute=index.html
label=Test Application
action=Start Test Application
shell\start=Start Application
shell\start\command=index.html
shell=start我在许多不同的配置中切换了各种shellexecute/open命令。然后,我在研究过程中偶然发现了一个页面,上面写着“Windows7不再支持闪存驱动器中的autorun.inf。”但我找不到关于这方面的其他信息。
有人有解决方案吗?我只想插入闪存驱动器,并在没有其他用户输入的情况下打开网页。如果我必须处理一个带有“显示页面”按钮的自动播放对话框,那也没问题。
编辑:我还尝试了这个链接:Windows Autorun for an HTML file,但它也不起作用。
发布于 2012-05-25 02:37:01
正如我在评论中所说,windows不再允许这样做。以下是之前的Stack Overflow文章:
Auto-Running a program from USB flash drive
还有另一个:
http://www.addictivetips.com/windows-tips/autorun-inf-does-not-work-in-windows-7-anymore/
要允许自动播放,请在此处编辑您的设置:
控制面板->所有控制面板项目->自动播放
发布于 2012-07-24 07:37:01
This link at Microsoft可能会解决您的问题。在链路腐烂的情况下,他们的解决方案复制如下:
我建议您使用下面提到的任何一种方法,并检查您是否能够将可移动驱动器的AutoPlay功能用作。
的值
您可以参考以下链接以获得进一步的帮助-
更改AutoPlay设置- http://windows.microsoft.com/en-US/windows7/Change-AutoPlay-settings
排除AutoPlay故障- http://windows.microsoft.com/en-US/windows7/Troubleshoot-AutoPlay-problems
祝好运!
https://stackoverflow.com/questions/10743322
复制相似问题