Re: wscript shell run
From: Viatcheslav V. Vassiliev (msnewsgroup_at_www-sharp.com)
Date: 06/10/04
- Next message: Cap: "Re: variable number of object references.."
- Previous message: sumGirl: "tree like menu and hta in or with frames"
- In reply to: jim: "wscript shell run"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Jun 2004 20:23:16 +0400
What is this program? You pass URL as parameter - if your program is able to
open file from Internet using parameter in command line, this will work. If
not, solution will be program specific - look documentation for your program
on how to load (open) file from Internet. May be this program will be not
able to open URL.
//------------------------------------
Regards,
Vassiliev V. V.
http://www-sharp.com -
Scripting/HTA/.Net Framework IDE
"jim" <jim@discussions.microsoft.com> сообщил/сообщила в новостях следующее:
news:1D4B370C-335C-40A9-A5EF-2FA748339861@microsoft.com...
> I have posted a question about how to use run method a few days ago. I
just moved my post here to continue my question.
>
> I copy your code, saved it as asp file. It worked! Now I can open a file
on client with a program on client.
> What I really want is to open a file(through virtual directory) on server
from a specified program on client.
> I tried something below. It didn't work.
> Is it possible to open a file through virtual directory?
>
> <html>
> <head>
> <script language=vbscript>
> Dim WshShell, intReturn
> Set WshShell = CreateObject("WScript.Shell")
> intReturn = WshShell.run("C:\blueview.exe
http://65.16.192.174/logs/test.tif")
> </script>
> </head>
> <body>
> test
> </body>
> </html>
> "Al Dunbar [MS-MVP]" wrote:
>
> >
> > "Viatcheslav V. Vassiliev" <msnewsgroup@www-sharp.com> wrote in message
> > news:exs4AYkTEHA.4048@TK2MSFTNGP12.phx.gbl...
> > > You have some errors. At first, script language you use is vbscript,
not
> > > javascript. It will run only on IE (vbscript is not supported in other
> > > browsers). At second, WScript object is not available in script if it
is
> > > executed by anything other than wscript.exe or cscript.exe. At third,
> > > Windows directory could be not C:\WinNT on client computer.
> >
> > At fourth you will need to take the regretable step of lowering browser
> > security in order to allow it to run an executable on the client.
> >
> > /Al
> >
> > > This one will work from IE:
> > >
> > > <html>
> > > <head>
> > > <script language=vbscript>
> > > Dim WshShell, intReturn
> > > Set WshShell = CreateObject("WScript.Shell")
> > > intReturn = WshShell.run ("notepad.exe")
> > > </script>
> > > </head>
> > > <body>
> > > test
> > > </body>
> > > </html>
> > >
> > > System(32) is in PATH, so it is not neccessary to specify directory.
> > >
> > > //------------------------------------
> > > Regards,
> > > Vassiliev V. V.
> > > http://www-sharp.com -
> > > Scripting/HTA/.Net Framework IDE
> > >
>
>
>
- Next message: Cap: "Re: variable number of object references.."
- Previous message: sumGirl: "tree like menu and hta in or with frames"
- In reply to: jim: "wscript shell run"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|