Results 1 to 4 of 4

Thread: Missing Somthing [Network Login]

  1. #1

    Thread Starter
    Addicted Member spyk3's Avatar
    Join Date
    Apr 2009
    Location
    Dothan, AL
    Posts
    218

    Missing Somthing [Network Login]

    If you have a local server, then you know (unless someone mapped it for you) when you open Explorer and type in "\\yourServer" it prompts for proper username and password.

    I've tried literally a dozen compinations of things the last few days each with major errors in their own right to mimmic this exact prompt.

    I don't neccassarly need explorer open, but for use of an office systray i made, i need in office users to first assure they have connectioin to "\\ourServer".
    This systray is simplay a menu of folders on the server that makes it easy to access. For comps like mine (where my uname and pass are the same as on server) it's no problem, but for our long distance employees, they always have to open explorer and go login to server before program can build the menu tree.

    It's kind of a pain to have to open a seperate program before starting another.

    Any suggestions? (no mapping alloud, as there's no point in me requiring every employee to map our server, not to mention, having outside PC's with a mapped drive to the server is just not safe, to much chance of saved passwords and someone unauthorized gaining access)

  2. #2
    Addicted Member
    Join Date
    Dec 2006
    Posts
    207

    Re: Missing Somthing [Network Login]

    Found a link that may be of help to you.

    http://stackoverflow.com/questions/3...r-using-vb-net
    Rate me if my response helped you. If not, I accept charity Rates as well.

  3. #3
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Missing Somthing [Network Login]

    I would just use Process.Start to call the Net Use command (which exists on all versions of Windows from Windows 2000 onwards I believe) and pass it the server location along with their username and password. The Net Use command is most commonly used to map drives but you dont actually have to assign a drive letter, for example you can just do this:

    Code:
    Net Use \\Server\Share /user:myusername mypassword
    Once done, your application can successfully access objects on that share without a problem. Then when you are done with objects from that server, just call Net Use again like this:
    Code:
    Net Use \\Server\Share /delete
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  4. #4
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564

    Re: Missing Somthing [Network Login]

    I would agree, try to use NET USE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width