hi friends ,
is there is any code to find root directory off a system

What do you mean by 'root directory'?

You get most of the special directories with My.Computer.FileSystem.SpecialDirectories property. Environment.SystemDirectory property returns full path of the system directory. Environment.GetFolderPath(<SpecialFolder>) function returns also special folders.

Check those properties and the function. I'll think you'll find what you're looking for.