Ghost Solution Suite

 View Only
  • 1.  CLI

    Posted May 26, 2017 05:45 PM

    Is there any way in GSS3.2 to use CLI? I want to create a new computer with MAC and computername, import it in GSS and start an image deployment. Is any of these steps posible, or on the roadmap?



  • 2.  RE: CLI

    Posted May 26, 2017 07:58 PM

    Messed around with the exe files, and got it working:

     

    Posting incase someone needs:

    @echo off
    echo Computername:
    SET /P _PCName=

    echo MAC:
    SET /P _PCMAC=
    SET _PCMAC=%_PCMAC::=%
    SET _PCMAC=%_PCMAC: =%

    echo User:
    SET /P _PCUser=

    :Model
    echo VMware, T460
    echo Model:
    SET /P _PCModel=
    if "%_PCModel%" == "" echo Error in model & goto Model
    echo %_PCModel%|find /i "VMware"
    if %errorlevel% == 0 set _job=Win7WMware

    echo %_PCModel%|find /i "T460"
    if %errorlevel% == 0 set _job=Win7T460


    if "%_job%" == "" goto Model


    goto Model

    :Start
    echo %_job%
    pause

    echo %_PCName%,%_PCMAC%,,,,%_PCName%,1,domain.local/1NewPC,,,,,,,,,,,,,,,,,,%_PCUser%,Company,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>"%temp%\%_PCName%-import.txt"

    "C:\Program Files (x86)\Altiris\eXpress\Deployment Server\axComp.exe" "%temp%\%_PCName%-import.txt"
    del "%temp%\%_PCName%-import.txt"

    timeout /T 30

    set _y=%DATE:~6,4%
    set _mo=%DATE:~3,2%
    set _d=%DATE:~0,2%

    set _h=%TIME:~0,2%
    set _m=%TIME:~3,2%
    "C:\Program Files (x86)\Altiris\eXpress\Deployment Server\axSched.exe" %_PCName% "%_job%" /t "%_y%-%_mo%-%_d% %_h%:%_m%"

    set/a _m="_m+1"
    if %_m% == 60 set/a _h="_h+1"
    if %_m% == 60 set _m="00"
    "C:\Program Files (x86)\Altiris\eXpress\Deployment Server\axSched.exe" %_PCName% "Java" /t "%_y%-%_mo%-%_d% %_h%:%_m%"