Page 1 of 1
%SystemDrive% in Vista & Windows 7
Posted: Tue Jul 27, 2010 10:59 am
by 5aclockshadow
I have a setup that correctly resolves %SystemDrive%\inetpub\wwwroot to C:\inetpub\wwwroot for WinXP/2003 but not for Vista & Windows 7 ... it shows up in the setup as "%SystemDrive%\inetpub\wwwroot" for Vista & Windows 7.
I searched for a resolution to this issue...I found many posts but didn't see one definitive resolution.
How do I fix this for Vista & Windows 7 without breaking it for WinXP & 2003?
Thanks.
Re: %SystemDrive% in Vista & Windows 7
Posted: Wed Jul 28, 2010 10:57 pm
by mills
Wouldn't Get Common Folder command work for you?
Get Common Folder Location WWW->WWWRoot into wwwRootLoc
Re: %SystemDrive% in Vista & Windows 7
Posted: Thu Jul 29, 2010 4:51 pm
by 5aclockshadow
I'm pretty sure that's what it's doing by default:
Get Folder Location WWW->WWWRoot into WWWROOTDIR
Doesn't work for Vista or Win 7.
Is there a patch needed to fix this?
Re: %SystemDrive% in Vista & Windows 7
Posted: Sat Jul 31, 2010 1:14 am
by mills
The only time "Get Common Folder Location WWW->WWWRoot into wwwRoot" returns a blank result is if IIS hasn't bee installed.
Could you provide a snippet of the code you're using to produce your claim?
Re: %SystemDrive% in Vista & Windows 7
Posted: Thu Aug 26, 2010 7:28 am
by 5aclockshadow
Ok, here is the most basic web install:
http://www.allstarid.com/files/Troubles ... estWeb.zip
I tested in XP, Vista, & 7.
XP shows:
C:\inetpub\wwwroot\TestWeb
Whereas Vista & 7 show:
%SystemDrive%\inetpub\wwwroot\TestWeb
Re: %SystemDrive% in Vista & Windows 7
Posted: Fri Aug 27, 2010 12:23 am
by mills
Are you using "%SystemDrive%\inetpub\wwwroot\TestWeb" as the install directory?
What happens if you:
Go to Windows Start Menu
Run
Enter "%SystemDrive%"
Re: %SystemDrive% in Vista & Windows 7
Posted: Fri Aug 27, 2010 7:56 pm
by 5aclockshadow
mills wrote:Are you using "%SystemDrive%\inetpub\wwwroot\TestWeb" as the install directory?
What happens if you:
Go to Windows Start Menu
Run
Enter "%SystemDrive%"
Yes
And it brings me to my C:\ drive
Re: %SystemDrive% in Vista & Windows 7
Posted: Mon Aug 30, 2010 4:45 pm
by 5aclockshadow
Any fix for this?
Re: %SystemDrive% in Vista & Windows 7
Posted: Mon Aug 30, 2010 8:29 pm
by mills
I cannot reproduce this using your sample project or one I create myself.
You may need to utilize the MSIcode command Get Environment
Set Variable sysDrive to
Get Environment Variable %systemdrive% into Variable sysDrive
MessageBox: sysdrive, = $sysDrive$
Re: %SystemDrive% in Vista & Windows 7
Posted: Tue Aug 31, 2010 9:09 am
by 5aclockshadow
Ok, I will try that.
What version of InstallAware are you testing with?
And with yours you get C:\inetpub\wwwroot\TestWeb in XP, Vista, & Win 7???
Re: %SystemDrive% in Vista & Windows 7
Posted: Tue Aug 31, 2010 9:27 am
by 5aclockshadow
Ok, so that did correctly resolve to C: on both a 2003 and Win 7 box...but that still doesn't help me find the wwwroot directory.
I also tried checking the 'Get for all users (if applicable)' checkbox which changed this:
Get Folder Location WWW->WWWRoot into WWWROOTDIR
into this:
Get Common Folder Location WWW->WWWRoot into WWWROOTDIR
But that did not work.
Are you sure the 'Get Folder Location WWW->WWWRoot' wasn't changed in one of the newer versions of InstallAware when Vista or Win 7 was released?
Re: %SystemDrive% in Vista & Windows 7
Posted: Tue Aug 31, 2010 12:59 pm
by 5aclockshadow
It's a bit of a hack but I think I have it fixed:
if Variable WWWROOTDIR Contains (Ignore Case) %SystemDrive%
Replace %SystemDrive% with $sysDrive$ in variable WWWROOTDIR
end
Tested on 2003, Vista, & Win 7 where wwwroot's path was C:\inetpub\wwwroot and it worked.
Tested on a Vista box where wwwroot's path was D:\inetpub\wwwroot and it worked too.
I'm surprised more people haven't complained about this...
Thanks!
Re: %SystemDrive% in Vista & Windows 7
Posted: Tue Oct 12, 2010 5:30 pm
by mills
Just an FYI, this shouldn't be a problem in the latest release of InstallAware (9 R2 SP3).