I'm doing a check to verify that the ASP.NET 2.0 extension has been registered into IIS. I do this by checking for the existence of the folder
$WWWROOTDIR$aspnet_client\\system_web\\2_0_50727
$WWWROOTDIR$ was assigned from WWW->WWWRoot. This evaulates as %SystemDrive%\\inetpub\\wwwroot.
I then do the following code:
Replace %SystemDrive% with #SystemDrive# in variable WWWROOTDIR
On XP and 2003 the $SystemDrive# gets replaced with the actual system drive. On Vista it stays $SystemDrive# and the "Does Folder Exists" command fails. How can I get the variable to expand correctly under Vista?
thanks,
Chris Miller
VersaTrans Solutions, Inc
Environment variables not working under Vista
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
Environment variables not working under Vista
Last edited by Chris Miller on Tue Oct 30, 2007 9:18 am, edited 1 time in total.
Sorry,
What' exactly is $SystemDrive# ? It was supposed to be $SystemDrive$ ? It can't be working on XP or 2003 but not on Vista, because that specific command has nothing to do with the OS. It's a simple String Replace command.
What' exactly is $SystemDrive# ? It was supposed to be $SystemDrive$ ? It can't be working on XP or 2003 but not on Vista, because that specific command has nothing to do with the OS. It's a simple String Replace command.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
-
Chris Miller
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
That was a typo in my message posting. It should have read
Replace %SystemDrive% with #SystemDrive# in variable WWWROOTDIR
I was given that syntax in another thread.
After the Replace command executes, if I display that value ($WWWROOTDIR$) with the MessageBox command I get the correct value in XP and 2003 and the wrong value in Vista
XP/2003 displays c:\\inetpub\\wwwroot
Vista displays #SystemDrive#\\inetpub\\wwwroot
I can easily reproduce this problem in a new project that pretty much does notning but do the variable replacement and then displays the variable. I can attach the .mia/.mpr files in another message if that would help.
Replace %SystemDrive% with #SystemDrive# in variable WWWROOTDIR
I was given that syntax in another thread.
After the Replace command executes, if I display that value ($WWWROOTDIR$) with the MessageBox command I get the correct value in XP and 2003 and the wrong value in Vista
XP/2003 displays c:\\inetpub\\wwwroot
Vista displays #SystemDrive#\\inetpub\\wwwroot
I can easily reproduce this problem in a new project that pretty much does notning but do the variable replacement and then displays the variable. I can attach the .mia/.mpr files in another message if that would help.

