Announcement

Collapse
No announcement yet.

ShellExecute and batch files...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ShellExecute and batch files...

    I'm confused....

    I have one batch file running, the other gave me a parameter error so I just wanted to touch base here and make sure this was OK:

    InstallDir = "D:\TNGMP3" 'Or whatever
    Code:
    cmd = "cmd.exe"
    cmdParam = "/C " & InstallDir & "\STOPIIS.BAT"
    ShellExecute ByVal %NULL, "open", ByVal StrPtr(cmd), ByVal StrPtr(cmdParam), ByVal StrPtr(InstallDir), %SW_SHOWNORMAL
    This worked...
    
    But the StartIIS bat did not, and it is probably because it was run asychronously...
    
    can I run this batch file Synchronously? I have the code to do this, any comments?
    
    Frustrating.....and I'm not 100% sure it's my solution either to stopping the IIS Admin service and restarting it....
    
    Scott
    ------------------
    Scott
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    ShellExecute, as I remember, always async. Try simple PB Shell statement.

    ------------------
    E-MAIL: [email protected]

    Comment

    Working...
    X