Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Copy and paste from server to remote PC in network

$
0
0
Hello to all. I was wondering if someone could point me in the right direction to solving a problem I'm having in VB.NET. I am attempting to make an app that will copy a file (most times an icon) from our server and pasting it onto a remote users PC on the network. I work in the IT department in the service desk and I would say that at least 30% of my calls are people that have for some reason or other have lost an icon they need. I created a main form, and put a text box and coresponding button. I would like it so that I would only have to input their computer number (example wxp*****)
and press the button to send the file. My code thus far is:

 Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComputerNumber.TextChanged

        Dim PCNumber As String
        PCNumber = Me.ComputerNumber.Text

    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

        Dim PCNumber As String
        PCNumber = Me.ComputerNumber.Text

        My.Computer.FileSystem.CopyFile("\\intranet1\sd\SDReferenceTool\Files\Shortcuts - Popular\SCM Shortcuts\SCM 5.5 PROD.ICA", "\\PCNumber\C$\Documents and Settings\All Users\Desktop\SCM 5.5 PROD.ICA")

    End Sub


When trying to debug, I get the following error. IOException was unhandled. The network path was not found. However, the app will launch but is doesn't work.

I double-checked the server address and it is correct. The only thing I can think of is that I screwed up the textbox somehow so it is not entering in the PC number like I had intended. I have admin rights on my workstation and can share remotely using the path in the run command. Any pointers is as always appreciated.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>