shell command

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lee Kok Onn

    #1

    shell command

    I have write the following command in visual studion visual basic 2005.

    shell("runas /user:admin diskpart") to set the hard disk partition.

    it will prompt user to type a password in dos prompt, is there anywhere I
    can integrate the password in this program so that user will not see the
    prompting.

    Pls advice. Thanks


  • Newbie Coder

    #2
    Re: shell command

    Lee,

    You'll be crazy to incorporate the admin password into your program because
    it'll be echoed on screen. Plus, if your application fell over its proned to
    be able to retrieve the password.

    The thing going for you in that respect is the secure string command, but
    again if your app crashes between entering the password & zero memory you
    are at risk

    The only thing I can see is if you call the bit of code that holds your
    encrypted password is in the admin 'application data' area so no other non
    admins can get to it, but it still doesn't hide your password. Maybe, you
    can create a console app or similar & call that from your code. At least you
    should be able to mask the output

    Surely there is another way, but I cannot see it at this stage

    --
    Newbie Coder
    (It's just a name)


    Comment

    • Lee Kok Onn

      #3
      Re: shell command

      Actually I need to set a partition 1 to active, besides using the dos
      command, is there coding in vb which I can set the partition.



      "Newbie Coder" <newbiecoder@sp ammeplease.comw rote in message
      news:OJogA4FSHH A.2256@TK2MSFTN GP02.phx.gbl...
      Lee,
      >
      You'll be crazy to incorporate the admin password into your program
      because
      it'll be echoed on screen. Plus, if your application fell over its proned
      to
      be able to retrieve the password.
      >
      The thing going for you in that respect is the secure string command, but
      again if your app crashes between entering the password & zero memory you
      are at risk
      >
      The only thing I can see is if you call the bit of code that holds your
      encrypted password is in the admin 'application data' area so no other non
      admins can get to it, but it still doesn't hide your password. Maybe, you
      can create a console app or similar & call that from your code. At least
      you
      should be able to mask the output
      >
      Surely there is another way, but I cannot see it at this stage
      >
      --
      Newbie Coder
      (It's just a name)
      >
      >

      Comment

      Working...