8 Replies Latest reply on Feb 16, 2013 8:50 AM by Catalysttgj

    Local Scheduler Help

    escott0699 Apprentice

      I am trying to write a local scheduler script that will first run taskkill /f /im pptview.exe and then launch a powerpoint file in a specific folder...

      just seem to be having trouble with the syntax and how many lines etc...

       

      if anyone has any ideas that would be great

        • 1. Re: Local Scheduler Help
          MarXtar ITSMMVPGroup

          How are you planning to launch these? Batch file? That would be a simple way of running multiple commands in sequence.

           

          What are you using this for? A way of resetting/restarting something on a kiosk system?

           

          Mark McGinn

          MarXtar Ltd

          http://landesk.marxtar.co.uk

          LANDesk Silver ESP

           

          The One-Stop Shop for LANDesk Enhancements

          - Wake-On-WAN - Distributed Wake-On-LAN, Scheduled Power Down, and SWDist Sequencing

          - State Notifier - Real-Time Device & User State Inventory Updating & Alerting

          Update - WoW & State Notifier now integrate for even more functionality

          Update - State Notifier now detects machine and user Idle states

          • 2. Re: Local Scheduler Help
            escott0699 Apprentice

            Correct...we have a PC that displays a powerpoint presentation...we have the presentation in a dropbox folder so that hr or whoever can update it from their pc..so every 10 minutes or so we want powerpoint to stop and then reload the presentation..which could be a new copy at any time of the day..

            • 3. Re: Local Scheduler Help
              Catalysttgj Expert

              Since you want this to run interactive, you'll likely need to employ STARTASUSER.EXE, which you should find in the LDclient directory. The local scheduler is running in system context, so if you try calling an app like powerpoint directly, it might not actually show on the screen. It might just show up in task manager and thats it. Now, i've not tried this app before in this way, so experience is the key here. Try it, and see what you get, but IF you don't see the presentation appearing, and the powerpoint exe is running in task manager, then you need to probably user startasuser.exe to get it to run as the user. This will only work if a user account is logged in, so thats a limitation, but not really a bad one obviously. Your best bet would be to write a batch script that does what you need it to do, and then just call that periodically from the local scheduler. You could then, if necessary, call the startasuser.exe from inside the batch file.

               

              Typically, if you simply call an EXE followed by a compatible file path, it will usually open the file without issue.

               

              example:

               

              "C:\Program Files..the rest of this path here..\POWERPNT.EXE" "C:\temp\whatever the file name is here.ppt"

               

              Remember to double quote around things with dreaded whitespace!

               

              Alternatively, you might be able to tell explorer to open the powerpoint file, and it might just redirect it to powerpoint. Can't remember if this is right for sure, but its not really that important, if you know how to run powerpoint the same way.

               

              Should just work like this. If you needed to add startasuser.exe, you'd just append it to the front of this line, but don't forget to include the full path to it, since its not in a predefined path in the OS.

               

              example for win7 default agent install location:

               

              "C:\Program Files (x86)\LANDesk\LDclient\STARTASUSER.EXE"

               

              Hope this info is useful. Let us know if you did or didn't need startasuser  for powerpoint. I'm curious, if it will actually not need it. LANDesk's stuff has gotten much tighter about the system vs. user modes, but powerpoint might be a little loose itself.

              1 of 1 people found this helpful
              • 4. Re: Local Scheduler Help
                Frank Wils ITSMMVPGroup

                Just be aware that startasuser.exe is not part of the 9.5 agent anymore, so you need to get this from 9.0 media. I also don't think that calling the powerpoint executable with the file name will necessarely open the file in presentation mode. You might want to use just the powerpoint viewer for this.

                 

                Frank

                • 5. Re: Local Scheduler Help
                  Catalysttgj Expert

                  Frank,

                   

                  We have a copy of StartasUser.exe installed on all our agents, and its a 9.50.0.530 version number which implies that its from 9.5, and since I know we clean installed an agent on several machines and the file in question is always presen, something's not lining up with the idea that its not part of 9.5. This file is located in all our core servers (We have three - one of which was a clean build) under the ManagementSuite directory. Seems to be up to date, so not sure who misled you on this detail. One note, we do have a patch for 9.5, but i think startasuser.exe was there even before that patch. We use this tool quite a bit, so it would be a really poor notion for landesk to get rid of it.

                   

                  Anyways, glad to hear some other folks have more info on the powerpoint "pres" mode. Not that familiar with it at all. Worse case, might need some sort of autoit script to kick powerpoint into pres mode maybe??

                  Cheers,

                  ;-)

                  • 6. Re: Local Scheduler Help
                    Frank Wils ITSMMVPGroup

                    That's weird... Yes, you are right. I have 2 servers where it's missing but i checked in the installation media and it's there. I checked some other servers and it's there too. I assumed it was dropped and didn't have a use for it meantime so didn't look more for it. Seems like some other files didn't get copied also now i look better, but nothing that would be really obvious :( Good to know! I will have to rebuild my test-servers :(

                     

                    As for the powerpoint viewer, use the command line options to play a playlist. Look at the second half of this document:

                    http://office.microsoft.com/en-us/powerpoint-help/command-line-switches-for-powerpoint-2007-and-the-powerpoint-viewer-2007-HA010153889.aspx

                     

                    Frank

                    • 7. Re: Local Scheduler Help
                      escott0699 Apprentice

                      we used a batch file calling taskkill and then launching the pps file seems to be working.

                       

                      thanks all

                      • 8. Re: Local Scheduler Help
                        Catalysttgj Expert

                        Yeah, I've seen some bizare things happen with the installers before. A little troubling, considering there's so many pieces/files in a core. Be good to have a healthchecker script that one could run post install/upgrade to look for anything missing/misconfigured. That'd be a tough thing to come up with though, i'd imagine.