Similar Threads:
1.Set 'RunAs' property programmatically for WinForms VB.Net applicat
Hi,
in a .Net 1.1 WinForms application I have a dialog that lets the user set
new network credentials.
Question: How can I assign the new credentials - say nc, defined by
Dim nc = New System.Net.NetworkCredential(M_User, M_Password, M_Domain)
- to the running (VB.Net -) application, so that the application behaves
like being started in 'RunAs' dialog?
Thanks for help in advance!
--
Best regards
Henry
2.how to get the Process Username with runas /netonly
Dear all,
I am trying to get the Process UserName by using System.Enviorment.Username,
I have no problem by normal "run" and by "runas". I can get the process
Username with correct value. However, I try to use "runas /netonly" to
execute the program I developed, I found out that it is returning the local
logon username. But I would like to get the user credential for the remote
access. How?
3.Runas Printer problem
VB6 under Win2K
We have a menu app where we launch applications under different profiles for
security reasons. The problem that arises is when printing. That is, the
default printer is the one under the profile which the application was
launched and not the local user. And we need to have print cabilities for
local user and new profile. The problem is getting to the local profile
printer settings.
So it's like this:
Menu app (as local user) -> Launch App (different profile) -> Need Print
capibilities as local user and profiile app is launched as.
How can I access the local profile's default printer or How can I pick which
profile I want to print from?
Thanks in advance,
Bill
4.How To Handle RUNAS Password Using The Process Object
I'm trying to use the Process object to have RUNAS run DOS commands. I have
no problem getting the Process object to run DOS commands and return the
resulting text back to the program. However, if I'm using RUNAS (e.g. in
order to move files to a protected network share), I run into the problem
that RUNAS requires a two-step process to get it started.
If you're calling RUNAS from the command prompt, after entering the command
line text and hitting ENTER, you're then asked for the password. RUNAS's
command line does now allow you to include the password, so it's a two-step
process.
I've been trying to work with objMyProcess.RedirectStandardInput and
objMyProcess.StandardInput to feed it the password, but nothing seems to be
working.
The following is my code. The MsgBox line returns "Enter password for
MyDomain\MyUsername:RUNAS ERROR: Unable to change echo mode"
Dim p As New Process()
Dim psi As New ProcessStartInfo("C:\WINNT\system32\runas.exe", _
"/profile /user:MyDomain\MyUsername " & """" & "c:\winnt\system32\xcopy.exe
/V /Y C:\MyFile.txt \\MyServer\MyShare\SomeFolder" & """")
psi.UseShellExecute = False
psi.RedirectStandardInput = True
psi.RedirectStandardOutput = True
psi.RedirectStandardError = True
psi.CreateNoWindow = True
p.StartInfo = psi
p.Start()
p.StandardInput.AutoFlush = True
p.StandardInput.WriteLine("MyPassword")
MsgBox(p.StandardOutput.ReadToEnd)
p.StandardInput.Flush()
p.StandardInput.Close()
p.StandardOutput.Close()
p.Close()
p = Nothing
5.Runas
Hello,
I work for a company where the server administrators have two login ID's.
One without admin right that we use to log into our workstations and one with
admin rights that we use to for server administration. A co-worker and I put
together an app in VB.Net that lets us click a button to do things that
require admin rights like opening certain applications. We use runas to open
the app with our admin id's and then any option we select opens using the
admin credentials. Everything works fine with the exception of opening a UNC
path.
process.start(explorer, "\\server\share") 'does nothing
process.start("\\server\share") 'will open the UNC path, but not with
the administrative credentials that the app runs under. We are prompted for
credentials and when we enter the id and password that the app runs under the
path is opened no problem.
Has anyone seen this problem before, or have any suggestions?
Thanks!!
Chad
6. creating "runas" shortcut through vb script
7. Runas command with encrypted password
8. runas substitute