B4J Question jshell net use command

Discussion in 'B4J Questions' started by Shivito1, Feb 8, 2018.

  1. Shivito1

    Shivito1 Active Member Licensed User

    I have tried many different ways to accomplish this however to no avail. here is my code.
    Code:
    Dim runit As Shell
    Private switches As List
    switches.Initialize
    switches.Add(
    "/user:johns")
    switches.Add(
    "password")
    runit.Initialize(
    "net use J:",$"\\example\windows\share"$,switches)
    runit.RunSynchronous(-
    1)
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    We cannot help you if you don't provide any information...
     
  3. Shivito1

    Shivito1 Active Member Licensed User

    Right. I want to map a drive in windows. My thought is that I can use command prompt command "net use". I think this can be achieved with jshell, however I'm not sure I properly understand how to use jshell to map a drive.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You are still not using Shell correctly. You should use Run and handle the ProcessCompleted event.
     
    Shivito1 likes this.
  5. Shivito1

    Shivito1 Active Member Licensed User

    XD I was close haha
    I just needed to see the error from the executed command. apparently I had a connection as the same user already established and it will not allow two connections by the same user.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice