Discussion:
runas "net use" - result "Unavailable"
(too old to reply)
Vilius Mockûnas
2007-04-19 06:07:06 UTC
Permalink
Hi,
What I'm trying to do is to map network drive runing as another user.
(I'm logged on as user(interactivelly) another user is administrator)

Fof example if I launch new cmd window as administrator(I am loged on as
user) :
runas /u:administrator cmd
When new cmd window is created I use command:
net use x: \\server_ip\share
Everything is OK.

But if I try to use one command:
runas /u:administrator "net use x: \\server_ip\share"
Result is "The command completed successfully", but when I issue "net use"
without parameters - the state of connection is showed "Unavailable", and of
course I can't use it.

How to explain this ?

thanks
Vilius
Yi Lu [MSFT]
2007-04-23 23:45:24 UTC
Permalink
This is because the network drive is mapped by administrator and other users
don't have access to it.
If you use runas /u:administrator "net use", you shall see that the
connection is available (to administrator).

Thanks,
Yi
--
This posting is provided "AS IS" and confers no rights. Use of sample
scripts is subject to the terms provided at
http://www.microsoft.com/info/cpyright.htm.
Post by Vilius Mockûnas
Hi,
What I'm trying to do is to map network drive runing as another user.
(I'm logged on as user(interactivelly) another user is administrator)
Fof example if I launch new cmd window as administrator(I am loged on as
runas /u:administrator cmd
net use x: \\server_ip\share
Everything is OK.
runas /u:administrator "net use x: \\server_ip\share"
Result is "The command completed successfully", but when I issue "net use"
without parameters - the state of connection is showed "Unavailable", and
of course I can't use it.
How to explain this ?
thanks
Vilius
Loading...