/build/static/layout/Breadcrumb_cap_w.png

Scripting Error -1 when running a batch file

I have a batch file setup to push Symantec Endpoint to both x86 and x64 systems. I found most of the info here: http://www.itninja.com/blog/view/how-to-deploy-the-symantec-endpoint-protection-client-12-1-from-the-kace-1000

I uploaded 2 files for the shell script and then created the batch file from kbox. Here is the code I found.

@echo off

IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)

:64BIT

setup64.exe

:32BIT

setup32.exe

It does find and install the correct software but displays failed in kbox.

Any ideas on how to correct this?


0 Comments   [ + ] Show comments

Answers (3)

Posted by: nheyne 10 years ago
Red Belt
0

I think the way you have your batch file right now, it's running both setups on 64-bit machines.  Add a "GOTO :End" line in :64BIT, and of course ":End" at the very end of your batch file.  Otherwise when it's done running setup64.exe, there is nothing keeping it from continuing on in the batch file to run setup32.exe.

So it would look like this:

:64BIT

setup64.exe

GOTO :END

:32BIT
setup32.exe
:END

Comments:
  • Rrr it won't format my response properly...hope you get the idea - nheyne 10 years ago
Posted by: dugullett 10 years ago
Red Belt
0

Also since you are running a shell script make sure you are changing the "script file name" from .sh to .bat.

Posted by: bender6681 10 years ago
Orange Senior Belt
0

This works great but there is a problem now. I want it to be silent but there is a command prompt window that comes up. I found this online to make the window invisible:

Set WshShell = CreateObject("WScript.Shell")

WshShell.Run chr(34) & "batchfilename.bat" & Chr(34), 0

Set WshShell = Nothing

and have upoaded the batchfile and set the script to a vbs but it fails after the script is executed.


Comments:
  • Just curious why you don't make this a managed install? Zip both installers along with your .bat file. - dugullett 10 years ago
  • For some reason I couldn't get it to run the batch file that way . I'm not great at scripting. - bender6681 10 years ago
    • Upload you zip file to your software record. When creating the MI select "Configure Manually", and in the box below that enter the name of your .cmd file. I also check mark "Delete Downloaded Files". - dugullett 10 years ago
  • I'll give it a shot. I think I didn't have it as cmd but as bat. - bender6681 10 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ