Is there a way to not allow shutting down of windows if people are logged in to the system?
UPDATE: The system I am running on is Windows 7 and it is a Workgroup
You haven't mentioned which version of windows you are using? There is an option to modify the Local Security Policy that prevents 'normal' users from shutting down workstations.
Depending on your environment, it may be possible to apply this either locally on each PC or for it to be delivered via a Group policy, if part of a Domain.
The option in question, if available in your environment, can be found by running secpol.msc and navigating to:
Local Polices/User Rights Assignment/Shutdown The system
And removing the Group 'Users'