Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   how copy file to remote pc using default share (http://www.velocityreviews.com/forums/t117974-how-copy-file-to-remote-pc-using-default-share.html)

Standist 01-23-2006 09:05 AM

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.



Daniel Fisher\(lennybacon\) 01-23-2006 12:25 PM

Re: how copy file to remote pc using default share
 
Using ASP.NET ?

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




-----Original Message-----
From: Standist [mailto:renzp@jnpc.com.cn]
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.



Standist 01-23-2006 01:07 PM

Re: how copy file to remote pc using default share
 
yes of course,so I post here.
"Daniel Fisher(lennybacon)" <info@removethis-lennybacon.com>
??????:001901c62018$162f2450$1401010a@moseisley...
> Using ASP.NET ?
>
> --Daniel
> http://staff.newtelligence.com/danielf/
>
>
>
>
> -----Original Message-----
> From: Standist [mailto:renzp@jnpc.com.cn]
> 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.
>
>




Standist 01-23-2006 01:13 PM

Re: how copy file to remote pc using default share
 
I want publish this function as a webservice so using asp.net.
"Daniel Fisher(lennybacon)" <info@removethis-lennybacon.com>
??????:001901c62018$162f2450$1401010a@moseisley...
> Using ASP.NET ?
>
> --Daniel
> http://staff.newtelligence.com/danielf/
>
>
>
>
> -----Original Message-----
> From: Standist [mailto:renzp@jnpc.com.cn]
> 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.
>
>




Standist 01-24-2006 12:10 AM

Re: how copy file to remote pc using default share
 
Any idea about this?
"Standist" <renzp@jnpc.com.cn> 写入消息新闻:OOenHx$HGHA.2680@TK2MSFTNGP09.phx.gbl ...
>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.
>




Jay R. Wren 01-25-2006 03:17 PM

Re: how copy file to remote pc using default share
 
Standist wrote:
> Any idea about this?
> "Standist" <renzp@jnpc.com.cn> 写入消息新闻:OOenHx$HGHA.2680@TK2MSFTNGP09.phx.gbl ...
>> 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.
>>

>
>


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);


All times are GMT. The time now is 03:55 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.