shell command

  • Thread starter Thread starter Lee Kok Onn
  • Start date Start date
L

Lee Kok Onn

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
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top