Page 1 of 1

App executed from network on multiple computers

Posted: Thu Feb 18, 2021 7:20 pm
by Fig
Hi, I have many questions...
My app (executable) run on mutliple computers from a local network.
It actually access a database.

1/How can I update the current program ? I need to erase it to change it.
Should I poll every x minute a specific table in data to close each program if needed ?
ie When I need to update, I change a specific value in a DB table, the programs read it and close to let me do the update

2/Sometimes I can't run it at all (denied access not enough privilege) Do you know what could be the problem ?
I suspect it happened when someone does not exit properly and his computer enters in sleep mode. Does it make sens ?

3/My app must print at a specific hour. How can I wake up the computer from its sleep mode at a specific hour? (windows 10)

Re: App executed from network on multiple computers

Posted: Fri Feb 19, 2021 3:30 pm
by Marc56us
3/My app must print at a specific hour. How can I wake up the computer from its sleep mode at a specific hour? (windows 10)
Windows ?

A program launched by the task manager (taskschd.msc) can be launched even in standby mode.
- "General" tab
- Use the following user account: "<a user account that can run program>"
- [X] Execute even if user is not logged in.
- "Conditions" tab
- Power > [X] Exit the computer from sleep mode to perform this task.

No need to be an administrator or to use a system account or service, just have an account with sufficient rights to the program and directories to be used.

Alternative: prevent the computer from going to sleep.

Code: Select all

powercfg.exe /hibernate off
(on to reactivate)

If server is down at update hour: all BIOS have option to start PC at specific date/time and/or by network acces.

Re: App executed from network on multiple computers

Posted: Fri Feb 19, 2021 6:52 pm
by skywalk
Fig wrote:Hi, I have many questions...
My app (executable) run on mutliple computers from a local network.
It actually access a database.

1/How can I update the current program ? I need to erase it to change it.
Should I poll every x minute a specific table in data to close each program if needed ?
ie When I need to update, I change a specific value in a DB table, the programs read it and close to let me do the update

2/Sometimes I can't run it at all (denied access not enough privilege) Do you know what could be the problem ?
I suspect it happened when someone does not exit properly and his computer enters in sleep mode. Does it make sens ?

3/My app must print at a specific hour. How can I wake up the computer from its sleep mode at a specific hour? (windows 10)
1/2/ You cannot replace a running exe.
Your individual apps must initiate a close then spawn a process to acquire/download a new version of itself which overwrites the old and then executes the new exe.
I use a batch file for this. My app creates the batch file and then runs the batch and closes itself. The batch file waits for the app to exit before continuing.
3/ Use the Task Scheduler as Marc56us mentioned.