开发者

Windows Autorun for an HTML file

开发者 https://www.devze.com 2023-01-01 02:35 出处:网络
I have a html file on a flash drive that I would like to autorun in Windows. I have found examples of multiple ways to do this but none of them are working for me. Anyone see what I am doing wrong?

I have a html file on a flash drive that I would like to autorun in Windows. I have found examples of multiple ways to do this but none of them are working for me. Anyone see what I am doing wrong?

This is my latest Attempt:

[autorun]

icon=data/favicon.ico

label=My Project

open=ShellRun.exe OPEN-ME.htm

This was another attempt:

[autorun]
icon=data/favicon.ico
label=My Project
shellexecute=OPEN-ME.html

shell\openme=Learn More About My Project
shell\openme\command=OPEN-ME.html

s开发者_StackOverflow社区hell=openme

Some of this is working, like the icon and the label. Just not the auto run.


You might try to use VBScript or JScript:

  • test.vbs (VBScript):

    Call WScript.CreateObject("WScript.Shell").Run("OPEN-ME.html", 1)
    
  • test.js (JScript):

    WScript.CreateObject("WScript.Shell").Run("OPEN-ME.html", 1)
    

Either way, it should do what you want as far as I'm aware.

Edit: By the way, ShellRun.exe is most likely a program bundled with a piece of software known as ShellRun rather than a built-in Windows command. The idea is that you can use the executable in your AutoRun file to launch an arbitrary file.

0

精彩评论

暂无评论...
验证码 换一张
取 消