Re: wscript shell run

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Viatcheslav V. Vassiliev (msnewsgroup_at_www-sharp.com)
Date: 06/10/04


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
> > >
>
>
>



Relevant Pages

  • Re: RWW Disconnecting
    ... I understand that remote client encounts following error message when RWW ... I strongly suggest that we rerun the Configure E-mail and Internet ... 825763 How to configure Internet access in Windows Small Business Server ...
    (microsoft.public.windows.server.sbs)
  • RE: Internet Printing
    ... that the option "Connect" is missing no matter the client is from internal ... it appears that IIS Internet Printing on Windows Server 2003 is ... To verify, install IIS ...
    (microsoft.public.windows.server.sbs)
  • Re: RWW Disconnecting
    ... I have been connected from a remote site for about 3 ... DHCP server and even a wireless access ... the key codes to for Internet access. ... Client Workstations} ...
    (microsoft.public.windows.server.sbs)
  • Re: IIS and client certificate
    ... You could create a second virtual directory and point it ... For internet I would secure witch client certificate. ...
    (microsoft.public.inetserver.iis.security)
  • RE: RWW not accessible over web
    ... Can the client access Internet web sites when you ... Extract all files to a folder on ISA server. ... 'Microsoft Firewall' service. ...
    (microsoft.public.windows.server.sbs)