Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to run iisstate in a mode that waits for a crash before dumping debugging information to a file. If I do this, though, I need to make sure it won't get stopped prematurely, as according to iisfaq.com, since it is invasive, stopping iisstate will stop the iis process it's attached to. I'm worried that if I run it under a remote desktop session, a coworker might log into the remote desktop session, and then log out rather than simply exit out of the remote desktop session, and inadvertently terminate the process.

If I were using linux, I would use screen, and detach it there. I think it would be less likely for someone to accidentally reattach to a screen session and then terminate it than it would for someone to log into a remote desktop session and then log out.

I could try running it under screen in cygwin, but does anyone know if there a way to run a command in a detached console session that's built into windows?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

A different take on this would be, why can someone else log into that remote desktop session?

Does someone else have that account password? Usually you want individual admin accounts for each person to provide a useful audit trail - so no one else should be able to take over that session (though of course, they could kill it).

A more pragmatic approach if you need it running for a while would be to 1) install it as a service or 2) run it as a scheduled task once. Both will run disconnected from any interactive session and hence not die when interactive sessions are logged off.

SrvAny helps creating a service out of normal applications and commands. Be wary of the user context you run it under though - if it needs specific access that the default service account doesn't have you need to change it.

share|improve this answer
1  
Thanks! I'm going to make sure I have my own individual admin account and start using that. –  Ben Atkin Aug 3 '09 at 23:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.