Importance of SetLocale in VB Script

I recently ran into an issue where a user complained that their network drives were not mapped when they login
after troubleshooting ; found the root cause was the login scrips fails to write koran time/date char’s to the log file and exit’s.
If the locale is not explicitly set to en-us (1033) it uses the locale from the user session and hence the problem.
Prevent issues like these from surfacing by initializing locale in your script.

	Dim english_lcid
	english_lcid =1033
	SetLocale(english_lcid)



Happy Coding...

Leave a comment

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux