Jump to content

Recommended Posts

Posted

Does manually mapping the drive from 'Map network drive' in explorer work?

 

Are these all on the same domain or is there a separate Admin and Curric domain set up?

Posted

Does the script work if you manually double click on it on the client? Is it in the 'logon' scripts and not 'startup'? Is the script stored locally or on a remote share?

 

Is there a domain trust in place? Could you use GPP (group policy preferences) to map the drive instead?

Posted
i cant as i am mapping from a none domain machine so dont have control over the gpp

OK GPP is out :D

 

Either way the script should be able to do the trick. Does it work when double clicking it on the client?

Posted
No that’s where I was wondering if I had done something wrong

 

Well I don't think I see anything wrong with your command line - does the command work if you paste it into a command prompt directly, outside the script?

Posted

Are you using a trailing \ on the share?

 

net use z: \\server\share\ /USER:domain\user PASSWORD

 

If so try without the \ - \\server\share - seems silly but worth trying if you have one. I've seen that cause issues before I believe.

Posted
I've found with scripts that work in command line but not when clicked/ran - it still thinks the drive is mapped (but errors when you try to change to it, and doesn't show in explorer), so you have to do a "net use z: /del" before mapping it again in the script.
  • 2 weeks later...
Posted (edited)

you could try;

 

net use z: "\ "\\networkshare" /USER:domain\username password /PERSISTENT:NO

 

I had an issue making a schedule task from command line before and it was to do with the file path and adding in "" before the file path and a " at the end resolved it.

 

EDIT: its not letting me add in the "\ " without a space so take the space out

 

 

Edited by Knil92

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...