使用 **SUBST cmd** 创建的文件夹在 IIS 6 上不起作用
使用 SUBST cmd 创建的文件夹不适用于 IIS 6。在 IIS 7(使用 Windows 7)中,为了设置虚拟目录的物理路径而浏览时,虚拟驱动器不会列出。
任何人都可以告诉我如何解决这个问题吗? 除了SUBST之外,还有其他更好的方法来创建虚拟驱动器吗?
Folders created with SUBST cmd not working on IIS 6. In IIS 7(with windows 7) the virtual drive is not listing when browsed inorder to set physical path for virtual directory.
Can any body tell me how to solve this problem?
Is there any better method to create a virtual drive other than SUBST
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从此:http://msdn.microsoft.com/en- us/library/aa363908%28v=VS.85%29.aspx
...看来您可以通过 win api 或可能直接在注册表中使用 DefineDosDevice 函数或方法全局实例化 subst。抱歉,我不知道这可能或可能不适用于 IIS,但它对我来说适用于 apache...
我的问题是尝试使用 subst 作为 apache 的文件夹,它需要以系统用户的身份查看挂载,或全局(所以 subst 不起作用)。您尝试进行替代的任何方式,即使使用诸如 RunAsSystem 之类的东西,也将无法产生可行的结果。
然而,我发现通过在注册表中创建 DosDevice,我有一个 apache/mysql/php-win 可以使用的可行的“subst”挂载。您还可以通过 wmi、vb、c+ 等找到执行此操作的方法,我不知道(我怀疑)注册表方法是否直接相同,但这里是...
示例,我想要: subst S: C:\PortableUSB
asA.reg 文件...
或者,在注册表中它看起来像这样(因此您可以通过这种方式手动添加它)...
字符串名称“S:”(不带引号。当然,请使用您首选的驱动器盘符)
该字符串的值为“\??\C:\PortableUSB”(不带引号。当然,请使用您自己的路径)
需要重新启动。该替代品是持久的并且在全球范围内可用。我还不知道它有多可靠,但到目前为止我正在成功使用它。
双鹰队
Following from this: http://msdn.microsoft.com/en-us/library/aa363908%28v=VS.85%29.aspx
...it seems you can instantiate a subst globally via either the win api or possibly directly in the registry using the DefineDosDevice function or method. Sorry, I do not know how this may or may not apply to IIS, but it is working for me with apache...
My problem was attempting to use subst for a folder for apache, which needs to see the mount as system user, or globally (so subst doesn't work). Any way you try to do a subst, even using something such as RunAsSystem, will fail to produce a viable result.
However, I found that by creating the DosDevice in the registry I have a viable 'subst' mount that apache/mysql/php-win can use. You can also find ways of doing it via wmi, vb, c+, etc, and I do not know if (I doubt) the registry method is directly the same, but here it is...
Example, I want: subst S: C:\PortableUSB
asA.reg file...
Or, in the registry it will look like this (so you can manually add it this way)...
A String Name of "S:" (without the quotes. Use your preferred DriveLetter, of course)
This String's Value is "\??\C:\PortableUSB" (without the quotes. Use your own path, of course)
Requires a restart. The subst is persistent and available globally. I do not yet know how reliable it is, but I am using it with success so far.
TwoHawks
在 Windows 7 中使用
subst
创建的驱动器仅可供创建它们的用户使用。 (并且可能仅在同一个进程链或会话中,但我不完全确定这一点。)所以让您的 IIS 用户进行替换。
Drives created with
subst
in Windows 7 are only available to the user that created them. (And possibly only in the same process chain or session, but I'm not entirely sure of that.)So have your IIS user do the substing.