5 Replies Latest reply on Jul 31, 2008 10:41 AM by punisher46

    How can i create scripts bat file

    Rookie

      I want to create scripts bat file for deploy copy file to client but error "The system cannot open the file".Please suggest me for good solution.

       

      I used command "xcopy file://%5C%5Csource  /s/v/e/c/y"

        • 1. Re: How can i create scripts bat file
          phoffmann SupportEmployee

          You may want to use the (CODE) (use squiggly brackets instead of the round ones I am).formatters to show the proper command-line.

           

          You also may want to be aware of user-context in normal cases, software distribution packages are going to be running as LOCAL SYSTEM, which is going to often cause problems hitting UNC shares. Test your script - follow these instructions to get a local system-context command-line box up:

          http://community.landesk.com/support/docs/DOC-1645

           

          Paul Hoffmann

          LANDesk EMEA Technical Lead

          • 2. Re: How can i create scripts bat file
            Rookie

            Folder created under file://%landeskservername%/packages called ESR

            Folder created under ESR called ESRDesktopShortcuts

            Bat file created in ESR folder named ESRDesktopShortcuts.bat

            Hidedos.exe copied to ESR folder

             

            Contents of bat file is as follows:

            HIDEDOS.EXE xcopy /y /e /i /c "ESRDesktopShortcuts" "c:\docume~1\all users\desktop\ESR Desktop Shortcuts"

             

            This copies the ESRDesktopShortcuts folder to the %all users%\desktop folder

             

            Batch file package created to ESRDEsktopShortcuts.bat and ESR folder added in additional files

             

            Hope this helps

             

            Cheers

             

            Dave

            • 3. Re: How can i create scripts bat file
              MarXtar ITSMMVPGroup

              Is your packages share a null session share? Since this is going to run at the localsystem level, unless it is null share localsystem won't have read rights.

              • 4. Re: How can i create scripts bat file
                Rookie

                Why note add all files as additional package files and have you command look like this:

                 

                {HIDEDOS.EXE xcopy /y /e /i /c "%dp0." "c:\docume1\all users\desktop\ESR Desktop Shortcuts" /EXCLUDE:NAMEOFYOUTBATCHFILE.BAT}

                 

                 

                that would copy all files in the current directory. Just be sure to put the correct name in the exclude area so the bat file does not end up on the desktops as well.

                 

                 

                Also, a batch file would be silent to the user if you distribution method was set up that way. Any output would be piped to a log file. you dont need to use HIDEDOS.EXE

                • 5. Re: How can i create scripts bat file
                  Rookie

                  distrubution method is setup as silent, and these same packages used to run silently wihout hidedos on 8.6, but since we've been upgraded it now flashes up the dos box