Sign in to follow this  
Followers 0
laurin1

DriveMapAdd - Error on Windows 7 x64

2 posts in this topic

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

Share this post


Link to post
Share on other sites



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]--------------- __________------------------------------ __________---------------

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