Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Can't map plug in drive using script on win7 pro


  • Please log in to reply
4 replies to this topic

#1 bluffwood

bluffwood

  • Members
  • 87 posts
  • OFFLINE
  •  
  • Local time:07:15 PM

Posted 30 September 2016 - 09:12 AM

I had a similar issue mapping on my own xp computer to a win10 computer, also my own described here: http://www.bleepingcomputer.com/forums/t/617584/getting-access-to-shared-win10-drive-from-an-xp-computer/ and the script with the NET USE worked nicely. I tried to do the same on another computer for a friend,

The computer is Win 7 pro. The device we're trying to map is a plug in disc array. Can't tell you much about the array, except that he has to map in at bootup time and provide credentials. The array's username is the same as Win 7's, but the pw is not the same (so, in the log below, I try it both passwords, the very last attempt was using the windows pw (whose only difference is an initial cap). On top of that, it looks like the mapping requires an 8.3 format. The top level folder on the array is "benchmark1" and I took a wild stab with the NET USE and I think it's "benchm~1" ...not entirely for sure.....
 

so I created a cmd file for this to run at startup.

 

timeout /t 2
net use n: /delete
net use n: \\NASE6A562\benchmark01 /user:nwhite ***PW*** /persistent:yes
net use z: /delete
pause

'

I tried variations. 8.3 folder name. long folder name, \\device name, \\ip address. Always fails.

 

Here's the only thing that works: From inside windows 10, click on NETWORK, see the device click on it, click down to the top level folder, map the device to a letter. This works. See the attached pictures of this working.

 

Nothing I do from a command file works.

 

Here's the resulting log file (with added comments) where I tried a few variations:

Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation.  All rights reserved.
REM PING THE DEVICE NAME TO FIND THE IP ADDRESS, AS DOING A NET USE ON THE DEVICE GIVES UNHAPPY RESULTS
C:\Users\nwhite>ping NASE6A562

Pinging NASE6A562 [192.168.16.100] with 32 bytes of data:
Reply from 192.168.16.100: bytes=32 time<1ms TTL=64
Reply from 192.168.16.100: bytes=32 time<1ms TTL=64
Reply from 192.168.16.100: bytes=32 time<1ms TTL=64
Reply from 192.168.16.100: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.16.100:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\nwhite>cd \bci
REM  RUN THE SCRIPT USING \\NODE NAME
C:\BCI>startupmapping

C:\BCI>timeout /t 2

Waiting for 0 seconds, press a key to continue ...

C:\BCI>net use n: /delete
There are open files and/or incomplete directory searches pending on the connect
ion to n:.

Is it OK to continue disconnecting and force them closed? (Y/N) [N]: y
n: was deleted successfully.


C:\BCI>net use n: \\NASE6A562\benchm~1 /user:nwhite ***PW*** /persistent:yes
System error 53 has occurred.

The network path was not found.


C:\BCI>net use z: /delete
z: was deleted successfully.


C:\BCI>net use n: /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.


C:\BCI>pause
Press any key to continue . . .

C:\BCI>pause
Press any key to continue . . .

REM OK. TRY HE SCRIPT USING THE IP ADDRESS
C:\BCI>startupmapping

C:\BCI>timeout /t 2

Waiting for 0 seconds, press a key to continue ...

C:\BCI>net use n: /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.


C:\BCI>net use n: \\192.168.16.100\benchm~1 /user:nwhite ***PW*** /persistent:ye
s
System error 53 has occurred.

The network path was not found.


C:\BCI>net use z: /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.


C:\BCI>net use n: /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.


C:\BCI>REM 192.168.16.100 <ip address of NASE6A562

C:\BCI>pause
Press any key to continue . . .

C:\BCI>startupmapping

C:\BCI>timeout /t 2

Waiting for 0 seconds, press a key to continue ...

C:\BCI>net use n: /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.


C:\BCI>net use n: \\192.168.16.100\benchm~1 /user:nwhite ***PW*** /persistent:ye
s
System error 53 has occurred.

The network path was not found.

 

and another log using long foldername instead of my guessed short 8.3 foldername

 

Waiting for 0 seconds, press a key to continue ...

C:\BCI>net use n: /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.


C:\BCI>net use n: \\NASE6A562\benchmark01 /user:nwhite ***PW*** /persistent:yes

System error 1219 has occurred.

Multiple connections to a server or shared resource by the same user, using more
 than one user name, are not allowed. Disconnect all previous connections to the
 server or shared resource and try again.


C:\BCI>net use z: /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.


C:\BCI>pause
Press any key to continue . . .

 

and one more log. in this case the net use is given the windows PW and not the devices share PW

 

C:\BCI>timeout /t 2

Waiting for 0 seconds, press a key to continue ...

C:\BCI>net use n: /delete
There are open files and/or incomplete directory searches pending on the connect
ion to n:.

Is it OK to continue disconnecting and force them closed? (Y/N) [N]: y
n: was deleted successfully.


C:\BCI>net use n: \\NASE6A562\benchmark01 /user:nwhite ***PW*** /persistent:yes

System error 1219 has occurred.

Multiple connections to a server or shared resource by the same user, using more
 than one user name, are not allowed. Disconnect all previous connections to the
 server or shared resource and try again.


C:\BCI>net use z: /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.


C:\BCI>pause
Press any key to continue . .
.

 

I have a large number of annotated screen prints I can add if anyone wants to see them. But I;ll just add the few where the mapping, from inside windows, done manually right after boot, works.

I am spending way too many hours tinkering with this, and it's probably something simple... Please help.

Attached Files

  • Attached File  18.JPG   110.76KB   0 downloads
  • Attached File  19.JPG   44.07KB   0 downloads
  • Attached File  20.JPG   29.6KB   0 downloads
  • Attached File  21.JPG   48.77KB   0 downloads
  • Attached File  22.JPG   46.62KB   0 downloads
  • Attached File  23.jpg   96.12KB   0 downloads

Edited by bluffwood, 30 September 2016 - 09:15 AM.


BC AdBot (Login to Remove)

 


#2 bluffwood

bluffwood
  • Topic Starter

  • Members
  • 87 posts
  • OFFLINE
  •  
  • Local time:07:15 PM

Posted 11 October 2016 - 01:17 PM

I realize this should have been posted under win7. The moderator should move it, if it's important.

 

However the underlying problem is probably not version specific. Although, if I knew for sure, I'd probably be smart enough to fix this.

 

It's been a couple of weeks. Can someone help me, please?



#3 boopme

boopme

    To Insanity and Beyond


  • Global Moderator
  • 73,026 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NJ USA
  • Local time:07:15 PM

Posted 11 October 2016 - 01:54 PM

Moved to Win 7
How do I get help? Who is helping me?For the time will come when men will not put up with sound doctrine. Instead, to suit their own desires, they will gather around them a great number of teachers to say what their itching ears want to hear....Become a BleepingComputer fan: Facebook

#4 bluffwood

bluffwood
  • Topic Starter

  • Members
  • 87 posts
  • OFFLINE
  •  
  • Local time:07:15 PM

Posted 23 October 2016 - 05:09 AM

Can someone help me with this?



#5 sflatechguy

sflatechguy

  • BC Advisor
  • 2,200 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:07:15 PM

Posted 23 October 2016 - 09:24 AM

If manually mapping is working, just go with that. When he tries to access the share, he should get prompted for his credentials. I bit annoying, but it works.

 

If you add it to task scheduler or add it to the startup items, it should work as long as the full path, and the username and password to access the share are correct. You could also try adding it to the local group policy to run the script at logon.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users