Antinome Posted October 22, 2010 Report Share Posted October 22, 2010 Perhaps this is an easy question but I'm banging my head against a wall. Trying to monitor files on a bunch of production test computers that operators have access to. I have a computername, login name for a local admin, and password for each computer. Obviously if my IT department would configure any one account as the admin of all these computers I could access it that way, but they won't. The files are all in a common location on each computer, say \\computername\c$\etc Windows will cache the login/password of each computer if I go there first manually, and then it works. But that doesn't allow me to share the file monitoring tool with anyone else. Is there a way to specify for each directory path exactly what windows user I want it to connect as? Quote Link to comment
ShaunR Posted October 22, 2010 Report Share Posted October 22, 2010 Perhaps this is an easy question but I'm banging my head against a wall. Trying to monitor files on a bunch of production test computers that operators have access to. I have a computername, login name for a local admin, and password for each computer. Obviously if my IT department would configure any one account as the admin of all these computers I could access it that way, but they won't. The files are all in a common location on each computer, say \\computername\c$\etc Windows will cache the login/password of each computer if I go there first manually, and then it works. But that doesn't allow me to share the file monitoring tool with anyone else. Is there a way to specify for each directory path exactly what windows user I want it to connect as? Easiest way is to "map" a network drive and use different credentials. Then you wil end up with X:, Y:,Z: mapped to the different accounts either to the same remote dir or different ones. Quote Link to comment
jdunham Posted October 22, 2010 Report Share Posted October 22, 2010 A more 'modern' and reliable way to do this would be to turn or LabVIEW Web Services IIS or some other web server on each computer, and configure it to serve up the data on request. IT department can seem crazy, but making sure each computer can serve port 80 requests is a lot more secure than allowing random other computers to access \host\c$. It seems like your system is already 98% complete, but if not I wanted to suggest it. Jason Quote Link to comment
Antinome Posted October 22, 2010 Author Report Share Posted October 22, 2010 A more 'modern' and reliable way to do this would be to turn or LabVIEW Web Services IIS or some other web server on each computer, and configure it to serve up the data on request. IT department can seem crazy, but making sure each computer can serve port 80 requests is a lot more secure than allowing random other computers to access \host\c$. It seems like your system is already 98% complete, but if not I wanted to suggest it. Jason I could do it with a tftp server or something like that, but really i was trying to avoid having to go around and install/configure files on ~60 computers. The number of computers also makes the mapped network drive method less than ideal... can you even have a AZ: drive? Also mapped drives aren't transportable... i couldn't give the program to my fellow engineers. The thing about this is I can already access \\host\c$ on these computers... using different names and passwords I already have. There must be some sort of windows api call that does what I'm looking for. Quote Link to comment
asbo Posted October 22, 2010 Report Share Posted October 22, 2010 You could use a SystemExec call within your app to create the network share, if even just while you were actually going to do I/O: `net use [driveletter] [sMBpath] /user:[username] [password]`. When you're done, just call `net use [driveletter] /delete`. Quote Link to comment
Phillip Brooks Posted October 22, 2010 Report Share Posted October 22, 2010 Why not store the files on a common server? \\servername\AppName\StationName1\Datafile1.dat \\servername\AppName\StationName1\Datafile2.dat \\servername\AppName\StationName2\Datafile1.dat \\servername\AppName\StationName2\Datafile2.dat The files can be backed up by IT, and access is defined by network, not local account names and shares. Local networking shares with read/write access is one of the most common methods that viruses (virii?) spread... Quote Link to comment
Antinome Posted October 22, 2010 Author Report Share Posted October 22, 2010 Why not store the files on a common server? \\servername\AppName\StationName1\Datafile1.dat \\servername\AppName\StationName1\Datafile2.dat \\servername\AppName\StationName2\Datafile1.dat \\servername\AppName\StationName2\Datafile2.dat The files can be backed up by IT, and access is defined by network, not local account names and shares. Local networking shares with read/write access is one of the most common methods that viruses (virii?) spread... I'm not maintaining datafiles- I'm maintaining desktop links to applications and work instructions- which are on the network. If IT was using Active Directory ... I'd use that, but they aren't. Looks like the WNetAddConnection2A method may work.... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.