Running a batch from ASP
Posted on 2006-12-01
Below is my code for running a batch/exe from within ASP
dirPath = server.mappath(".")
dirPath = dirPath & "\update.exe"
Set WShShell = Server.CreateObject("WScript.Shell")
RetCode = WShShell.Run(dirPath,10,true)
Set WShShell = Nothing
When I run this it appears to do nothing - I ran it multiple times. Then it dawned on me to check Task Manager for Processes running. I'll be darned if there weren't multiple instances of that executable running owned by the IWAM user, but within the asp it never appeared to do anything or actually open the executable. I also switched update.exe to a batch that simple opened notepad.exe and got the same result. Any idea what I'm missing to make this execute properly?