• Hello and welcome to our new forums. We upgraded our forum sites to a more robust and modern system which we hope you will enjoy. Be sure to check out your profile by clicking the button on the top right and configure your preferences, signature, time zone, avatar, etc. as you wish. If you need help with using this new forum'ware try the help link on the bottom right.

    Click here to review your account now.

execute a "form" from another account

gregoire77

New member
Joined
Sep 19, 2018
Messages
2
Programming Experience
Beginner
Hello everyone,

I introduce myself, my name is Greg. I am stuck on an application that we use for "Windows" account creations. I must be able to execute a "form" from another account. When can I do? I thought I would use a "process.startinfo" but I could not indicate the "file" ... thank you for your help.

here is the code that poses me problem, the "showDialog" option was used before a change of account


System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.Arguments = "";
proc.StartInfo.Domain = useradmin.Domaine;
proc.StartInfo.UserName = useradmin.Login;
proc.StartInfo.Password = useradmin.Password;
proc.StartInfo.LoadUserProfile = true;

proc.Start();


// Application.EnableVisualStyles();
// Application.SetCompatibleTextRenderingDefault(false);
// Application.Run(new formulaire_1());

// var application = new formulaire_1();
// application.ShowDialog();
 

gregoire77

New member
Joined
Sep 19, 2018
Messages
2
Programming Experience
Beginner
Hello,
Thank you for your answer, however my problem is the following.
The first "FORM" must be executed with the "user windows current", then in a second time the "FORM2" must be it with a specific user. I tried to set up the "impersonation" without result to date.
 
Top Bottom