I would like to know how to code into my program automatic authorization across a UNC connection. I have .config files on other pc's in a Microsoft Active Directory network environment that need to be changed from time to time.
So let's say there is a pc called POS151 on the network and I need to change some text in a file on that pc....I would like to know how to program authentication to POS151 so I can access the following path and alter said file - \\POS151\C$\Program Files\SpecificProgram\file.config - I have written a VB program that can do that, but only after I authenticate a connection to the pc first. So in order for me to make my program work I have to click Start>Run>\\POS151\C$ and type in my admin username and password. Anybody know how I can put this part into my program so I don't have to manually authenticate first
Thanks,
Arkman5

validating username/password across the network for \\pcName\c$ connection
Streetsmart
System.IO.StreamReader(selected_file)
where selected_file is the variable I mentioned above that is taking on the directory path
WarrenB
Thanks for the reply, Mike. I did look up the filewebrequest class, but I couldn't see any way to accomplish what I need. I'm still new, so I'm probably missing it somewhere, but thanks for the reply anyway. I'm running the program as an administrator and letting AD worry about the security properties. Seems to be a safer way to do things anyway.
Thanks,
Arkman5
Rajesh_B
Mitch0820
I figured this one out by myself - he he he.... 322 reads of this thread and not 1 person was able to even comment.... maybe a little more difficult question than I figured... anyway, since I have administrative rights on my network, all I needed to do was run the program under an administrator profile and it automatically assigned me the same security rights to access files across the network - still don't know how I would have programmed that in, but it is most likely safer this way anyway.
Arkman5