+ Reply to Thread
Results 1 to 7 of 7

Thread: Mapped drive Target Directory not writable error - UNC Path will work

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Mapped drive Target Directory not writable error - UNC Path will work

    Hello

    I'm having an issue with the trying to run the installer on a mapped drive path. On our network machines I am trying to install to "P:\temp\4Dans\bctest". It tells me that my target directory is not writable or accessible.

    The user who is attempting to install is the adminstrator.

    However, If I install it using via UNC Path to the same location the installer will work just fine.

    Any ideas as to why this would happen?

    I've tried using the the Set Access Control function to grant full acces to %_SB_INSTALLDIR%\* but the issue still occurs.

    Any help would be appreciated.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,261

    Default Re: Mapped drive Target Directory not writable error - UNC Path will work

    Hello,

    Yes. I assume you are running an UAC-aware operating system, right? I think the following is an interesting reading:

    http://www.lindersoft.com/forums/showthread.php?t=31410

    Friedrich

  3. #3

    Default Re: Mapped drive Target Directory not writable error - UNC Path will work

    Quote Originally Posted by linder View Post
    Hello,
    Yes. I assume you are running an UAC-aware operating system, right? I think the following is an interesting reading:
    http://www.lindersoft.com/forums/showthread.php?t=31410
    Friedrich
    BTW, if a mapped drive is not available, you can use the "Map/Disconnect
    Network Drive..." script function to map an UNC to a drive letter to a
    specified share name.
    Friedrich
    To restate my problem:
    1. User has P: mapped to \\MyServ\PeeShare and I know that my program is installed in P:\MySoft. I default that as the SB Install Dir.
    2. The Setup running as Admin is not connected to P:

    To call your Map Network Drive function I need the Server name and Share name. Any suggestion how I can get that from the Standard user session?

    From a Cmd prompt a NET USE lists all my network drive mappings i.e. P:=> \\MyServ\PeeShare

    From an Elevated Admin Cmd the NET USE also lists all the standard user mappings, but they all have Status=Unvailable, i.e. I see "Unavailable P: => \\MyServ\PeeShare". Can I get to that info in SB?

    When I am running the install on the Destination Folder panel when I click the Change.... button the drive mappings from the standard session do show, but with a Red X that I'm sure indicates its unavailable. If I pick one of those Red X drives (my P then Windows magically maps it into the Admin account. How can I do that with SB? I.e. ask it to map into the Admin session the P: from the standard session?


    A new feature for File or Folder exists would be "Drive Exists" and "Drive Writable" where I could pass an install folder (P:\xxxxx) and the function would just check if the drive exists, or drive root is writable. I think that would help me know if I have this No Admin Share problem with less string functions.

  4. #4
    Join Date
    Mar 2004
    Posts
    4,261

    Default Re: Mapped drive Target Directory not writable error - UNC Path will work

    To call your Map Network Drive function I need the Server name and Share name. Any suggestion how I can get that from the Standard user session?

    From a Cmd prompt a NET USE lists all my network drive mappings i.e. P:=> \\MyServ\PeeShare
    In theory, what you can try to do is to develop a "helper" tool with SetupBuilder ("asInvoker" manifested) that calls the NET USE command and writes the result to a text file. You call this "helper" tool from your elevated running installer with the "Launch non-elevated under UAC" option enabled to perform the operation in the context of the "original" Standard User. After that, read the resuling file from your installer and retrieve the information.

    From an Elevated Admin Cmd the NET USE also lists all the standard user mappings, but they all have Status=Unvailable, i.e. I see "Unavailable P: => \\MyServ\PeeShare". Can I get to that info in SB?
    Again in theory, call the NET USE command from your installer and write the result to a text file. Then use "Handle Text File Operation..." to retrieve the required information.

    When I am running the install on the Destination Folder panel when I click the Change.... button the drive mappings from the standard session do show, but with a Red X that I'm sure indicates its unavailable. If I pick one of those Red X drives (my P then Windows magically maps it into the Admin account. How can I do that with SB? I.e. ask it to map into the Admin session the P: from the standard session?
    You can't do this programmatically from an application.

    HTH,
    Friedrich

  5. #5

    Default Re: Mapped drive Target Directory not writable error - UNC Path will work

    Is it possible to get the "Change" Button screen to automatically pop up when the user gets to the Destination Folder Panel?

    We have decided to put a warning message saying that drives are Not accessible and for them to click "change" and navigate to the install folder. I've tried using the "Browse" for folder function to browse to the map drives, however my destination path on the install will still want to install on "C:\Bestcase" even though they navigate to the network drive through the browse folder screen.

    The only way for the user to connect to the Network Install is by clicking on "Change" and navigating to the map drive.

  6. #6
    Join Date
    Mar 2004
    Posts
    4,261

    Default Re: Mapped drive Target Directory not writable error - UNC Path will work

    Hello,

    Are you using the "Wizard: Browse for Folder..." function in a custom wizard dialog? The result of this function is stored in the "Variable". Do you update your installation folder variable (e.g. %_SB_INSTALLDIR%) with the retrieved value?

    I would suggest to add one or two "Display Message Box" functions in your Wizard Loop to see if you have retrieved the correct variable value.

    Or another quick option is to check what the "Custom Dialog Demo 3.sb7" demo returns if you select your install folder.

    Does this help?

    Friedrich

  7. #7

    Default Re: Mapped drive Target Directory not writable error - UNC Path will work

    Yes it does....Thank you so much for all your help on this!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •