%SystemDrive% in Vista & Windows 7

Got a problem you cannot solve? Try here.
Post Reply
5aclockshadow
Posts: 63
Joined: Thu Feb 05, 2009 9:27 am
Location: NJ, USA

%SystemDrive% in Vista & Windows 7

Post 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.
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

Post by mills »

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

Re: %SystemDrive% in Vista & Windows 7

Post 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?
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

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

Re: %SystemDrive% in Vista & Windows 7

Post 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
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

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

Re: %SystemDrive% in Vista & Windows 7

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

Re: %SystemDrive% in Vista & Windows 7

Post by 5aclockshadow »

Any fix for this?
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

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

Re: %SystemDrive% in Vista & Windows 7

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

Re: %SystemDrive% in Vista & Windows 7

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

Re: %SystemDrive% in Vista & Windows 7

Post 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!
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: %SystemDrive% in Vista & Windows 7

Post by mills »

Just an FYI, this shouldn't be a problem in the latest release of InstallAware (9 R2 SP3).
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.
Post Reply