## Samba multi user script

Discuss and share scripts and script files...
Wublide
Posts: 43
Joined: 30 Jan 2018 16:57

### Samba multi user script

There's a way to script a single catalogue item that let me choose to access a network directory with one user or another one?

highend
Posts: 8209
Joined: 06 Feb 2011 00:33

### Re: Samba multi user script

Sure. Open a command prompt and execute
net use /?

Create a simple script by using e.g. run or runret()...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Wublide
Posts: 43
Joined: 30 Jan 2018 16:57

### Re: Samba multi user script

highend wrote:
02 May 2019 19:13
Sure. Open a command prompt and execute
net use /?

Create a simple script by using e.g. run or runret()...
yeah i was pointing in net use direction but how can i integrate it in script language? i did some sort of xyplorer scripting in the past but something really basic

highend
Posts: 8209
Joined: 06 Feb 2011 00:33

### Re: Samba multi user script

but how can i integrate it in script language?
Again, by using run or runret()? And ask for a user name by using input()...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Wublide
Posts: 43
Joined: 30 Jan 2018 16:57

### Re: Samba multi user script

highend wrote:
02 May 2019 19:22
but how can i integrate it in script language?
Again, by using run or runret()? And ask for a user name by using input()...
something like that

Code: Select all

run net use X: \\path\to\share
input()
?

highend
Posts: 8209
Joined: 06 Feb 2011 00:33

### Re: Samba multi user script

Does it make any sense to ask for some user name to connect with (and asking for a password is necessary as well!)
after executing the net use command?

You should at least read up those commands before using them
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

Wublide
Posts: 43
Joined: 30 Jan 2018 16:57

### Re: Samba multi user script

highend wrote:
02 May 2019 19:36
Does it make any sense to ask for some user name to connect with (and asking for a password is necessary as well!)
after executing the net use command?

You should at least read up those commands before using them
yeah you're right, i find that

net use X: \\path\to\share * /USER:username /PERSISTENT:YES

it's what i was looking for, but now i have to solve the windows ridicolous system error 1219 that do not permit multiple connection to the same resource with different concurrent user