TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Joe Dolamo
NA
4
1.5k
Connecting to a remote server
Jun 10 2015 5:21 AM
Hi
I'm trying to connect to a remote server, but can't seem to get through, here's a code snippet that I used.
var psExecPath = Server.MapPath (~/content/RequredFiles/PsExec.exe);
var MachineName = "\\Machinesname";
var Command = "C:\program Files\MyMachine\My application.exe";
var Execute = "{0} {1},MachineName,Command"
var proc = new Process();
var PSI = new ProcessStartInfo(psExecPath,Execute)
PSI.CreatNoWindow = true;
PSI.RedirectStandartError = false;
PSI.RedirectStandartOutput = true;
PSI.UseShellExecute = false;
PSI.RedirectStandardInput = false;
proc.Startinfo = PSI;
proc.Start();
proc.BeginOutputReadLine();
So basically I want to run "Command" on a cmd from a remote server, but I can't seem to be getting the results. please assist.
Reply
Answers (
1
)
datagrid
replace data in one file with the data in another file