2 Replies Latest reply on Jul 17, 2013 6:18 AM by Giz059

    How to distribute a package before a Windows shutdown ??


      Hi everybody,


      I'll explain my problem in few words :


      We have about 600 servers rebooting at different time and by different ways (some are scheduled reboot, other are manually rebooted and others are rebooted by another application).


      My problem : I have to deploy the new Landesk 9.5 agent and the new antivirus software at the same time on all the servers. The package works fine with the dependancies.


      My question : We would like the package to be executed before the next shutdown of the servers (scheduled or not). Is there a way to do this in Landesk 9.5 ?? Is there an option or a trick that will allow my package to be executed ON SHUTDOWN of the computer ???


      Thank's a lot for your answer !

        • 1. Re: How to distribute a package before a Windows shutdown ??


          I guess there is not a such option as, if a reboot is occuring, all the programs are being closed or killed.

          You are thinking of installing a program when the computer is going to be shut down (or restarted), which makes a bit of no sense to me.


          Anyway, there should be a way to bind the execution of some script to a shutdown event.

          This URL shows how to get such kind of events : http://blogs.technet.com/b/heyscriptingguy/archive/2010/10/01/quick-hits-friday-the-scripting-guys-respond-to-a-bunch-of-questions-10-1-10.aspx

          I think you may be able to cancel the shutdown with a "shutdown /a", perform the operations you want, and then trigger another reboot.


          But you should definitely try to see the problem the other way : installing when the computers are up.




          • 2. Re: How to distribute a package before a Windows shutdown ??



            Just a few more explanations to explain why we want to install softwares before the shutdown.


            Many of our servers are business criticals and they have a fixe and strict time of reboot that we cannot change (we cannot also make a shutdown when we want : we have to see with the different teams and users worldwide when they will not use the servers).

            That's why we would like to install the software before the "scheduled" reboot. In our case the reboot will finish the antivirus installation for example and we won't have to wait till the other "scheduled" reboot (that can be scheduled one month later for example if the server has to be rebooted just once a month)...


            Hope you see better what my problem is !!!


            I haven't think of the "shutdown /a" option and launch the reboot just after the package. But this will only work with the scheduled reboot and not the manual ones or the one made by other soft ...


            We really want our script to be as automatic as possible, without having to check when the server will be rebooted.


            Kind of script that will wait till a shutdown event, execute the package and reboot the server as it was supposed to be.