V
Víctor E. Franquelo Gil
Hi All.
I'm working with FrontPage 2003 and SharePoint Portal
Server 2003, creating an enterprise portal.
I've a problem calling a desktop application from a
FrontPage Web. This JavaScript works OK alone
(calling "Calculator" from Windows), but it doesn't work
inside de Web. This is de code:
function ExecCalc() {
var WshShell = WScript.CreateObject("WScript.Shell");
var ReturnCode = WshShell.AppActivate("Calculator");
if (ReturnCode == 0) {
WshShell.Run("calc", 1, false);
}
else {
WshShell.SendKeys("^+m");
}
}
The problem is an error message, just after the function
call: 'WScript' not defined. But... "The WScript object
is the root object of the Windows Script Host object
model hierarchy. It never needs to be instantiated before
invoking its properties and methods, and it is always
available from any script file" (from
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/script56/html/wsObjWScript.asp).
Anyway, I'd like to think that it's easier to do than the
JavaScript way, isn't it?.
Thanks a lot .
I'm working with FrontPage 2003 and SharePoint Portal
Server 2003, creating an enterprise portal.
I've a problem calling a desktop application from a
FrontPage Web. This JavaScript works OK alone
(calling "Calculator" from Windows), but it doesn't work
inside de Web. This is de code:
function ExecCalc() {
var WshShell = WScript.CreateObject("WScript.Shell");
var ReturnCode = WshShell.AppActivate("Calculator");
if (ReturnCode == 0) {
WshShell.Run("calc", 1, false);
}
else {
WshShell.SendKeys("^+m");
}
}
The problem is an error message, just after the function
call: 'WScript' not defined. But... "The WScript object
is the root object of the Windows Script Host object
model hierarchy. It never needs to be instantiated before
invoking its properties and methods, and it is always
available from any script file" (from
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/script56/html/wsObjWScript.asp).
Anyway, I'd like to think that it's easier to do than the
JavaScript way, isn't it?.
Thanks a lot .