RSS

Weird problem with Windows environment variables at startup

16 Jul

Strange problem occured today with one of my Windows 2000 server, its a citrix server and had some issues with the database, so I tried to start and stop the IMA service and rebooted the server.

Upon reboot, it threw up one of the dreaded errors:

Application popup: ImaSrv.exe – Unable To Locate DLL : The dynamic link library BRAPI.dll could not be found in the specified path

Having an long path doesn’t help neither, but then the path is only 582 chars long… only half way to 1023 chars.

Its a strange error as all I did was to start stop a service and reboot the server, so there is no reasons why some of the dlls will go missing after that.

The problem was that Windows could not find the dlls located in C:\Program Files\Citrix\System32 when it starts up. Also the path variable contains environment variable %pf% which substitutes for c:\program files. That is, the string in the path variable is actaully %pf%\citrix\Sytem32. Now if we execute an echo on %pf% and %path%, all works fine. Somehow and suddenly, during the service startup time, Windows was not able to recognize or resolve the %pf% variable and hence, the dlls was not found.

Obviously, replacing the %pf% string with a literal string C:\program files seems to solve this probem upon next reboot. I have seen this problem before in NT but I am surprised to see this also in 2000. Also why Citrix is still depending on the path variable to start services is a mystery to me.

Weird…

Advertisements
 
Leave a comment

Posted by on July 16, 2006 in Windows

 

Tags: ,

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

 
%d bloggers like this: