Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Mapped drive

Posted on 2012-04-06
8
Medium Priority
?
188 Views
Last Modified: 2012-04-20
Hello, I have 2 computers that we are trying to have the system map a drive a startup up.
We created a script to use net use to map the drive. If we run the script alone it maps the drive and we have access to the location just fine. We then created a scheduled task to run at startup to call the script. The drive gets mapped, however it does not work, due to a log in error. The server we are trying to map to is on a different domain.

Thanks for the help.
Dave
0
Comment
Question by:foster5000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 59

Expert Comment

by:Darius Ghassem
ID: 37816273
Alright give me the batch file.

Here is an example:

net use * /d

net use k: \\server\share /user:username password
0
 
LVL 7

Expert Comment

by:BelushiLomax
ID: 37816287
it works as you because you have rights that the system account the script is running under doesnt have.
add domain\user password to the script and yes that could be a security issue having that float around, but there are ways you can address that.

running net use /? will give yo the syntax you need depending on your situation. If the domain is in the same forest, this will work. If not, the trust will need to be established for whatever account the net use command uses.
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37816301
in the schedule task specify the account that you want to use, (or which you are using to login)
by default it will use system account which will not have access.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:foster5000
ID: 37816332
So is the scheduled task credentials over riding the script credentials? and the drive is being mapped with the credentials used to call the script?  


Is there any way around it. the domains are not in the same forets. they are currently totally seperate.
0
 
LVL 59

Expert Comment

by:Darius Ghassem
ID: 37816343
Do you have the credentials in the script? Please post the script
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37816349
Yes. please put the credentials in the schedule task setting to run the task with.
0
 
LVL 7

Accepted Solution

by:
BelushiLomax earned 2000 total points
ID: 37816365
If the domains are in separate forests, I assume you have a Trust established. You will have to use the exact same account for the script as you use to access the share yourself. Otherwise the trust will have to be modified on both ends potentially.
0
 

Author Closing Comment

by:foster5000
ID: 37872749
The issue was with the domains not having a trust relationship. Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Log files are useful in diagnosing and repairing problems.  This is a list of common log files and their standard locations that I've compiled.   While this is not exhaustive, it is a pretty good list that I've found to be useful.  I may update it f…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question