Reputation: 1670
OS: Windows Language: C#/C/C++
Does anyone know how to open a file in Remote computer. I could find few samples for unix but not for windows. Thanks for your help.
Upvotes: 0
Views: 3069
Reputation: 941437
You simply specify the UNC name of the file in your fopen() statement. Like //server/share/filename. The remote machine must be configured to support file sharing and the user account under which your program runs must have sufficient access rights. If "remote" means through the Internet then you have to use one of the standard Internet protocols. FTP or HTTP are typical.
Upvotes: 1
Reputation: 47038
You can use PsExec to execute commands on a remote computer, on a specific session if you like.
PowerShell is another alternative. You can call PowerShell scripts from within C#.
Upvotes: 0