Need a simple script to execute a couple of commands

Discussion in 'Scripting' started by zlpx9CXRTuseQ52it8dP, Jul 29, 2026.

  1. zlpx9CXRTuseQ52it8dP

    Jul 8, 2026
    24
    3
    0
    I need to run 2 commands from the same directory in this order, but I can't figure out how to put it all into one .cmd or .bat file:

    tapctl.exe create --hwid wintun
    openvpn.exe

    The following does not work, mostly because "start" doesn't appear to execute the "create --hwid wintun" portion:
    start "C:\Program Files\OpenVPN\tapctl.exe create --hwid wintun
    start openvpn.exe
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    18,725
    100,772
    340
    Code:
    cd /d "C:\Program Files\OpenVPN"
    tapctl.exe create --hwid wintun
    openvpn.exe
    if you use start for a command that have quoted path, you must add another quotes marks beforehand for title (can be empty)
    Code:
    start "" "C:\Program Files\OpenVPN\tapctl.exe" create --hwid wintun
     
  3. haber123

    haber123 MDL Member

    Nov 5, 2009
    142
    52
    10
    Was thinking "call" command would do similar, then remembered call is for running bat file inside a bat file.