There have been many posts about this, especially as regards Windows 8.
Search the forum for "hardwaresimulator.bat".
It seems to mostly come down to a few things.
1) Java is not installed.
2) Java did not add itself to the PATH variable when it was installed, you need to do this manually.
3) You need to run the hardwaresimulator.bat file as administrator.