BAT File To Install and To Run Service

I wrote a bat file to install Tomcat 7.0.73 and start its service: SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80 CD /D Server\apache-tomcat-7.0.73\bin\ service install MyTomcat SLEEP 5 sc start MyTomcat But there are 2 problems: After service install MyTomcat, It exits and It does not perform the command sc start MyTomcat; How can I change the script in … Read more

Windows service and passing in a password

My windows service needs a password to access an external resource. At present I’m putting the password in the App.config file, on installing the service I encrypt it and copy it to the user configuration file in code and then edit it out of the App.config. This is a bit long winded and prone to … Read more

If windows server 2012 R2 updated, does it restart services?

I disabled the AD service on a production server on 23/07/2019. I picked up the service was restarted on the 25/07/2019. When I came to discover was that the service was used the following day around 7:52AM by users in the application. Is it possible that the windows update restarts services without user consent. Answer … Read more

Windows service does not start after machine reboots unless a user signs in

I have a Windows Server 2019 remote server machine and I have been trying to deploy a windows service. Everything works fine except that when I restart my machine, the service does not start unless I sign in as a user. I’d like the service to start as soon as the machine restarts (without a … Read more