Re: VB6 Shell Question

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

From: Karl E. Peterson (karl_at_mvps.org)
Date: 06/23/04


Date: Wed, 23 Jun 2004 15:28:08 -0700

Nathan Perkins <NPerkins@maxmo.net> wrote:
> That helps a lot, but I am still having some minor problems.
>
> I have decided to just write my program for 2000 and XP, so I can redirect
> stderr, but due to the complexity of my command, it doesn't execute.
>
> My shell command essentially ends up as:
>
> cmd.exe /c "C:\Software Projects\current\blah.exe" -x "C:\Documents and
> Settings\Nathan Perkins\My Documents\some text file.txt" > "C:\Software
> Projects\current\output.tmp" 2>&1
>
> In the end, a command window opens but that is it. I think that I need to
> escape certain characters. Any idea?

What's that 2>&1 at the end of that string? Usually pipes, not redirects, are used
if there's that much going on.

Anyway, maybe what you want to do is perfect the command in an interactive session,
then have your application write a temporary batch file and shell to that?

Later... Karl

-- 
[Microsoft Basic: 1976-2001, RIP]


Relevant Pages

  • Re: Redirecting lpt1 output to an installed printer
    ... to the lpt1 port. ... I am doing now is to redirect the output using the "net use" ... If there's a recognized printer on that port, ... which I do via a "net use LPT1" command inside a batch file. ...
    (microsoft.public.vb.general.discussion)
  • Re: How to capture "legacy" program output in MSH and redirect them to MshHostUserInterface
    ... command is redirected in the script or not. ... to see if the output of the script command is the default output pipe. ... The workaround is to always explicitly redirect native ... RedirectAlways flag on the runspace that will cause legacy applications to ...
    (microsoft.public.windows.server.scripting)
  • Re: net use script issue with terminal server and DFS
    ... redirect stdout into NUL ... command will be redirected to NUL, ... But it should give you an error message when you execute the same ...
    (microsoft.public.windows.terminal_services)
  • Re: Dos quit printing yesterday
    ... redirect via the net use command without sucess. ... >With the spooler job window open, ... when attermpting to print from a "command prompt" window. ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Copying silently.
    ... It ought to be possible to redirect standard output and error ... so as to ReDirect both StdIn & StdErr for a Command, ... executes only if the first command did not complete successfully. ...
    (uk.people.silversurfers)