Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Control Message Box

Control Message Box

Scheduled Pinned Locked Moved C#
csharpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    satsumatable
    wrote on last edited by
    #1

    Hi I've C# Windows which has some message box to prompt some info. I'm trying to invoke this from DOS (batch file) at that time i just want to skip all the prompt message boxes. Is there anyways to do it from DOS? Thanks

    E V 2 Replies Last reply
    0
    • S satsumatable

      Hi I've C# Windows which has some message box to prompt some info. I'm trying to invoke this from DOS (batch file) at that time i just want to skip all the prompt message boxes. Is there anyways to do it from DOS? Thanks

      E Offline
      E Offline
      Eric eD
      wrote on last edited by
      #2

      Would you mind providing more clarification? Are you trying to invoke an existing application (.exe) from a DOS batch file. Or are you invoking a method within the program.

      S 1 Reply Last reply
      0
      • E Eric eD

        Would you mind providing more clarification? Are you trying to invoke an existing application (.exe) from a DOS batch file. Or are you invoking a method within the program.

        S Offline
        S Offline
        satsumatable
        wrote on last edited by
        #3

        Im trying to access existing application from DOS. Exactly saying am trying to create virtual directory using the following commands cd C:\WINDOWS\system32 IISVDir.vbs IIsVDir /create "Default Web Site" App C:\Inetpub\wwwroot\App IIsVDir /create "Default Web Site" AppService C:\Inetpub\wwwroot\AppService IIsVDir /create "Default Web Site" ServiceRequest C:\Inetpub\wwwroot\ServiceRequest But for every line it asks confirmation so Im just trying to automate it with some predefined parameters. Thanks ....

        1 Reply Last reply
        0
        • S satsumatable

          Hi I've C# Windows which has some message box to prompt some info. I'm trying to invoke this from DOS (batch file) at that time i just want to skip all the prompt message boxes. Is there anyways to do it from DOS? Thanks

          V Offline
          V Offline
          V 0
          wrote on last edited by
          #4

          If I understand correctly you're trying to close 'popups' that appear from another application, right? In that case you'll need to import some windows dll's (winapi) (I think you'll need the user32.dll, but I'm not sure) that expose the Windows functions like FindWindows, GetDlgText, etc... With those functions you'll need to: 1: Find the correct window (probably need a loop that will redo this every x seconds) 2: if window is open (= encountered in step 1), press the button (Yes, No, OK, Cancel) I don't know the exact function for this, but it exists. avoid closing or killing the msgbox, instead try to let the msgbox handle itself by using one of the closing buttons. You'll have to find the correct functions and signatures on MSDN, but there is a lot of info out there about this topic.

          V.
          Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups