Results 1 to 7 of 7

Thread: Hide DOS screen

  1. #1

    Thread Starter
    Fanatic Member snufse's Avatar
    Join Date
    Jul 2004
    Location
    Jupiter, FL
    Posts
    912

    Hide DOS screen

    I am doing a ftp in a .net windows application and running FTP commands from a .txt file. Is there a way to supress or not show the DOS screen when executing the application? Thank you.

    Code:
    objShell = CreateObject("WScript.Shell")
    oExec = objShell.exec(cmdFTP & Chr(34) & scriptFolderName & "\" & scriptFileName & Chr(34))
    FTP script File

    PHP Code:
    open 11.111.1.1
    userid
    password
    cd 
    /linuxmachine/data/myproject
    lcd 
    \\sharedfolder\data\myproject
    ascii
    prompt off
    mget P
    *
    disconnect
    bye 

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Hide DOS screen

    Can't you use Run instead of Exec?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Hide DOS screen

    Quote Originally Posted by snufse View Post
    ...I am doing a ftp in a .net windows application...
    Wait a sec.....are you saying that you're writing this VB.Net ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #4
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: Hide DOS screen

    There are built in FTP commands in .NET that you could execute without the need of the Dos window.

    have look at the following classes :

    TcpClient
    NetworkStream

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Hide DOS screen

    Looks like a WSH script to me.

    Who else names variables anything like "objXXXX" anyway? That's a habit derived from Microsoft's internal script kiddies: TechNet box jocky ("admin") types.

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Hide DOS screen

    Quote Originally Posted by dilettante View Post
    ....TechNet box jocky ("admin") types.
    What a colourful description.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  7. #7
    Lively Member
    Join Date
    Dec 2010
    Location
    http://bbat.forumeiro.com/
    Posts
    86


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width