Environment variables not working under Vista
Posted: Mon Oct 29, 2007 10:52 am
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
$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