I\'m writing some code to utilise a 3rd party component, and I need to supply an object which implements ICredentials when I start to use it.
If I write the following...
if you just want to run a process as the current user adds the verb:
"runas " & Environment.UserName
If you want to run the process as admin just wrote "runas"
in vb.net
Dim ps As New System.Diagnostics.ProcessStartInfo("filepath", "arguments")
ps.Verb = "runas" 'run as admin
'ps.Verb = "runas " & Environment.UserName'run as current user, by default
Dim p As System.Diagnostics.Process = System.Diagnostics.Process.Start(ps)
if you want to get the current user password, you can not, in fact it is an unsafe practice. What right and for what purpose your service needs to get my Windows password secret? for example is like giving the pin code of your phone to whatsapp