Sign in to follow this  
Followers 0
mcslemon

DriveMapAdd Problem

4 posts in this topic

Hi,

I need to connect to a Novell Server via CIFS on a WinPE 2.0 build.

Using PENetCFG, the drive maps ok when the network service starts.

Using the Net Use command the drive maps ok

Using DriveMapAdd the server fails to connect. If I map to a Windows XP / 2003 box, it connects fine!

I'd like to use Autoit to control this part of my process as I can have better control over any problems that should occur with the mapping.

The command I'm using is

DriveMapAdd("i:", "\\server\share", 0, "workgroup\username", "password")

The error code I receive from @error is 1.

Has anyone encountered problems with connecting to CIFS before?

Cheers,

Neil.

Share this post


Link to post
Share on other sites



Hi,

Using the Net Use command the drive maps ok

DriveMapAdd("i:", "\\server\share", 0, "workgroup\username", "password")

The error code I receive from @error is 1.

Has anyone encountered problems with connecting to CIFS before?

Actually I've run into other problems with DriveMapAdd as well. I've had to resort to using Net Use in my AutoIt scripts as a fallback once or twice.

Func MapNoPass()
    Run(@ComSpec & " /c " & "net use " & $sDriveLetter & " " & $sMapPath & " /user:" & $sUser & " /persistent:no", "", @SW_HIDE)
EndFunc   ;==>MapNoPass

Func MapWithPass()
    Run(@ComSpec & " /c " & "net use " & $sDriveLetter & " " & $sMapPath & " /user:" & $sUser & " /persistent:no" & " " & $sPassword, "", @SW_HIDE)
EndFunc   ;==>MapWithPass

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

Some things in autoit i hear dont work in all windows versions. If winPE is anythign like WinCE then it wont work at all. Have you had any success before using autoit with PE?

Sorry, I thought I'd responded to that!

Monamo, thanks for the code - I'll give that a go.

Neil.

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