2 Replies Latest reply on Nov 9, 2015 10:05 AM by TxDMV-IT

    Anyone else have problems with "New batch file package"?

    TxDMV-IT Apprentice

      I have a batch file that:

      • Creates a folder if it doesn't already exist
      • Copies files to the folder
      • Adds the folder to the system path
      • creates a shortcut on the Public Desktop

       

      The batch file works if I run it from a computer. But when I create a LANDesk Package using "New batch file package" option it will not push to other computers. All files that I designate as Additional Files will push to computers; the batch file is the only file that will not push through LANDesk.

       

      My best guess is that LANDesk does not allow one of more of the commands in the batch file.

       

      Here is the batch file:

      ----------------------------------------------------------------------------

      @echo off

       

      if not exist c:\Test MD C:\Test

      copy /Y %~dp0\*.* C:\Test

       

      reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_SZ /d "%path%;c:\Test" /f

       

      echo Set oWS = WScript.CreateObject("WScript.Shell") > CreateShortcut.vbs

      echo sLinkFile = "C:\Users\Public\Desktop\Test.LNK" >> CreateShortcut.vbs

      echo Set oLink = oWS.CreateShortcut(sLinkFile) >> CreateShortcut.vbs

      echo oLink.TargetPath = "C:\Program Files\Internet Explorer\iexplore.exe" >> CreateShortcut.vbs

      echo oLink.Arguments = "https://www.google.com/" >> CreateShortcut.vbs

      echo oLink.IconLocation = "C:\Test\Test.ico" >> CreateShortcut.vbs

      echo oLink.WindowStyle = "3" >> CreateShortcut.vbs

      echo oLink.Save >> CreateShortcut.vbs

      cscript CreateShortcut.vbs

      del CreateShortcut.vbs

      ----------------------------------------------------------------------------


      Any assistance will be greatly appreciated.


      Thanks,


      Jack