none
pass arg to cmd file? RRS feed

  • Question

  • We have a cmd file that we need to pass 1 of 3 arguments too.    you can pass "USER", "FORM", or "ADMIN".    From a CMD window how do you call this .CMD file tell it to use either user, form or admin?   


    :install
    REM Installs version 4.3A for End User PCs on User Machines
    IF %1==user start /wait " " "Y:\PatientWorks 4.3A Full Setup.exe" /s /v"/quiet DATA_SERVICES_IPADDRESS=PWAPPTEST ADDLOCAL=Common,Xpress,UserManual,Help"

    REM Installs version 4.3A for End User PCs on Form Designer Machines
    IF %1==form start /wait " " "Y:\PatientWorks 4.3A Full Setup.exe" /s /v"/quiet DATA_SERVICES_IPADDRESS=PWAPPTEST ADDLOCAL=Common,Designer,UserManual,Help"

    REM Installs version 4.3A for Admin PCs
    IF %1==admin start /wait " " "Y:\PatientWorks 4.3A Full Setup.exe" /s /v"/quiet DATA_SERVICES_IPADDRESS=PWAPPTEST ADDLOCAL=Common,Xpress,Designer,WorkflowStudio,Administrator,UserManual,Help,KioskWorksDeveloper"

    Wednesday, June 21, 2017 2:09 PM

Answers

  • Type the script's name at the command line, a space, one of the three arguments you mentioned, and then press Enter.

    -- Bill Stewart [Bill_Stewart]

    • Marked as answer by bellmonster Wednesday, June 21, 2017 2:35 PM
    Wednesday, June 21, 2017 2:30 PM
    Moderator

All replies

  • Type the script's name at the command line, a space, one of the three arguments you mentioned, and then press Enter.

    -- Bill Stewart [Bill_Stewart]

    • Marked as answer by bellmonster Wednesday, June 21, 2017 2:35 PM
    Wednesday, June 21, 2017 2:30 PM
    Moderator
  • I tried everything but that :-)    %1,  ==  etc.....   that worked.

    Wednesday, June 21, 2017 2:35 PM