How do you detect the home drive(where windows is installed)

Use the Environ function searching for the "SystemDrive". (see this)
Also you can use the System.Environment.SystemDirectory to get the full path (see there)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.