how copy file to remote pc using default share

S

Standist

I want install software on PC in my local network.
First I want copy file to the PC through default share like c$ or d$ on the
PC.
Then install the software through wmi.
I have the administrator and password of every PC.
How can I do this.
 
D

Daniel Fisher\(lennybacon\)

Using ASP.NET ?

--Daniel
http://staff.newtelligence.com/danielf/




-----Original Message-----
From: Standist [mailto:[email protected]]
Posted At: Monday, January 23, 2006 10:05 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: how copy file to remote pc using default share
Subject: how copy file to remote pc using default share

I want install software on PC in my local network.
First I want copy file to the PC through default share like c$ or d$ on
the
PC.
Then install the software through wmi.
I have the administrator and password of every PC.
How can I do this.
 
J

Jay R. Wren

Standist said:
Any idea about this?

I do something similar.

for the file copy, I p/invoke WNetAddConnection2A to authenticate to the
remove share. I copy the file using std. System.IO.File.Copy. Then use
the appropriate System.Management WMI function to start the install
process on the remote computer. Be sure to use the proper automatic
install command line switches.

I hope this helps.
--
Jay R. Wren

[DllImport("mpr.dll")]
public static extern int WNetAddConnection2A(
[MarshalAs(UnmanagedType.LPArray)] NETRESOURCEA[] lpNetResource,
[MarshalAs(UnmanagedType.LPStr)] string lpPassword,
[MarshalAs(UnmanagedType.LPStr)] string UserName,
int dwFlags);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top