954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Windows Identity

Hello All,

I am copying file from one machine to another machine
after that execute that file on remote computer using c#.

I am using below command to copy file
File.Copy(sourcePath, DestinationPath, true);

and

ManagementClass remote_Class = new ManagementClass ("\\machineName\root\\cimv2:Win32_Process");
object[] remoterun = { destPathwithFileName, null, null, 0 };
remote_Class.InvokeMethod("Create", remoterun);

to execute that executable on remote machine.

Now I code in which I can provide domain\username and password.
I want that process to be executed by domain user on remote machine
Or process to be executed by username and password which I've provided in code.

I don't want to use LogOnUser()

##k.k##
Newbie Poster
6 posts since Aug 2009
Reputation Points: 3
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: