App executed from network on multiple computers

Just starting out? Need help? Post your questions and find answers here.
User avatar
Fig
Enthusiast
Enthusiast
Posts: 352
Joined: Thu Apr 30, 2009 5:23 pm
Location: Côtes d'Azur, France

App executed from network on multiple computers

Post 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)
There are 2 methods to program bugless.
But only the third works fine.

Win10, Pb x64 5.71 LTS
Marc56us
Addict
Addict
Posts: 1600
Joined: Sat Feb 08, 2014 3:26 pm

Re: App executed from network on multiple computers

Post 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.
User avatar
skywalk
Addict
Addict
Posts: 4213
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: App executed from network on multiple computers

Post 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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply