Jump to content

Mapped Drive not visible in the explorer


Recommended Posts

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

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.

Link to comment
Share on other sites

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.

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...