LuckyDuck528
Programmer
Hello All -
I have a VB6 program that I needs to call a .vbs script that will stop an Application Pool in IIS 6.0.
The vbs has to accept arguments from the cmd line and it works great when run alone.
However, when the VB executable runs and tries to call the Shell command below, I get an error after the "Stopping AppPool..." statment that says "Path Not Found". I'm assuming that means the path to my .vbs
So apparently this has to do with the shell32.dll?? I have no idea... anywyas, this is teh LAST part of my current project and any help getting this little bug worked out is greatly appreciated.
Thank you and hope you're having a great day!![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
I have a VB6 program that I needs to call a .vbs script that will stop an Application Pool in IIS 6.0.
The vbs has to accept arguments from the cmd line and it works great when run alone.
However, when the VB executable runs and tries to call the Shell command below, I get an error after the "Stopping AppPool..." statment that says "Path Not Found". I'm assuming that means the path to my .vbs
So apparently this has to do with the shell32.dll?? I have no idea... anywyas, this is teh LAST part of my current project and any help getting this little bug worked out is greatly appreciated.
Thank you and hope you're having a great day!
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
Code:
Const strStopAppPool = "C:\....."
...
'Print saying you are going to stop the apppool
Open strLogFile For Append As #20
Print #20, "Stopping App Pool... " & strAppPool
Close #20
'Stop the app Pool w/ arguments server and apppool name
strRunStop = strStopAppPool & " " & strServerName & " " & strAppPool
Call Shell(strRunStop, 1)
'Debugging statement (This does not print.. I get the error)
Open strLogFile For Append As #20
Print #20, "AppPool Stopped"
Close #20