Re: Need suggestion how to hide ugly black command prompt window

Tech-Archive recommends: Speed Up your PC by fixing your registry




No that was just an example, we use CMDresutls function for other
things too.
The point is to retrieve the result without black command prompt
window.

Jim wrote:
if all youre doing is copying files, why not just use the file copy methods
available to vbscript??
then you dont have to deal with command windows period


<delfincek28@xxxxxxxxx> wrote in message
news:1152787238.263662.112090@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

There are some scripts we use for transfering data, and they look
something like this:

...

Function CMDResults(cmdline)
Set oShell = CreateObject("WScript.Shell")
Set oExCmd = oShell.Exec(cmdline)
Set oExCmdStdOut = oExCmd.StdOut

Do: WScript.Sleep 10
Do Until oExCmdStdOut.AtEndOfStream
CmdResults = CmdResults & oExCmdStdOut.ReadAll
Loop
Wscript.Sleep 1000
Loop Until (oExCmd.Status <> 0 and oExCmdStdOut.AtEndOfStream)
Logiraj cmdline
Logiraj CMDResults
End Function

...main program starts here...

Do While Not (txtStream.atEndOfStream)
Linija = txtStream.ReadLine
sExec = "cmd /c copy X:\transfer\tra\out\" & Linija & " c:\tran\S" &
p_sifra & "\PRIHVAT /Y" & Chr(13) & Chr(10)
sResult = CMDResults(sExec)
If InStr(1,LCase(sresult),"1 file(s) copied") > 0 Then
...what to do if copying a file succeded...
End If
Loop
Set oFSO = Nothing
...

What this script does it copy file via plain "cmd /c copy" and retrieve
result, so if result incorporates "1 file(s) copied" then copying a
file if considered success, otherwise not.
The problem is with this ugly black command prompt that pops up.
Is there a way i can hide the command prompt window or could I have
done this some other way?

Thank you,
Drazen


.



Relevant Pages

  • Re: Zip Files are Blocked
    ... > tool Streams.exe to purge any streams from the files after they are ... when you want to clean out all the streams in files in a folder ... > Then open an Explorer window (place the window so it doesn't cover the ... > command prompt completely) and in Explorer locate the folder you want ...
    (microsoft.public.windowsxp.security_admin)
  • Re: DOS applications ?
    ... correct about the /C parameter for the command prompt. ... trying to click on the close button for that window. ... The last I looked at MS-DOS, version 6.x, you could not "open a second command prompt ...
    (microsoft.public.vc.mfc)
  • Re: Command prompt is displayed briefly, then disappears
    ... The command prompt appears briefly when I try to run ipconfig, no matter how I try to run it, including the path you suggested. ... The command prompt and regedit window do not appear at all. ... the windows task bar goes away as if I had used Task Manager to stop the explorer.exe process. ... If System Restore no longer works then a manual System Restore might fix the problem - see here: http://support.microsoft.com/kb/307545. ...
    (microsoft.public.windowsxp.general)
  • Re: Problem with 1 of 4 computers using MN-500 Router
    ... : Ethernet adapter local area connection: Media state: media disconnected, ... This will help you to copy text from your command prompt. ... Left-click the control menu (top left corner of your command prompt window), ... I tried the XP network setup and I just don't know what else to ...
    (microsoft.public.windows.server.networking)
  • Re: Width of Command Prompt (DOS) EDIT Window ??
    ... It's likely that the width of the Command Prompt - Edit window ... is hardwired in the DOS Editor to 80 columns, and it's not worth the effort ... The defficulty is related to the Command Prompt - Edit window. ...
    (microsoft.public.windowsxp.general)