Sign in to follow this  
Followers 0
BPBNA

Mapping a Novell drive

3 posts in this topic

I'm trying to map a drive in my script using a Novell username/password. For some reason I can map one Novell drive in an AutoIt v2 script but not in v3.

Here are the lines I've tried from my scripts. I am using server1 for the one drive that I can map in v2 and server2 for the different drive I can't map in v3. The accounts are setup correctly I just cant seem to find a way to authenticate to the server when I'm logged on as a different user. I used RunAsSet too but that authenticates to the AD which does nothing for me.

The v2 line is(this works):

RunWait, %COMSPEC% /C net use U: \\\\server1\\folder1\\folder2 password /USER:username

The v3 lines that I have tried are:

$map = Run(@ComSpec & " /c Z:\MAP.exe N server2/folder1:folder2", "", @SW_HIDE, $STDOUT_CHILD)
$map = Run(@ComSpec & " /c net use * \\server2\folder1\folder2 password /USER:username", "", @SW_HIDE, $STDOUT_CHILD)
$drive = DriveMapAdd("*", "\\server2\folder1\folder2", 0, "domain\username", "password")

Has anyone ever run into this?

Share this post


Link to post
Share on other sites



I'm trying to map a drive in my script using a Novell username/password. For some reason I can map one Novell drive in an AutoIt v2 script but not in v3.

Here are the lines I've tried from my scripts. I am using server1 for the one drive that I can map in v2 and server2 for the different drive I can't map in v3. The accounts are setup correctly I just cant seem to find a way to authenticate to the server when I'm logged on as a different user. I used RunAsSet too but that authenticates to the AD which does nothing for me.

The v2 line is(this works):

RunWait, %COMSPEC% /C net use U: \\\\server1\\folder1\\folder2 password /USER:username

The v3 lines that I have tried are:

$map = Run(@ComSpec & " /c Z:\MAP.exe N server2/folder1:folder2", "", @SW_HIDE, $STDOUT_CHILD)
$map = Run(@ComSpec & " /c net use * \\server2\folder1\folder2 password /USER:username", "", @SW_HIDE, $STDOUT_CHILD)
$drive = DriveMapAdd("*", "\\server2\folder1\folder2", 0, "domain\username", "password")

This, by the way, gets the PID for the process in $map, not the mapped drive letter, which you presumably intend to get from the STDOUT text.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Yeah, I know how that works, I used the StdoutRead($map) and stringtrims to get the drive letter. Ive never used quotes in my net use command and there are no spaces in the name. Would it still make a difference?

I can map the drive straight to the second folder. I think the folder2 which in my case is called ibm is shared. I have had no problems mapping this drive on my own account. The problem occurs when I try to authenticate with Novell through the command line through this other account.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0