?
Solved

Windows 7 net use mapping error

Posted on 2011-03-04
6
Medium Priority
?
1,566 Views
Last Modified: 2012-05-11
Good Day to all,

I am new to Windows 7 and we are deploying our first Windows 7 box. The problem is a dos script that our accounting dept uses to connect to a server share will not work in Windows 7. Now the issue is two part. 1. It works in XP on multiple pc's. 2. It is a very simple script using net use. Here is the script:

NET USE H: /DELETE
NET USE H: \\IP_ADRESS\QDLS\sharename  /USER:USERNAME PASSWORD

When I run it I get a System Error 5   Access is denied.

I have tried running this using the Run as administrator command with the same results.
I even tried logging in as the domain admin and using run as administrator.

Additional notes. If I open my computer and use the Map Network Drive option I can map to the share. If I right click on it and choose disconnect and then run the script using run as administrator it works. I know it is probably something easy. But I really need to get this to work I don't know what is so different in the way that Windows 7 is running this script but any help would be greatly appreciated
0
Comment
Question by:POB-IT-DEPT
[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
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:njxbean
ID: 35038441
if you go to the command line and manually enter that in does it work?
0
 
LVL 7

Expert Comment

by:njxbean
ID: 35038463
also try using the quotes as in this syntax:

 NET USE [driveletter:] "\\ComputerName\ShareName"

also are you including the domain int he username?

below is the proper syntax

 NET USE [driveletter:] \\ComputerName\ShareName[\volume] [password | *] [/USER:[domainname\]username]

more here:

http://ss64.com/nt/net_use.html
0
 

Author Comment

by:POB-IT-DEPT
ID: 35038468
No it does not. Also Tried launching the command prompt by right clicking on it and choosing run as administrator. Still didn't work.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:POB-IT-DEPT
ID: 35038651
The server is at a remote location outside our network, that why I use the IP address, so I cant really do the domain name thing.

As far as the quotation marks that did not work either. The sharname\directory structure doesn't have any spaces in the name.
0
 
LVL 7

Accepted Solution

by:
lucifer82 earned 2000 total points
ID: 35044071
POB-IT-DEPT,

if the share is outside the network in the domain section you just need to enter the ip

eg. if the server or pc that has the share has ip of 192.168.0.1

then username should be

192.168.0.1\USERNAME PASSWORD

Windows 7 is very picky about user credentials.
0
 

Author Closing Comment

by:POB-IT-DEPT
ID: 35059234
This did the trick. Just for anyone who needs it this was the final script with certain pieces of information changed to protect the innocent.

NET USE H: \\192.168.0.9\Folder\Share /USER:192.168.0.9\username password

Thanks for all the help!
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 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