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. Simple C # Solution Help

Simple C # Solution Help

Scheduled Pinned Locked Moved C#
helpcsharptools
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.
  • H Offline
    H Offline
    Hulicat
    wrote on last edited by
    #1

    I am new to C# and struggling with what should be a simple solution. Problem: I am running a batch file that calls a script executing a MOSS STSADM operation, however; the operation does not allow me to pass certain parameters thus it will prompt for certain arguments. What I am trying to do: Execute the batch file within C# and pass the parameters so that it does require any user action. I have tried various approaches and I am just spinning in circles any suggestions as to the “frame work” would be greatly appreciated. Thanks

    P R 2 Replies Last reply
    0
    • H Hulicat

      I am new to C# and struggling with what should be a simple solution. Problem: I am running a batch file that calls a script executing a MOSS STSADM operation, however; the operation does not allow me to pass certain parameters thus it will prompt for certain arguments. What I am trying to do: Execute the batch file within C# and pass the parameters so that it does require any user action. I have tried various approaches and I am just spinning in circles any suggestions as to the “frame work” would be greatly appreciated. Thanks

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Use Process.Start[^] to execute a batch file with optional arguments.

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      H 1 Reply Last reply
      0
      • P pmarfleet

        Use Process.Start[^] to execute a batch file with optional arguments.

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        H Offline
        H Offline
        Hulicat
        wrote on last edited by
        #3

        Thanks for that, I am using process.start and it seems to pass the arguments to the batch which executes. However, I tried to answer the prompts that followed by accessing stdin but the only argument that seems to get passed is the "Enter Key". Any thoughts as to where I am going wrong? Thanks, Dennis

        Regards, Hulicat

        1 Reply Last reply
        0
        • H Hulicat

          I am new to C# and struggling with what should be a simple solution. Problem: I am running a batch file that calls a script executing a MOSS STSADM operation, however; the operation does not allow me to pass certain parameters thus it will prompt for certain arguments. What I am trying to do: Execute the batch file within C# and pass the parameters so that it does require any user action. I have tried various approaches and I am just spinning in circles any suggestions as to the “frame work” would be greatly appreciated. Thanks

          R Offline
          R Offline
          Ravenet
          wrote on last edited by
          #4

          hi just use the process class and pass the args

          Cheers,Earn and Enjoy RRave MCTS,MCPD http://ravesoft.blogspot.com

          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