PDA

View Full Version : install qtservice program on windows 7x64 VS2013



TonyInSoMD
7th March 2018, 18:05
I created a program using qtservice called User Log Service. I can't figure out how to install the service onto the computer. I'm pretty sure I've built it right, but without installing it I can't test it. From what I've read you can't run a service in debug mode. I've never done this before. I looked online and the only thing I can find is to use InstallUtil in admin command line. I tried running InstallUtil from windows but I get System.BadImageFormat exception: could not load file "...\UserLogService.exe" or one of its dependencies. The module was expected to contain an assembly manifest. It's a very simple program with just your very basic libraries.

Lesiok
8th March 2018, 06:53
QtService application can be run with parameters. Run it on the command line with the -h parameter.
For debugging run it with -e parameter.

TonyInSoMD
8th March 2018, 12:26
I tried using -h nothing happened. I used -e and it runs. I guess I'm going to find something that explains how to debug from the command line. Only it runs as the process "User Log Service.exe" and application "User Log" (the program the service runs). Nothing shows up in services. What I need to have happen is for the program to run as a process that initiates on start up. Only admin can start/stop/pause etc. the process, and the user can use the program for logging off and on, and isn't in the list of programs or processes in Windows Task Manager (so that the user can't quit it). There's a lot of processes like that so I know there's a way to do it, but maybe I'm being unfair and asking for too much asking it on a forum. I would need it spelled out for me pretty clearly and that takes a lot of time from the expert poster.

Lesiok
8th March 2018, 14:41
Parameter -h :
NameOfYoursService.exe -[i|u|e|s|v|h]
-i(nstall) [account] [password] : Install the service, optionally using given account and password
-u(ninstall) : Uninstall the service.
-e(xec) : Run as a regular application. Useful for debugging.
-t(erminate) : Stop the service.
-c(ommand) num : Send command code num to the service.
-v(ersion) : Print version and status information.
-h(elp) : Show this help
No arguments : Start the service.