%SystemDrive% in Vista & Windows 7

Got a problem you cannot solve? Try here.

%SystemDrive% in Vista & Windows 7

Postby 5aclockshadow » Tue Jul 27, 2010 10:59 am

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.
5aclockshadow
 
Posts: 27
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA

Re: %SystemDrive% in Vista & Windows 7

Postby mills » Wed Jul 28, 2010 10:57 pm

Wouldn't Get Common Folder command work for you?

Get Common Folder Location WWW->WWWRoot into wwwRootLoc
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
mills
 
Posts: 286
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

Postby 5aclockshadow » Thu Jul 29, 2010 4:51 pm

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?
5aclockshadow
 
Posts: 27
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA

Re: %SystemDrive% in Vista & Windows 7

Postby mills » Sat Jul 31, 2010 1:14 am

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?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
mills
 
Posts: 286
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

Postby 5aclockshadow » Thu Aug 26, 2010 7:28 am

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
5aclockshadow
 
Posts: 27
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA

Re: %SystemDrive% in Vista & Windows 7

Postby mills » Fri Aug 27, 2010 12:23 am

Are you using "%SystemDrive%\inetpub\wwwroot\TestWeb" as the install directory?

What happens if you:
Go to Windows Start Menu
Run
Enter "%SystemDrive%"
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
mills
 
Posts: 286
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

Postby 5aclockshadow » Fri Aug 27, 2010 7:56 pm

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
5aclockshadow
 
Posts: 27
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA

Re: %SystemDrive% in Vista & Windows 7

Postby 5aclockshadow » Mon Aug 30, 2010 4:45 pm

Any fix for this?
5aclockshadow
 
Posts: 27
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA

Re: %SystemDrive% in Vista & Windows 7

Postby mills » Mon Aug 30, 2010 8:29 pm

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$
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
mills
 
Posts: 286
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

Postby 5aclockshadow » Tue Aug 31, 2010 9:09 am

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???
5aclockshadow
 
Posts: 27
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA

Re: %SystemDrive% in Vista & Windows 7

Postby 5aclockshadow » Tue Aug 31, 2010 9:27 am

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?
5aclockshadow
 
Posts: 27
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA

Re: %SystemDrive% in Vista & Windows 7

Postby 5aclockshadow » Tue Aug 31, 2010 12:59 pm

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!
5aclockshadow
 
Posts: 27
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests