1 Reply Latest reply on Sep 17, 2014 2:07 AM by MarXtar

    Running VBS script within a batch file not working properly in Landesk

    Rookie

      Hi there, when we run the batch file from command prompt, our vbs script that we call in the batch runs no problem.  Whenever we package the batch file in Landesk everything runs except the vbs file...  we've tried adding cscript, wscript, start "" before it and cannot get it to work...   When we run the batch file from command prompt on all the workstations with the various flags (wscript, cscript etc) we set it runs every time, but just does not run when we package it up in Landesk.  Everything else runs, but not the vbs.  Weird because it works fine when running manually...  Is there something simple we're missing??  We're running Landesk 9...

      Thanks for any insight!

        • 1. Re: Running VBS script within a batch file not working properly in Landesk
          MarXtar ITSMMVPGroup

          A couple of things to check on:

           

          1. Where is the vbs being referenced in relation to the batch file? Is it on a share or are you downloading it? If downloading where does it get put and does the batch knows call the script in the right location?
          2. What is the script doing? Is it referencing shares?

           

          If you are referencing network shares at any point then chances are the permissions will be broken since localsystem has no network rights.

           

          If the script and everything it does is local to the device then test deploy to a client so you see where the files are put. Test the batch and script from the locations where these reside.

           

          Easiest way I have to test the permissions is to start a command prompt as local system, you can do this using the windows scheduler but my preference has always been remote execute via remote control providing you have the 'run as administrator' option selected. This then means anything you run in the command prompt is running with the same rights LD would use.

           

          Mark McGinn

          MarXtar Ltd/MarXtar Corporation

          http://landeskone.marxtar.co.uk

          LANDESK One Development Partner

           

          The One-Stop Shop for LANDESK Enhancements