append user/password to "cd \\..." possible?
Moderators: Hacker, petermad, Stefan2, white
append user/password to "cd \\..." possible?
I'd like to use a button with cd... command for network acces to some dirs. Instead of entering user/password for this I'd like to send them as parameters (well, at least username).
Can this be done? how?
thx
Can this be done? how?
thx
This seems to me like a great idea.
I'm sitting on a network with extremely slow access to shared disks (for some reason). I have to wait like 2 minutes before the username/pw dialog appears.
If I could have entered it all at once, TC could send this to the server when it asks for it, and I could be busy doing other stuff for that while.
I'm sitting on a network with extremely slow access to shared disks (for some reason). I have to wait like 2 minutes before the username/pw dialog appears.
If I could have entered it all at once, TC could send this to the server when it asks for it, and I could be busy doing other stuff for that while.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
You can use the "net use" command which comes with Windows. Use net use /? for the parameters.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2CADweazle
No, you don't need to assign a drive letter! Try e.g.
net use \\server\share
No, you don't need to assign a drive letter! Try e.g.
net use \\server\share
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- CADweazle
- Senior Member
- Posts: 297
- Joined: 2003-04-03, 09:10 UTC
- Location: Freiburg i.Br. Deutschland
Fine!
But - when I try to make a batch file like this:
I always get the error: "UNC paths are not supported"
Entering "cd \\server\c$" in the TC-Command-line it works - it's not a trick, it's TC - or not?.
So again: What to enter in the TC-Button-Command-Line??
Greetings,
But - when I try to make a batch file like this:
Code: Select all
net use \\server\c$ <passw> /user:administrator /persistant:no
cd \\server\c$
Entering "cd \\server\c$" in the TC-Command-line it works - it's not a trick, it's TC - or not?.
So again: What to enter in the TC-Button-Command-Line??
Greetings,
Cheer up, Karl
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
This is a lack on DOS prompt only.I always get the error: "UNC paths are not supported"
If you manually select the server via "cd \\server" or select an according predefined entry of your directory hotlist (CTRL-D), you can select an entry (e.g. c$).
Select only ! not execute !
Now try a button like :
net use %P <passw> /user:administrator /persistant:yes
And you got access ...
Note the /persistant:yes means that it persists after the DOS prompt closes ...
#5767 Personal license
- CADweazle
- Senior Member
- Posts: 297
- Joined: 2003-04-03, 09:10 UTC
- Location: Freiburg i.Br. Deutschland
Edited: thanx to all above - my answer-box was open too long...
Found it "myself" (thanx go to norfie !!)
Create a server.bat and refer to it in the button-command-line.
(Type %commander_path% only if you already use it.)
That's all folks.
'Bit annoying DOS-box... any suggestions appreciated!
Greetings,
Found it "myself" (thanx go to norfie !!)
Create a server.bat and refer to it in the button-command-line.
Code: Select all
@echo off
net use \\server\c$ <passw> /user:administrator
%commander_path%\totalcmd.exe /o /r=\\server\c$
That's all folks.
'Bit annoying DOS-box... any suggestions appreciated!
Greetings,
Cheer up, Karl
Of course, it works.
But if i understand you don't want to see DOS-box, right? If i mistake forget about my post.
I just suggested way to eliminate DOS-box. To get access to shared folder it is not necessary to execute "net use" command every time. So i suggested to execute it once during Windows logon procedure. Now, you don't have to create server.bat file and run totalcmd again. The "cd \\server\share" command can be executed by TC as regular command.
But if i understand you don't want to see DOS-box, right? If i mistake forget about my post.
I just suggested way to eliminate DOS-box. To get access to shared folder it is not necessary to execute "net use" command every time. So i suggested to execute it once during Windows logon procedure. Now, you don't have to create server.bat file and run totalcmd again. The "cd \\server\share" command can be executed by TC as regular command.