Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

using command line to open a password protected folder

Options
  • 23-02-2010 12:55pm
    #1
    Registered Users Posts: 2,932 ✭✭✭


    within cmd I use
    explorer [URL="file://\\192.168.0.5\app.ini"]\\192.168.0.5\app.ini[/URL]

    problem is that the file won't open because to access that folder it needs a username and password. Is there any way around this?

    I was hoping that explorer would have a arguements to accept a username and password.


Comments

  • Moderators, Arts Moderators, Regional Abroad Moderators Posts: 11,019 Mod ✭✭✭✭Fysh


    You could try using the Runas command, though if you're opening a local folder it probably won't work. (I've had problems with this in the past where because there's an existing explorer.exe process running with your login credentials you need to kill explorer.exe and then launch it again under a different username using runas - which is hardly elegant and mucks around with your desktop, etc).

    What version of Windows are you on?


  • Registered Users Posts: 2,932 ✭✭✭Sniipe


    Hey Fysh, that sounds like it should be the correct thing... But I didn't have much joy with it
    This is what I enter:
    runas /user:domainName\sniipe"explorer \\192.138.1.12\Inetpub\Wwwroot\81\config"
    \\192.138.1.12\Inetpub\Wwwroot\81\config\app.ini

    It should open a windows explorer and a app.ini file in notepad

    But I get this:
    C:\Documents and Settings\snii\Desktop>runas /user:domainName\Sniipe"explor
    er \\192.138.1.12\Inetpub\Wwwroot\ec\config\"
    Enter the password for domainName\Sniipe:
    Attempting to start explorer \\192.138.1.12\Inetpub\Wwwroot\81\config\
    as user "domainName\Sniipe" ...
    RUNAS ERROR: Unable to run - explorer \\192.138.1.12\Inetpub\Wwwroot\81\confi
    g\
    1326: Logon failure: unknown user name or bad password.

    C:\Documents and Settings\Snii\Desktop>\\47.234.44.196\Inetpub\Wwwroot\ec81\
    config\app.ini

    the command line asks me for my password which I enter. This works without the command line where it asks me for the username and password.

    Running XP SP3


  • Registered Users Posts: 21,433 ✭✭✭✭Alun


    Not wanting to state the blindingly obvious, but in the example you gave, is "domainName" actually the name of your domain? Or were you just hiding it for privacy reasons?


  • Registered Users Posts: 2,932 ✭✭✭Sniipe


    Alun wrote: »
    Not wanting to state the blindingly obvious, but in the example you gave, is "domainName" actually the name of your domain? Or were you just hiding it for privacy reasons?
    hiding it :)


  • Registered Users Posts: 1,260 ✭✭✭Viper_JB


    Not too sure off hand what I use is crimson editor really really hand ftp function to open and edit remote text files if you do decide to try it just go through File>FTP and mess around with the settings first fill in the details pw etc and use that to directly edit, give it a try you won't regret it.


  • Advertisement
  • Registered Users Posts: 21,433 ✭✭✭✭Alun


    Sniipe wrote: »
    hiding it :)
    OK, you never know :D

    Have you tried using NET USE to map a drive letter instead first? You can supply a username and password on the command line for that too.


Advertisement