Hi all,
We have developed a VFP application that was working as a 'wrapper' to another client/server application. The parent application has now been rewritten using IIS and Active Server Pages as the 'client' access to the SQL Database and we would like to be able to launch our out of process exe from the ASP pages. I thought that the Windows Script Host and its 'Run' method would get us there when called from a VBScript applet imbedded in one of the ASP pages. I am using the following VBScript code to get the WSH running:
<SCRIPT LANGUAGE=vbscript>
Function StartWSH()
' This fires to bring up the CHC Registration screen
Dim oShell
oShell = CreateObject("WScript.Shell")
oShell.Run("vfpapp.exe")
End Function
</SCRIPT>
When I load the ASP page, it loads OK. When I click on the button that calls this function from within the ASP Page I get the following error:
VBScript runtime error: Active X component cannot create object "WScript.Shell".
Yet, when I execute these commands from a VFP command window, it fires the program just as I expected.
Anyone have some advice as to what was done wrong?
Appreciate the help.
CySolutions, Medical Information Technology
You're only as good as your last
success, so . . .If it works. . .don't fix it!