running batch file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • dana
    Forum Member
    • Jul 2006
    • 7

    running batch file

    Hi,
    I am trying to run a batch file during my installation. the batch file should run silently (i don't care if the user sees the screen but shouldn't be able to do anything) recieve "Y", and redirect output to a log file.
    this is what i wrote in my code:

    File.Run("cmd","echo y | "..InstallPath.."Setup.bat > log.txt", "", SW_SHOWNORMAL, false);

    it is not working :(

    how should it be done???

    thanks,
    Dana
  • longedge
    Indigo Rose Customer
    • Aug 2003
    • 2498

    #2
    I normally create a .bat file and once I've got it working as I want, I put it in the docs folder and just run that. I've never quite managed to get my head around the syntax to include command line switches, parameters etc. and doing it all from inside a .bat has always got me around my problems.

    Comment

    Working...
    X