开发者

Folders created with **SUBST cmd** not working on IIS 6

Folder开发者_JAVA技巧s 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


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...

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"S:"="\\??\\C:\\PortableUSB"

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


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜