cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JohnsonJi
Level 3

Can't find IISROOTFOLDER on Windows Server 2008 64bit

It's a web project which deploy website to IIS root. it works fine on Windows Server 2003, but while installing it on Windows Server 2008 (64bit), it always popup the error at the very beginning.
"Error 1606. Could not access network location {IISROOTFOLDER}".

Please help me on this.
Labels (1)
0 Kudos
(5) Replies
JohnsonJi
Level 3

Is there anybody meet such a problem before???
0 Kudos
DDevine
Level 2

I've seen this before.

The problem that I saw was that the IISRootFolder translates to
%SystemDrive%\inetpub\wwwroot\

Depending on how you use the path, the %SystemDrive% isn't always translated to the actual system drive value. I found I had to replace that directly in that string before I could use it as a target directory. The following inelegant function would fix the path so it could be used.

function STRING GetIISRootDirectory()
STRING szDefaultPath;
begin
szDefaultPath = IISROOTFOLDER; //this sets to wwwroot
StrReplace(szDefaultPath, "%SystemDrive%", WINDISK, 0);
StrReplace(szDefaultPath, "%SYSTEMDRIVE%", WINDISK, 0);

return szDefaultPath;

end;

Hope this helps.
0 Kudos
JohnsonJi
Level 3

Hi DDevine,

thanks for your help, you are right, the installer is check the value of HKLM\SOFTWARE\Wow6432Node\Microsoft\InetStp\PathWWWRoot in registery on 64bit OS.

the value of this entry is %SystemDrive%\inetpub\wwwroot\ . but my IIS Root Folder is under D driver. so it raise the error.
0 Kudos
JohnsonJi
Level 3

I think InstallShield should check this HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\PathWWWRoot not
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\InetStp\PathWWWRoot,

How can I make IISROOTFOLDER to read the value from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\PathWWWRoot at very beginning?
0 Kudos
DDevine
Level 2

On my 64 bit system, both those registry settings have the same value (%SystemDrive%\inetpub\wwwroot). The path to the IIS root folder is the same for 32 or 64 bit. So changing the registry that InstallShield reads from won't resolve your issue.

The issue is that %SystemRoot% isn't translated into the actual value of your system drive, which in your case is D:. So your install is currently trying to write to the literal value of "%SystemDrive%\inetpub\wwwroot\" rather than "D:\inetpub\wwwroot".

You need to convert the value you get from the registry to use the proper drive letter instead of the literal %SystemDrive%. The WINDISK system variable will return the value of your system drive (D:). If you replace the %SystemDrive% with this value it will give you the path you need.

To be able to target that for a component you would need to expose a Public Property (if you are using MSI) or a custom variable using FeatureSetTarget (for installscript) where this converted path string is stored.
0 Kudos