Help!

Discussion in 'Application Software' started by drazen11, Mar 30, 2010.

Tags:
  1. drazen11

    drazen11 MDL Novice

    Feb 27, 2010
    48
    7
    0
    :confused::confused:How to use batch file to run a program present in the same folder as the batch file?:confused::confused:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. sam3971

    sam3971 MDL Guru

    Nov 14, 2008
    2,220
    303
    90
    Whatever the file name is and the path is just type that in CMD like a shortcut link. For example lets say you have a file called cleanup.exe in the root of your c drive.

    The command is: "C:\cleanup.exe" with the quotes. It is that simple lol.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,256
    670
    60
    Use %~dp0Filename.exe to run the program in the same directory as the batch file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. sam3971

    sam3971 MDL Guru

    Nov 14, 2008
    2,220
    303
    90
    that works too lol. By chance do you know a command to kill or close a exe file. Like for example I would like to make a batch schedule to run the KMS emulator keygen for Office 2010 automatically and tell it to run the keygen, then the activation command and then close the keygen again after it. IDK how to close a program with command prompt.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,256
    670
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. drazen11

    drazen11 MDL Novice

    Feb 27, 2010
    48
    7
    0
    you're a genius, just what we needed, thank you very much
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. sam3971

    sam3971 MDL Guru

    Nov 14, 2008
    2,220
    303
    90
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...