Announcement

Collapse
No announcement yet.

Re: Pauls reboot program is source code forum

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Re: Pauls reboot program is source code forum

    Idle curosity. What was the reason/rationale for you writing the program at:

    http://www.powerbasic.com/support/pb...ad.php?t=36870

    I can't see any useful purpose for it, but if there is one.....
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

  • #2
    sure Mel,

    this paragraph copied from other thread

    A little background for the main purpose of this program. We run virtual machines with a windows guest operating system, and we use these virtual machines to let users access the internet freely. The other day, one employee's child came in and they let the child on the computer or maybe did not know it. We are like a lot places where you really do not want to put passwords everywhere but i am going to implement some. The problem arises when a virtual machine is not shutdown, but put into a saved state, sort of like hibernation. I would never ever hibernate a computer due to all the problems one can have, but this is different. So, when a user places the virtual machine in a saved state mode, the person can come up to the computer and restart the virtual computer from where it was left off, and i want our users to shutdown the virtual machines when they go home and if the virtual computer is in a saved state the next day, meaning anybody can use the virtual computer to go anywhere they want and not have to provide any passwords. it would serve me well to just have the virtual computer reboot by itself the next day if they bring the virtual computer out of a saved state. The virtual computers will have a password upon
    startup and each user will have their own password.



    There are other good reasons Mel,

    one might be you want to find as soon as possible a drive is going down, and upon a reboot, a computer's bios might use something like smart drive and see the hard drive is having problems, and the boot process usually stop there, displaying a message to replace the drive. this happened to me just over a month ago and we still are not yet over getting back to normal. the particular computer never gets rebooted, it was a server and rebooting would of caught the problem probably enough in advance so we could have done something more about it. i thought it was on raid but it was not. speaking of raid, i wish these hardware raid providers would have software to run that would log if the raid was not working properly, then we could write software to read those logs and report the problem in a way that we want. so easy to do for them raid manufacturers.


    one might be where you have a program that is know to lock up and you use this computer in some sort of automated way to perform functions everyday, maybe it is a computer that does backups from a server. i am sure there are other ways to see if a program or events are taking place, but if you do not know how to do that, just reboot it. i really believe most people are going to do that anyways regardless of what you tell them, when something does not do it's job.

    one might be where you have the machine getting its time from a sntp server or somewhere else and a user has the ability to change the date but you do not want them too, a few reboots and the user will get the message clearly not to mess with the date unless there is something else you can do that get the users attention. the program can be changed where the date is always reset to todays date if a user changes the date, or makes a report of days being changed after a boot.

    one might want to shutdown a computer at a specific time, in this case midnight, after running some software that would complete prior to midnight and stay off until the user starts up or logs on.

    one might not want a computer to be running after a certain time. a change would have to be done to the code, but easily doable.

    if you did not want the computer to boot if a program was running, just add code to search for class of dialogs and if there was a match made in a certain file, where you had put those class name, a boot would not take place, and log it did not take place, or better yet create a file then have os check for that file upon bootup to see if it existed, display it, then delete the file then or let the reboot service erase the file prior to rebooting.

    back to the original reason,
    This program will solve half my problems, not letting somebody use the computer without logging in, the next day, after midnight. The other half of the problem(logging off) when leaving the office, will be solved in another way. But one thing for sure, i do not expect a non-administrator to be able to easily remove my program circumvent what is needed. If what you wanted to be done is done on your computer, this program would have little meaning, but i do not plan on standing over our users backs, i will let software help me. did i mention in the first paragraph that somebody's kid got on a computer, which i am furious about still, and brought on some kind of virus that halted the virtual machine. Hell the SOB could have wiped out all the data files the host machine is using, just by being at the computer.
    What in the hell was the parent(employee) thinking, where they stoned.

    one other thing you can do with this program, if you do not want it reboot you os, have it do some date and time logs, so if the os does go down or if is locking up, you will know the date and time, if you logged the times within a minute. just log the time to a file over and over the same line, something like "running 03-23-2008 15:00:00" and upon reboot with this program read the file and place the contents into a different logged file, then in the different logged file, add the line "booted 03-23-2008 18:00:00".

    Mel, that was just a suggestion for anybody reading this. How many times did you want to know when equipment or os stopped working?

    I also posted it to the source code because i thought somebody else might of needed that extra knowledge of how to complete Ken Clark's demo into a use able program. i even struggled a bit and learned i had to make use of threads in a service to make best of it.

    this was a good first step for me, i want to write a service to follow where a user goes on the internet and report it back to the office manager and back to the main office. my routers track all activity and i just want the url, if a user supplies a ip address, i am going to stop the browser, i am working on the code now and have not made any decisions yet on how to conceal the logs, but i want it to be bullet proof.



    paul
    Last edited by Paul Purvis; 25 Mar 2008, 04:20 PM.
    p purvis

    Comment


    • #3
      I can see a use,
      lets say you purposely set a server to backup after hours (no one should be there with a program open, or NO ONNNNNNE should be there)

      A user leaves their computer on overnight, either by accident or told to (so that antivirus and spyware scanners can run) but then the backup will not back up open files which may or may not be open with or without the users knowledge. (Ok so we are up to at least 3 outside influences that each has no clue the purpose of the other influence)

      Barring more extreme ideas, rebooting should clear things out and not watch an admin freak out because they got too busy to find out days later that a backup has not been run in god knows how long, and possible loss of valuable data (both $$$ wise and Job Wise)
      Engineer's Motto: If it aint broke take it apart and fix it

      "If at 1st you don't succeed... call it version 1.0"

      "Half of Programming is coding"....."The other 90% is DEBUGGING"

      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

      Comment


      • #4
        Maybe but I can also see a late night multi-million business video conference going on with the attendees just about to close the deal.

        Nobody remembered the midnight reboot, and.....
        There are no atheists in a fox hole or the morning of a math test.
        If my flag offends you, I'll help you pack.

        Comment


        • #5
          Thats why there is a abort message, and why one should not force a reboot to machines that are intentionally in use that night.

          Also why any program that tries to abort something should also have an over-ride so situations such as yours can not happen

          Both good points really
          Engineer's Motto: If it aint broke take it apart and fix it

          "If at 1st you don't succeed... call it version 1.0"

          "Half of Programming is coding"....."The other 90% is DEBUGGING"

          "Document my code????" .... "WHYYY??? do you think they call it CODE? "

          Comment


          • #6
            Mel, are you kidding me.
            not on a 1250/212 internet connection.
            you just do not want to be programming on your own computer.
            and late night, i am one of a few that door that does not hit in as_.
            also, nobody better be there but me that time of night.
            the reboot mostly is for vm machines that can be reinstalled in less that 30 minutes, and the saved states are going to be erased at bootup time anyways.

            or how about computers that have remote control enabled at bootup and the remote control is disabled prior to leaving the office, i do not want to travel that distance to reboot a computer.

            i really figure it is mostly programmers that are responsible for damage to file for leaving files open all the time when a reboot happens, mostly by accident from power, somebody accidentally riping the cord.
            programmers should find a way to make sure the data is not lost in their programs, by developing ways of locking files without leaving data files opened all the time.
            actually i have lost few files since moving to w2k and using ntfs.
            on the dos systems, there was a tsr call tsrboot,where you could set the time to do a reboot and come that time, SHA WAM, the computer rebooted.
            i had those times set for 8:30 on all machines, include dos servers that would ghost their drives to another computer waiting that had also been rebooted.
            what is suppose to happen at each user's computer, they are instructed if leaving on a computer and not shutting it down, to reboot before leaving and not hit one key.

            i even had a user that would never reboot, but keep powering off the computer using the electrical switch on the floor and he was the manager in one of our biggest offices and had more to loss than anybody.
            Last edited by Paul Purvis; 25 Mar 2008, 08:56 PM.
            p purvis

            Comment

            Working...
            X