Autorun.inf 无法处理文件夹名称中带有空格的子文件夹?
我正在尝试使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
经过一些试验,我发现需要成对的双引号。 虽然听起来很奇怪。
打开=“文件夹名称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""
扩展 Sanjay 使用两组引号的答案,例如
如果您想要文件夹中的图标,则需要在整行周围放置一组引号。 例如
Expanding on from Sanjay's answer of using two sets of quotes, like
If you want your icon from the folder, you need to put a single set of quotes around the whole line. E.g.
我的无知猜测:使用引号。
My uninformed guess: use quotes.
除了按照 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".
这也适用:
编辑:适用于图标,不适用于打开命令......有点奇怪!
This also works:
edit: works for icon, NOT for open command...a bit strange!