Hi,
Probably a simple question but I'm trying to create a file uploader for web pages and (in proc IIS ) dlls (PB DLLs that is).
Anyway, the trick is to have a command from a webpage that is handled in the underlying dll. This command starts a simple PB exe.
If I run this Exe from the Explorer manually, all works well. If I start it from the Dll using SHELL, the exe is started, but it doesn't do the trick.
The Exe creates a .bat file that has to be executed.
This .bat file should be executed, no? Well, it doesn't.
I also tried this (without any luck), found it on the forum
Or this:
Any ideas? I've seen more people struckle with this. A good explanation of all details (what options do you have, when do you use what) would be great, I think.
Hope someone can help.
Greetings
Jeroen
------------------
Probably a simple question but I'm trying to create a file uploader for web pages and (in proc IIS ) dlls (PB DLLs that is).
Anyway, the trick is to have a command from a webpage that is handled in the underlying dll. This command starts a simple PB exe.
If I run this Exe from the Explorer manually, all works well. If I start it from the Dll using SHELL, the exe is started, but it doesn't do the trick.
The Exe creates a .bat file that has to be executed.
Code:
OPEN Root + "\IISSTOP.BAT" FOR OUTPUT AS #2 PRINT #2, "NET STOP IISADMIN / Y" PRINT #2, "MTXSTOP" CLOSE #2 SLEEP 5000 SHELL BasicRoot + "\IISSTOP.BAT" BEEP BEEP
I also tried this (without any luck), found it on the forum
Code:
LOCAL cmd AS STRING, cmdParam AS STRING cmd = "command.com" cmdParam = BasicRoot + "\IISSTOP.BAT" ShellExecute BYVAL %NULL, "open", BYVAL STRPTR(cmd), BYVAL STRPTR(cmdParam), BYVAL STRPTR(BasicRoot), %SW_SHOWNORMAL
Code:
DIM rcProcess AS PROCESS_INFORMATION DIM rcStart AS STARTUPINFO DIM RetC AS LONG ' Initialize the STARTUPINFO structure: rcStart.cb = LEN(rcStart) ' Start the shelled application: RetC = CreateProcess(BYVAL %NULL, BasicRoot + "\IISSTOP.BAT", BYVAL %NULL, BYVAL %NULL, 1&, %CREATE_NEW_CONSOLE OR %NORMAL_PRIORITY_CLASS, BYVAL %NULL, BYVAL %NULL, rcStart, rcProcess) ' Wait for the shelled application to finish: RetC = WaitForSingleObject(rcProcess.hProcess, %INFINITE) CALL GetExitCodeProcess(rcProcess.hProcess, RetC) CALL CloseHandle(rcProcess.hProcess)
Hope someone can help.
Greetings
Jeroen
------------------
Comment