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 :).

Re: FrontPage 2003 Development by Kevin

Kevin
Thu Mar 04 10:38:53 CST 2004

You're talking about apples and oranges here. One is a script on your local
machine which you run. The other is a script in a web browser. The browser
is much more secure, as it can host malicious scripts that hackers and other
devils put on their web sites, and you don't want their scripts to run on
your machine!

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Víctor E. Franquelo Gil" <anonymous@discussions.microsoft.com> wrote in
message news:6d7f01c40204$f0a44a40$a301280a@phx.gbl...
> 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 :).



Re: FrontPage 2003 Development by anonymous

anonymous
Thu Mar 04 11:23:28 CST 2004

Yes, I Know the difference. But I must call a desktop=20
application from an Intranet (created with SharePoint=20
Portal Server). It's impossible to write a Script to do=20
that from a page?... Which is the easiest way?... Thanks=20
again.

>-----Original Message-----
>You're talking about apples and oranges here. One is a=20
script on your local
>machine which you run. The other is a script in a web=20
browser. The browser
>is much more secure, as it can host malicious scripts=20
that hackers and other
>devils put on their web sites, and you don't want their=20
scripts to run on
>your machine!
>
>--=20
>HTH,
>Kevin Spencer
>..Net Developer
>Microsoft MVP
>Big things are made up
>of lots of little things.
>
>"V=EDctor E. Franquelo Gil"=20
<anonymous@discussions.microsoft.com> wrote in
>message news:6d7f01c40204$f0a44a40$a301280a@phx.gbl...
>> 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=20
work
>> inside de Web. This is de code:
>>
>> function ExecCalc() {
>> var WshShell =3D WScript.CreateObject("WScript.Shell");
>> var ReturnCode =3D WshShell.AppActivate("Calculator");
>> if (ReturnCode =3D=3D 0) {
>> WshShell.Run("calc", 1, false);
>> }
>> else {
>> WshShell.SendKeys("^+m");
>> }
>> }
>>
>> The problem is an error message, just after the=20
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=20
before
>> invoking its properties and methods, and it is always
>> available from any script file" (from
>> http://msdn.microsoft.com/library/default.asp?
>> url=3D/library/en-us/script56/html/wsObjWScript.asp).
>>
>> Anyway, I'd like to think that it's easier to do than=20
the
>> JavaScript way, isn't it?.
>>
>> Thanks a lot :).
>
>
>.
>

Re: FrontPage 2003 Development by Kevin

Kevin
Thu Mar 04 11:40:22 CST 2004

ActiveX control or Java Applet. Both of these are executables that run on
the client.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Víctor E. Franquelo Gil" <anonymous@discussions.microsoft.com> wrote in
message news:6eb801c4020d$686ed1a0$a001280a@phx.gbl...
Yes, I Know the difference. But I must call a desktop
application from an Intranet (created with SharePoint
Portal Server). It's impossible to write a Script to do
that from a page?... Which is the easiest way?... Thanks
again.

>-----Original Message-----
>You're talking about apples and oranges here. One is a
script on your local
>machine which you run. The other is a script in a web
browser. The browser
>is much more secure, as it can host malicious scripts
that hackers and other
>devils put on their web sites, and you don't want their
scripts to run on
>your machine!
>
>--
>HTH,
>Kevin Spencer
>..Net Developer
>Microsoft MVP
>Big things are made up
>of lots of little things.
>
>"Víctor E. Franquelo Gil"
<anonymous@discussions.microsoft.com> wrote in
>message news:6d7f01c40204$f0a44a40$a301280a@phx.gbl...
>> 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 :).
>
>
>.
>