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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s