Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Kicking users out of a VFP EXE
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00809088
Message ID:
00809103
Views:
24
>Consider the following situation:
>I have to install an upgrade (new EXE) on a Saturady on a system that has hundreds of users that span several floors in a buiding.
>Being a Saturday, I expect exveryone to have logged out and shutdown, but there are still a few who have left their computer in the application and not shutdown.
>How can I kick them out of the EXE so that I can replace it with a new EXE, without having to call the IT Manager who is on leave to shutdown the server.
>Can I build something into future EXEs to help me?

I use 2 ways to achieve this.

First is launching the application with the launcher program that first checks if there is a newer version of the EXE in a specified directory on the network and, if so, copies it to the local workstation. (EXEs always run from the local copy). The launcher app itself resides on the network. So, when the user restarts the app s/he may be sure that the latest version is run.

Second, if by whatever reason you need to kick all users out (distribute new version of DBC, do the table reindexing, etc.), there is a timer in the EXE that checks every minute if there is a certain file (for example called SHUTDOWN.TXT) somewhere on the network (say, in application data directory) and if it sees the file, it immediately shuts down the app. It can give the user a warning, and even make the educated guess :) and save or cancel opened data editing sessions if the user is not there. The exact logic here depends on your application.

My apps, for example, can prevent logging in new users, allowing to continue workeng those who already logged in. They may kick out all users (with the file SHUTDOWN.TXT)or selected ones with the file [USERLOGINNAME].TXT

You can find my Launcher (file#9668) in Downloads section as well as others of that kind.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform