Unable to resolve user environment variable correcttly

SaVita

New Member
I am trying to resolve \[code\]%USERPROFILE%\[/code\] using WScript.Shell. When I create a vbs file and run directly from Windows, I get the correct path for the logged-in user \[code\]("C:\Documents and Settings\Administrator")\[/code\] but it gets resolved to \[code\]"C:\Documents and Settings\Default User"\[/code\] instead of logged-in user when I used it inside my classic-asp webapp running on the local machine on IIS. The code I used is as below\[code\]var oShell = new ActiveXObject("Wscript.Shell");var userPath = oShell.ExpandEnvironmentStrings("%USERPROFILE%");\[/code\]Is there a permission/setting which I need to check to get correct value of USERPROFILE when retrieving value from the webapp?PS: I am using javascript to code.
 
Back
Top