Autorun.inf 无法处理文件夹名称中带有空格的子文件夹?

发布于 2024-07-14 10:16:02 字数 381 浏览 6 评论 0原文

我正在尝试使用 autorun.inf 在文件夹名称中包含空格的子文件夹下运行我的可执行文件。 像这样:

H:\
    autorun.inf
    FOLDER NAME 1
        file.exe
    FOLDER NAME 2
        some other stuffs

如果文件夹名称中没有空格,则效果很好。 但如果有的话,那对我来说就不起作用了。

这是限制吗? 或者我做错了什么?

我的自动运行.inf:

[autorun]
open=FOLDER NAME 1\Setup.exe
icon=FOLDER NAME 1\Setup.exe

I am trying to use an autorun.inf to run my executable file under a sub-folder with space in its folder name. Like this:

H:\
    autorun.inf
    FOLDER NAME 1
        file.exe
    FOLDER NAME 2
        some other stuffs

If there's no space in the folder name, it works well. But if there are some, it's not work for me.

Is this a restrict? or I am doing something wrong?

My autorun.inf:

[autorun]
open=FOLDER NAME 1\Setup.exe
icon=FOLDER NAME 1\Setup.exe

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

与酒说心事 2024-07-21 10:16:02

经过一些试验,我发现需要成对的双引号。 虽然听起来很奇怪。

打开=“文件夹名称1\Setup.exe”

With some trials I have found that pairs of double quotes are needed. Sounds strange though.

open=""FOLDER NAME 1\Setup.exe""

生生漫 2024-07-21 10:16:02

扩展 Sanjay 使用两组引号的答案,例如

open=""FOLDER NAME 1\Setup.exe""

如果您想要文件夹中的图标,则需要在整行周围放置一组引号。 例如

icon="FOLDER NAME 1\Setup.exe,0"

Expanding on from Sanjay's answer of using two sets of quotes, like

open=""FOLDER NAME 1\Setup.exe""

If you want your icon from the folder, you need to put a single set of quotes around the whole line. E.g.

icon="FOLDER NAME 1\Setup.exe,0"
有木有妳兜一样 2024-07-21 10:16:02

我的无知猜测:使用引号。

[autorun]
open="FOLDER NAME 1\Setup.exe"
icon="FOLDER NAME 1\Setup.exe"

My uninformed guess: use quotes.

[autorun]
open="FOLDER NAME 1\Setup.exe"
icon="FOLDER NAME 1\Setup.exe"
行至春深 2024-07-21 10:16:02

除了按照 Thomas 建议进行操作和使用引号之外,您还可以使用短/“DOS”样式名称。 这是名称的前 6 个字母,后跟波形符 (~),然后是数字。 因此“FOLDER NAME 1”通常会变成“FOLDER~1”。

In addition to doing as Thomas suggests and using quotes, you can also use the short/"DOS" style names. Which are the first 6 letters of the name followed by a tilde (~) and then a number. So "FOLDER NAME 1" would usually become "FOLDER~1".

城歌 2024-07-21 10:16:02

这也适用:

open=.\FOLDER NAME 1\Setup.exe

编辑:适用于图标,不适用于打开命令......有点奇怪!

This also works:

open=.\FOLDER NAME 1\Setup.exe

edit: works for icon, NOT for open command...a bit strange!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文