Skip to content Skip to sidebar Skip to footer

Batch File Yes to Continue Net User

What error occurs when your colleague runs it?

Was this post helpful? thumb_up thumb_down

Do they have permissions for the folders you are trying to access?

I think the proper syntax, as long as you are all on the domain already, is:

net use k: \\server\folder

Was this post helpful? thumb_up thumb_down

Is your colleague have administrator rights to run this command or collect / map data of shared drives? Might be he did not have administrator account or some sort of permission.

Was this post helpful? thumb_up thumb_down

they get the network path is not found.

They have permission to the folders as these folders are pretty much wide open and then the permissions on the subfolders are tighter depending on what the contents are

Was this post helpful? thumb_up thumb_down

Dave7803 wrote:

I think the proper syntax, as long as you are all on the domain already, is:

net use k: \\server\folder

Was this post helpful? thumb_up thumb_down

Is there a space in the path?

Was this post helpful? thumb_up thumb_down

no no space in the path.  I am going to have them try to run as administrator. i have a feeling this issue might not happen on XP, the two i have testing this are on 7 could be a UAC issue so running as admin might be the remedy

Was this post helpful? thumb_up thumb_down

How the folder is actually shared, is it shared from local computer and or is it shared from DC or some sort of other method?

Was this post helpful? thumb_up thumb_down

it is shared via DFS namespace

Was this post helpful? thumb_up thumb_down

Dave7803 wrote:

Dave7803 wrote:

I think the proper syntax, as long as you are all on the domain already, is:

net use k: \\server\folder

Was this post helpful? thumb_up thumb_down

1+ for Dave7803

Dave7803 wrote:

Do they have permissions for the folders you are trying to access?

I think the proper syntax, as long as you are all on the domain already, is:

net use k: \\server\folder

net use k: \\ServerName\Share

Sorry, just saw it is DFS Share....
Try net use k: \\Domain.internal\Share...
If you are using .internal.

Was this post helpful? thumb_up thumb_down

yes i understand what dave is saying but the reason why the syntax is this

net use k: \\domain name\share\folder

is because this is shared via a DFS domain namespace, which allows me to have a moderate fail over if a segment of the network dies or something else, the users will be automatically redirected to one of the replication members for that share so they will not notice the down time

Was this post helpful? thumb_up thumb_down

server 2008, one member of the dfs group is 2003 but that will be taken away as soon as users fix there linked workbooks and such

Was this post helpful? thumb_up thumb_down

Andrew Taylor wrote:

it is shared via DFS namespace

Well, since you finally decided to mention that, I agree with Dave Rossi.  Try using FQDN.  I'm also not sure how your folder structure is setup, but I think all you need is \\FQDN\Share not \\FQDN\Share\Folder

Dave Rossi wrote:

Try net use k: \\Domain.internal\Share...
If you are using .internal.

Was this post helpful? thumb_up thumb_down

Does it work if they just type the command in a CMD prompt (run as administrator, since it's Win7)?  Is there an error?

Was this post helpful? thumb_up thumb_down

not sure if it's been said yet or not, but when using the net use command, and the following \server path  if there are spaces in the folder path at all, it needs to be in quotes

Was this post helpful? thumb_up thumb_down

can they run a dir of that share/folder?

ie: dir \\domain\share\folder

If not, it should tell you why. I'm assuming you're all in the same domain?  And your share permissions are set at the share, AND the folder?  (Sharing security, AND folder security?)

Was this post helpful? thumb_up thumb_down

uac was the issue ran it as admin it worked fine.  thank you everyone.

That would have been one of the first things i personally would have tried but my boss didnt think to try it.

Was this post helpful? thumb_up thumb_down

I see the issue is closed, but if you work with DFS you shouldn't use servername! The failover what you are pointing out to won't work.

As others said, use domainname.

If you wanne bypass the UAC issue, you could always look @ preferences.

This would be my option. no black dos screen popping up and all will be managed central in GPMC. Easier to maken templates for different departments.

make impression @ your boss and lookup preference on Windows domain.

:-)

Was this post helpful? thumb_up thumb_down

First at all you don't need to specify the domain in the command, see below.

The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]

You can also create a script to map network drives, see below.

'  Example on how to map a networkshare as network drive N:\

Dim objNet

Set objNet = CreateObject("Wscript.Network")

objNet.MapNetworkDrive "N:", "\\COMPUTERNAME\SHAREDFOLDER"
WSCript.Quit

Copy the above into Notepad and save with extension name vbs, then you can run at startup.

Was this post helpful? thumb_up thumb_down

Why not use GP to deploy the shares?

Was this post helpful? thumb_up thumb_down

JCAlexandres wrote:

First at all you don't need to specify the domain in the command, see below.

I'm pretty sure you do if you want to have the full advantage of DFS, and not just point to a single share.

And UAC should not prevent you from creating file shares unless you have some sort of medieval policies in place.

Was this post helpful? thumb_up thumb_down

Dashrender wrote:

JCAlexandres wrote:

First at all you don't need to specify the domain in the command, see below.

I'm pretty sure you do if you want to have the full advantage of DFS, and not just point to a single share.

And UAC should not prevent you from creating file shares unless you have some sort of medieval policies in place.

Yes, but not placing the domain name in the beginning of the UNC path, that was a syntax error right there.

Was this post helpful? thumb_up thumb_down

This forum post seems to answer exactly what the OP is looking for.

http://social.technet.microsoft.com/Forums/en/winserverfiles/thread/c1144cf2-b852-44da-8fe7-973a0abec6ea

this should solve your issue of needing admin rights at the workstation to solve UAC, I think.

Was this post helpful? thumb_up thumb_down

brownwough1954.blogspot.com

Source: https://community.spiceworks.com/topic/150998-batch-file-with-net-use

Enregistrer un commentaire for "Batch File Yes to Continue Net User"