Расписание выключения, когда Visual Studio завершает создание проекта

499
Tab

Я использовал планировщик задач для завершения работы через определенное время, но я хочу знать, как создать задачу в windown 7, чтобы она выключала систему, когда Visual Studio завершит сборку проекта.

1

1 ответ на вопрос

0
Ted Cohen

I believe that the best place to do that is in visual Studio, not in task scheduler. I could tell you how to do it with task scheduler, but it would be a real hack.

There are two ways to do it with Visual Studio. One is to use Visual Studio to create a "makefile" to do your build, then edit the make file and add "shutdown.exe" with appropriate options as the last step. Then run the makefile when ever you want to build and shut down.

The other option is to use visual studio to add a "custom build step" to your build. You will specify shutdown.exe as the program to run in the custom step and you will define where in the build that it should run (last step) and under what conditions it should run; perhaps unconditionally, perhaps only if the build was successful.

Which method you choose is entirely up to you. VS advocates make the case that VS build gives you much more flexibility than makefiles.