Startup a winform hidden

  • Thread starter Thread starter Alison Givens
  • Start date Start date
We are fully aware of this.
It is just that we have clients that use Terminal Server.
We have certain programs that we don't like to use through Terminal Server.
Therefore these programs run locally.
 
Alison said:
In the netwerk environment, there still are users that place some of their
files on the local disk.
What I want is that when the user shuts down his/her pc at the end of the
day, a file called copy.bat is started.
In this batch file the need files will be copied to the server.
The app I want to do this with, has to be invisible, so the user cannot
close it.
It also needs some kind of a timer function, so that the pc isn't shut down
before the files are copied.

So basically you're writing a program because people refuse the obey the
company rules (only save to the network). So you're going to call
copy.bat. What is that going to copy? The whole disk? You'll need to
since you obviously don't have control over where people save their
data. If you're only copying certain directories, you're bound to miss
some files.

The users need to be educated and learn that the only safe way to store
their files is on the network. Educational manners (for sysops): clear
the HD from time to time (first backup the files) and let them sweat it
out a few hours before returning their files. In my experience users
learn pretty quick to use the network that way >:)

Maybe print out the text:

"FILES ON LOCAL DRIVES AREN'T INCLUDED IN THE BACKUP"

on a sheet of A0 paper and hang that in the office for a while. Or
better yet, make it a windows wallpaper and enforce it using policies so
they can't change the wallpaper.

While these measures seem rediculous, my point is that you need to
educate your users and not let them make you clean up their mess.
 
In the netwerk environment, there still are users that place some of their
files on the local disk.

Aren't there always ... ;-)
What I want is that when the user shuts down his/her pc at the end of the
day, a file called copy.bat is started.
In this batch file the need files will be copied to the server.
The app I want to do this with, has to be invisible, so the user cannot
close it.
It also needs some kind of a timer function, so that the pc isn't shut
down before the files are copied.

And therein lies your biggest problem.
When windows tries to shut down, it asks each running process,
/including/ the one that you've just /started/ to do all this file copying,
to shut down "nicely". It the process fails to do so - and yours obviously
will, because it's busy - Windows pops up a dialog asking if the user wants
to wait for the process to finish or just kill it off and, if they choose to
kill it,
there's absolutely nothing you can do about it.

Have you considered kicking this process off at the /start/ of the day, when
they start up their PC? I'd suggest this is a far safer proposition
(although,
of course, it may not marry up with your server backup schedule).

Regards,
Phill W.
 
Back
Top