Jump to content

DriveMapAdd - Error on Windows 7 x64


Recommended Posts

We tested this script on a Windows 7 x64 machine (from Scite) and it worked fine. Now, it will not work on our Windows 7 x64 machines. Works fine on Windows XP x86.

$sDriveLetter = 'S:'

If InGroup('ClinicsByPatientNames') Then

If(DriveMapGet($sDriveLetter) <> '\\server05\ClinicsByPatientNames') Then

$iError = DriveMapDel($sDriveLetter)

WriteLog('Drive mapped to ' & $sDriveLetter & ' deleted - Result: ' & $iError)

$iError = DriveMapAdd($sDriveLetter, '\\server05\ClinicsByPatientNames', 1)

MsgBox(0, '', $iError)

WriteLog('Map ' & $sDriveLetter & ' to \\server05\ClinicsByPatientNames - Result: ' & $iError)

EndIf

Else

$iError = DriveMapDel($sDriveLetter)

WriteLog('Drive mapped to ' & $sDriveLetter & ' deleted - Result: ' & $iError)

EndIf

The return is 0, the @error is 1, the @extended is 1222.

Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Link to comment
Share on other sites

  • 5 months later...

Meanwhile .... you can use ...

net use z: /persistent:yes \\servername\share /u:domainaccount password

[s][font="Impact"]░▒▓▓►DrKovra◄▓▓▒░[/font][/s]The only thing I [sup]know [/sup]is that I don't know [sub]nothing[/sub]--------------- __________------------------------------ __________---------------

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...