raj2ras Posted April 4, 2013 Share Posted April 4, 2013 Discovered a strange issue on my network where (getenv "UserName") and (getenv "username") with just a change in case return 2 completely different values! (getenv "UserName") always returns same name on all machines! Can someone please test? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 4, 2013 Share Posted April 4, 2013 UserName, and username are two different Environment Variables... More on GetEnv function. Quote Link to comment Share on other sites More sharing options...
raj2ras Posted April 4, 2013 Author Share Posted April 4, 2013 But the %username% variable is set by the OS. At CMD prompt both echo %UserName% and echo %username% return the same value. Also the UserName variable is not explicitly set anywhere. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 4, 2013 Share Posted April 4, 2013 But the %username% variable is set by the OS. At CMD prompt both echo %UserName% and echo %username% return the same value. Also the UserName variable is not explicitly set anywhere. You've assumed that AutoCAD Environment Variable == Windows OS Environment Variable. Quote Link to comment Share on other sites More sharing options...
raj2ras Posted April 5, 2013 Author Share Posted April 5, 2013 Hmm...learnt the hard way. Had me going round in circles . Thank for the help Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 5, 2013 Share Posted April 5, 2013 You're welcome. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.