4

Fun Fact: It's physically impossible to run a .bat script on a remote Windows machine as admin from a Visual Studio post-build event.

Comments
  • 6
    Yes that is against general remotivity
  • 4
    One could use powershell to escalate priveledges on the remote machine and then run the bat file..........
  • 4
    @C0D4 Just wasted 5 hours trying to figure it out. I've tried almost everything including psexec, wmic and even a custom C# clien-server program, but nothing worked. At the end I almost went to check the battery in my CO detector because I started to think that I'm hallucinating.

    Ended up using a remote Invoke-Command form powershell which finally worked. Who would have thought that such a seemingly simple task will waste so many hours of productivity...
  • 2
    @SparkyTD C’est la vie.
  • 0
    Fortunately I don't have to deal with this crap anymore. Unfortunately I don't have access to my old scripts anymore. I think the clue was somewhere in both group policy and self signed cert rolled out to the clients. Think Desktop Central does something similar. Of course if you can install a service (your C# component) under localsystem you should be able to do whatever you want too.
  • 3
    Just about every fucking virus/malware out there can do this shit. Why TF cannot an admin?
Add Comment