>I need first determine if a particular drive is already mapped and if it is not then need to connect to that windows share using NET USE. Not sure how this is done as I need to pass a userid and password in the connection. Would I use the RUN command?
>
>It is NOT as simple as using a UNC name for the current loggged in user since that user does not have permission to the share. I have to map a drive as an alternate user then will have access to the files on that required drive. Unfortunately, the sys admin will not let me do it the easy way so I am forced to do these tricks.
>
>Of course, I need to test the connection first since if I map the drive every time I will have too many connections to the same thing.
>
>Any got some example code on how to handle this ?
If scripts are turned off, you may need other options. See if anything here in this thread helps:
WNetAddConnection2 Thread #
1314449 Message #
1314449
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"