shivamfet Posted August 27, 2014 Posted August 27, 2014 I have written the following auto script to map a network drive, the value return is 1, but the mapped drive is not visible in the explorer, The OS is Win 7 enterprise service pack 1. Following is the way i am trying to map. Local $isMapDriveSuccessful = DriveMapAdd($driveName , $hostname & ":" & $portNumber, 0 , "username" , "password") if ($isMapDriveSuccessful == 0) Then Exit where $hostname is passed as parameter "http://localhost" and portNumber as 60751 . Hostname and portname are correct and when i map manually the drive from explorer i can see the mapped drive. Can you please help me out ? Thanks Shivam
ViciousXUSMC Posted August 27, 2014 Posted August 27, 2014 I had the same issue using the native AutoIt map drive feature. I ended up using @CommSpec with the Net Use command to map the drive instead, this is the normal way I would do it anyways. Example: RunWait(@ComSpec & " /c Net Use X: \\vtrendserver\ofcscan /persistent:no")
tlman12 Posted August 27, 2014 Posted August 27, 2014 are you using a #RequireAdmin or running the script as admin? if so you are mapping the drive under admin context and it would only be accessible by another process running in admin context. as a test you can try running the command prompt as administrator and see if you can see the mapping, or running a DriveMapGet($driveName) within admin context.
spudw2k Posted August 27, 2014 Posted August 27, 2014 are you using a #RequireAdmin or running the script as admin? if so you are mapping the drive under admin context and it would only be accessible by another process running in admin context. as a test you can try running the command prompt as administrator and see if you can see the mapping, or running a DriveMapGet($driveName) within admin context. Was going to suggest the same thing. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
ViciousXUSMC Posted August 27, 2014 Posted August 27, 2014 To test that can you close explorer shell and re-launch it from an admin cmd prompt?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now