/build/static/layout/Breadcrumb_cap_w.png

Script stuck on "Running" even though script finishes on user end.

There is a script I made and the first two commands work just fine but when it comes to the batch portion of the script, it gets stuck on "Running". The software is installed on the user's end. I even write to text file for the :exit section so I know it gets to the end. But for some reason, KACE doesn't exit the script. Is there somewhere I can look to diagnose this? Anyone else run into this issue and maybe have a solution?

0 Comments   [ + ] Show comments

Answers (1)

Posted by: Kiyolaka 2 years ago
Third Degree Green Belt
0

What is the specific task the script is doing? It's pretty normal for scripts to get stuck as running if it resets the network or agent connection.


Comments:
  • Its installing software.

    @echo off
    REM MAKE SURE OUR VARIABLES WORK INSIDE IF
    setlocal EnableDelayedExpansion

    echo Administrative permissions required. Detecting permissions...> C:\Temp\Brazos\install.txt

    net session >nul 2>&1
    if %errorLevel% == 0 (
    echo Success: Administrative permissions confirmed.>> C:\Temp\Brazos\install.txt
    ) else (
    echo Please Run as Administrator>> C:\Temp\Brazos\install.txt
    GOTO done
    )

    msiexec /package "C:\Temp\Brazos\setup.msi" /quiet
    SET location=
    IF EXIST "C:\Program Files\Brazos Technology\Maekit\Brazos.SQLServerCEInstaller.exe" SET location=C:\Program Files
    IF EXIST "C:\Program Files (x86)\Brazos Technology\Maekit\Brazos.SQLServerCEInstaller.exe" SET location=C:\Program Files (x86)

    IF DEFINED location (
    SET maekitpath="!location!\Brazos Technology\Maekit"
    echo Copying config files>> C:\Temp\Brazos\install.txt
    for /R "C:\Temp\Brazos" %%f in (*.config) do (
    echo copying %%f>> C:\Temp\Brazos\install.txt
    copy "%%f" !maekitpath!
    )

    REM INSTALL SQLCE
    echo installing SQLCE>> C:\Temp\Brazos\install.txt
    cd /D !maekitpath!
    start Brazos.SQLServerCEInstaller.exe
    echo ALL DONE>> C:\Temp\Brazos\install.txt
    )

    :done
    echo Exiting...>> C:\Temp\Brazos\install.txt
    endlocal
    exit - jleang 2 years ago
    • I would try testing it without the admin check logic, first thought is net session may be throwing something off. - Kiyolaka 2 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