Thursday, February 11, 2010

What if a directory named "C:\Program" exists?


Assumption: Windows operating system is installed on C:\
Say, on a windows machine, there is a directory called C:\Program.
- Will it have any effect?
YES.
- What are those?
It may disrupt many of the badly designed applications running on your system. [Even though the mistake is done by the ones who programmed those, as they are currently running on your system, you are the sufferer. Welcome to S/W Industry :) ]
- Is there a simple example to show it?
Here it is:












As u can see above, dir command has got confused with the C:\Program directory.
In similar way, if some Programmer has not used the quotes(") properly, then, that's it, it will behave strangely and may do anything on ur system.
So , best thing is to immediately rename or delete such directory "%SystemDrive%\Program"


As, u can see below, once that troublesome directory is gone, dir is behaving normally again :)

 














Happy Weekend :)
Cheers
Santhosh

No comments:

Post a Comment