473,378 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Prompting for password on process.start.

I am writting a program that has a button that a user can click to start
isntalltions of various software across the network. Some of the software is
on a network share that is password protected. I need the program to prompt
for a username and password if it tries to start the program and needs
authentication. This should appear in practically the same way as if the user
had typed the network path into their run box. If the user isn't
authenticated to the server it prompts for the username and password.
Nov 16 '05 #1
1 3608
In short, very carefully, since getting a user's password is serious
business :)

The best way is to PInvoke CredUIPromptForCredentials. This is only
available on XP and 2003, however.

There is some sample code here (in VB.NET):
http://msdn.microsoft.com/vstudio/us...redentials.asp

Keith Brown has some good suggestions here:
Item 71: How to prompt for a password
http://www.pluralsight.com/keith/boo...promptpwd.html
He is using managed C++ to call CredUIPromptForCredentials.

Let me know if this helps,

--
Scott
http://www.OdeToCode.com

On Fri, 13 Aug 2004 13:55:04 -0700, "Jefferson Cowart"
<Je*************@discussions.microsoft.com> wrote:
I am writting a program that has a button that a user can click to start
isntalltions of various software across the network. Some of the software is
on a network share that is password protected. I need the program to prompt
for a username and password if it tries to start the program and needs
authentication. This should appear in practically the same way as if the user
had typed the network path into their run box. If the user isn't
authenticated to the server it prompts for the username and password.


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: toby | last post by:
Can any one help? I'm trying to use System.Diagnostics.Process.Start to open legacy MS access aplications (ade and mdb files) and vb 6 .exe's using asp.net. There is something confusing going on?!?...
5
by: mg | last post by:
The following .exe and its parameters work correctly from the command prompt (it prints x.pdf without prompting the user. acrord32.exe /t "c:\exportfiles\x.pdf" "HP LaserJet 3300 Series PCL 6"...
5
by: Robert Megee | last post by:
I can't get Process.Start() to work from a Web application. Is this because of the security settings in the browser? Since this is for a private network, security isn't an issue. Anyone know how...
2
by: PAPutzback | last post by:
I am trying to decrpyt a gpg encrypted file but the process prompts for a password. The Process.start function is run in a service so I want to be able to pass the password without any user...
0
by: henning.friese | last post by:
Hello NG, I'm need to write some code which creates tiff files from various document types (doc, pdf, xls). I want to do this by ShellExecuting (via System.Diagnostics.Process) the doc-files...
0
by: Paul | last post by:
Hi, I'm trying to kick off the iiscnfg.vbs from a webservice to export a website's config to an xml file (And eventually populate other servers with the config). I initially tried this using the...
0
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then, Process.Start throws an Access is Denied Exception. This is with .NET 2.0, of course...
6
by: Alexander Widera | last post by:
hello, if i start a program (an exe-file) with Process.Start(...) I don't have the required permissions that the programm needs (i could start the programm but the program needs special rights)....
10
by: Stephany Young | last post by:
When one uses the System.Diagnostics.Process.Start method to launch a common or garden Console application, one can set the WindowStyle property of the StartInfo object to ProcessWindowStyle.Hidden...
4
by: =?Utf-8?B?Tm9yZW1hYw==?= | last post by:
Here is what I am trying to get to: I have a console exe that grabs information from the network and writes to an XML file on the website that web pages then render information from. The console...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.