Re: vbscript fails to start windows application

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Ray at <%=sLocation%> [MVP] (%=sLocation%)
Date: 02/19/04


Date: Wed, 18 Feb 2004 21:26:10 -0500

Ah, alright. So, then, what, nothing happens at all? Do you have antivirus
software installed with script-blocking enabled? And you're sure those
lines are executing?

msgbox "About to create"
Set sh = CreateObject("Wscript.Shell")
msgbox "Created? Vartype is " & VarType(sh)
sh.run "D:\Games\bf1942\BF1942.exe"
msgbox "Should have run."
Set sh = nothing
msgbox "sh is now nothing"

-- 
Ray at home
Microsoft ASP MVP
"Magnus" <no@spam.com> wrote in message news:40341db3@news.broadpark.no...
>
> "Ray at <%=sLocation%> [MVP]" <Too many private support requests - Ask for
> it if needed> skrev i melding
> news:%23%23mOvvo9DHA.1596@TK2MSFTNGP10.phx.gbl...
> > Drop "start" from your command.  Start is not an executable or a file.
> It's
> > a command within the cmd command interpreter.  Or, if you want to use
> start
> > (shouldn't be necessary), use "cmd.exe /c start D:\..\..2.exe"
> >
>
> Sorry, my bad.
> That is _without_ the start, the one I posted here is bound to fail, and
not
> my initial problem. It was just while experimenting I did this.
>
> So the corrected will be, still fails to fully start the application:
>
> Set sh = CreateObject("Wscript.Shell")
> sh.run "D:\Games\bf1942\BF1942.exe"
> Set sh = nothing
>
> - Magnus
>
>


Relevant Pages

  • Re: vbscript fails to start windows application
    ... lines are executing? ... msgbox "About to create" ... >> a command within the cmd command interpreter. ... > That is _without_ the start, the one I posted here is bound to fail, and ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: wait for user action in VBA code
    ... You would need to interact with the user with an inputbox, msgbox, or ... userform and take the appropriate action. ... clever use of events and so forth may allow you to achieve your ... > Is there a way in VBA to stop executing the code, ...
    (microsoft.public.excel.programming)
  • Error Running Code
    ... I am recieving the following error when executing the following code in a ... Run-time error '2427': ... Private Sub Report_Open ... "MsgBox Me.chkPending" i get the same error. ...
    (microsoft.public.access.modulesdaovba)
  • Re: For Each Next Loop
    ... MsgBox rng1.Address ... Best wishes Harald ... > For Each cll In rng1 ... > the code is executing on elements outside of the specified group. ...
    (microsoft.public.excel.programming)
  • Re: vbscript equivalent to localtime() ?
    ... MUST include both or they will fail). ... "mario" wrote in message ... > MsgBox FormatDateTime ... >> Steven Burn ...
    (microsoft.public.scripting.vbscript)