By submitting your personal information, you agree to receive emails regarding relevant products and special offers from TechTarget and its partners. You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.

I have read all about the environmental variables such as %homepath% and %username%. Can either of these variables be used in a login script (.bat) file? I have tried every possible combination. If it can be done, what is the syntax? The profiles tab in the ADS for users has the homepath as serverdiruser. Obviously I am trying to map a drive letter to serverdiruser, where each user is unique.
It all depends on what user context the batch file runs in. If the batch file is kicked off in the LOCAL_SYSTEM account, those environment variables won't be defined. However, if the batch file is started from the user's account, simply specify them like SERVER%USERNAME%.

0 comments

E-Mail

Username / Password

Password

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy