3 Replies Latest reply on Nov 11, 2008 4:05 AM by MasterEales

    Problem in Batch deployment



      Im trying to create a distribution package for a program called "Charles". It's a web proxy program.


      The setup file is an executable, but I am having to create a batch file to be able to add the license information when deploying.


      Here is the batch file I created:

      @echo off
      start /wait file://%3ccore%3e/packages/WindowsXP/Charles/v3.2.3/charles_setup.exe /S
      xcopy "\\<core>\packages\windowsxp\charles\v3.2.3\charles.lnk" "C:\Documents and Settings\All Users\Start Menu\Programs" /Y

      md "C:\Documents and Settings\%username%\Application Data\Charles"
      xcopy "\\spark\packages\windowsxp\charles\v3.2.3\charles.config" "C:\Documents and Settings\%username%\Application Data\Charles" /Y



      Heres the problem.

      When running the batch file as a scheduled task (run from source), it will run the install of Charles and then copy the files in the appropriate locations (charles.config is the license file). After the scheduled task is complete I will launch the program, but it doesnt see that the config/license file. Although if I execute the batch file locally on the computer as the user it works correctly. The program will open and see the license.


      Any ideas?

        • 1. Re: Problem in Batch deployment
          MarXtar ITSMMVPGroup

          Does the program need adminstrattive rights in order to run? Are your users administrators?


          The problem here is that the batch file gets run as localsystem and therefore the variable you are using won't work since it is the wrong username.


          If you don't need admin rights or your users are admins, then on 8.8 you can set a task to run as the current user.  try that.


          If it needs admin rights but your users aren't admins, then do two tasks, one to install, and then another run as current user to copy across the file.


          Mark Star - MarXtar LANDesk Enhancements

          Home of Power State Notifier & Wake-On-WAN for LANDesk

          1 of 1 people found this helpful
          • 2. Re: Problem in Batch deployment

            The program does need administrative rights to run. I am testing both under an Admin account and as a User account. Same results.


            Ill give that a try

            • 3. Re: Problem in Batch deployment



              On the Distrubution Package in the Install / Uninstall Options put

              %Computer.Login Name%


              Then in the batch file instead of using %USERNAME% use %1 - Landesk will put the last logged in Username into the variable %1


              Hope that helps