0

I have a Windows installer script for a Windows application I'm delivering to customers. I want to have the application installed as a Windows service.

I've been reading up on various ways to do this. The closest I've found that can do this from a command is sc.exe as described in Create windows service from executable here at Stackoverflow, but this command requires running it as administrator, which as far as I can tell, also requires submitting an administrator's password.

In my build script, there's no way to right-click and "run as administrator".

Is there any way to do this from a build script (I'm using my company's installation packager to do this, which uses Ant-like XML build files with an command and statements -- so, much like running at the Windows command line). If I could figure out a command-line implementation that my customers can use I could give them this package.

Thanks for any tips. Scott

Community
  • 1
  • 1
slugger415
  • 361
  • 1
  • 3
  • 11
  • 1
    You can't install a service without administrator privileges. But that's true for most installation tasks, so the build script probably already runs as administrator - if it didn't, it wouldn't be much use. – Harry Johnston Jul 14 '15 at 23:08
  • makes sense Harry, thanks – slugger415 Jul 15 '15 at 17:45

0 Answers0