How to test if server is running Windows 7?
Hi, we have application that tests if a server is Windows 7. We currently do it by seeing if the following directory exists or not using the command below:
File f = new File(String.format("\\\\%s\\C$\\windows\\system32\ \tasks", hostName));
However, whenever this line runs, we get an exception saying the file can't be found. The file however can be accessed through Windows Explorer using command \\hostName\C$\windows\system32\tasks\
We all have local admin rights on the Windows 7 server machine as well.
So I'm wondering if there is a way to fix this issue or is there a better way to see if the server is running Windows 7 or not?