Dedicated Server question

Quick question. We are ms SQL express 2014 on a dedicated box running server 2012r2 standard. I have the messaging service setup and everything is working fine. The only thing I was wondering is some items I have setup to only run on the server like database backup at the end of every shit. We have breakfast lunch and dinner. For this to work I have to have the samba program open on the server and logged in as the admin user… Is there a way to have the program auto start and run in the background on the server? Maybe minimized to the system tray to know that its for sure running when you go into the server?

You can set tasks for it and even have a restart if it failed for some reason. Why does it have to be logged in?

My mistake it does not need to be logged into samba what I meant was the administrator on the server has to be logged in for samba to be on… I’m thinking of just converting it to a service so that it will run in the background on the server. That way even if the server happens to reboot over night for some reason the tasks can still run even if the administrator hasn’t logged into the server.

1 Like

Ok, I got SambaPOS working as a service when the pc boots without administrator needing to be logged in. This is useful for triggers and other things that need to be ran from a dedicated server.

To start off you will first need to download and install the windows server 2003 resource tool kit. (This installs on any system)

The link for Windows Server 2003 Resource Tool Kit:

Then you will need to add an entry in the registry to create the service, below is a sample of my service config. You can change the name and paths to whatever you like.

Windows Registry Editor Version 5.00


“AppDirectory”=“C:\Program Files (x86)\SambaPOS4”
“Application”=“C:\Program Files (x86)\SambaPOS4\Samba.Presentation.exe”

Once completed you will need to reboot your system and go into the services.msc console and check to see if the service is running… if so you should be able to open the task manager and see the sambapos process running in the backgroud. I also went into the service and changed it from running as administrator instead of a system account.

1 Like

Seems like a bit of overkill to set SambaPOS to run as a Service - but if it works for you then that is great.

My recommendation would have been to create a BAT file that contains the commands (SQLCMD) to execute a DB backup. Then put that BAT file into the Windows Task Scheduler.

Personally, I run DB backup on Application Ending Event, if the WorkPeriod is Closed. I also have a button (Automation Command) within SambaPOS to instigate a backup on-demand.

One thing I learned about @antasp3136 is he loves overkill haha. Not a bad thing it stretches capabilities and gives us more idea of whats possible.