Running items that require Elevated access in Windows 7

We just added a bunch of new agents to our cluster and they are Windows 7.  With Windows 7 there are limitations to what can be run in a standard command prompt or bat file.  Many things, like starting/stopping services for example, require running in an Elevated command prompt or Run As Administrator.  At the moment I am trying to get an agent maintenance build running which does a weekly defrag (c:\Windows\System32\Defrag.exe c: /v).

Has anyone found a way to run something from a TeamCity command line build which requires elevated access?



1 comment
Comment actions Permalink


You could disable User Access Control (UAC) in settings of Windows 7 for the user account under which agent is running.


Please sign in to leave a comment.