tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Network folder

Hi!

I have a problem with network installation: our software needs to install local drive, and sometimes, a part of it, in a network drive.
I have set dialogs to let to customers to choose the correct path, using Browse button: all ok! The network path is correct.

For example, \\myNetwork_drive\test
When I proceed to install the error appears:
error.jpg
error.jpg (13 KiB) Viewed 10206 times
Translation: Unable to access to network path
The curios thing is the last '\.' at the end of the string

Trying a lot, I have found that if I mount the network drive as Z: (for example) with username and password set, and use this path Z:\folder as install path, the software is correctly installed.
I think it is because, mounting the network drive as local drive, Windows use this network drive with local privileges.

But I can't know how customers have configured their networks.
Which settings are correct for this installations, without errors?

Thank you
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Network folder

Hi,

Most likely the installation process did not have enough privileges to write data in the network location. Your clients should make sure that "Everyone" has full access to the target network location. This group includes the current user and the local system account.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Re: Network folder

Thank you Cosmin for your reply!
I know this, but it's impossible because some customers has complex network, with restriction policy.

Using Users/Groups function in AI, is possible to resolve problem?
I did a test, with Allplan setup (I think created with a different Setup Software, not AI), in a network, and it's installed correctly using UNC network path like \\Machine\folder. After that, I launch my setup, read this UNC network path from registry written by Allplan, and get the error...
What do they do to get working setup? Any idea?

If you want, I can attach here my AI project: maybe it can help.

Thank you
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Network folder

Hi,
Using Users/Groups function in AI, is possible to resolve problem?
No, because the permissions which are preventing the install are set on the machine which contains the shared folder.

I'm not sure how the Allplan installer is working. Is it installed per-user or per-machine? It may impersonate the current user and use it's privileges when accessing the network path. Windows Installer uses the local system account for installation, so the network location is always accessed by this account (the installer is not impersonating the current user).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Re: Network folder

I'm not sure about Allplan settings, I'll ask it, but if I understand right, you are telling me if I set per-user I can access to network... I have already set this, my setup installation is showed in the screenshot
per-user.png
per-user.png (32.62 KiB) Viewed 10180 times
Maybe is the administrator rights required? So the setup works as administrator, and this user maybe cannot access to network. But if I set only per-user, without administrator rights, how can I write on ProgramFiles Folder? It can be written only with administrator rights with Windows UAC activated.

Thank you
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Network folder

Hello,

The basic idea is, you will need to access the network as a user which has write access on the network. You can only decide which user that is by talking to your network administrator. Once you know the user, the process placing the file on the network needs to be run through that user. You can set your installer as per-user and install when logged in as that user (thus not being able to install under "Program Files") or you can run your installer as administrator (to install under Program Files) and spawn another process for running as the user to install the network files.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Re: Network folder

Hi Gabriel, thank you for your reply.

Maybe I have found a solution.
I create my setup as 2 different setup:
First one: install all files for local PC, per-user with admin rights.
Second one: install network file using only per-user.

Then I use chained installation install 2 setup together.

Is possible to do this? Or not?

Thank you
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Network folder

Hi,
Is possible to do this?
Yes, this could work because every package will run with the settings you define in the Install Parameters page. The
chained package should not inherit the user account from the main one.

Also, please note that chained packages requires the users to have Windows Installer 4.5 installed on the machine, otherwise the chained package will be ignored.
You can add Windows Installer 4.5 as a prerequisite with Advanced Installer very easy, from the Prerequisites page, [Add] button.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Re: Network folder

No luck.
The problem is not resolved: some lan has specific logon credentials, different from user logged in.

Is not possible to get Network Logon Form appear if setup access to network folder?
logon.gif
logon.gif (8.67 KiB) Viewed 10141 times
I have found this:
http://www.eggheadcafe.com/software/asp ... tials.aspx

Create a new logon session by calling LogonUser (advapi32.dll) using the
remote credentials (user, password and machinename)with logon type =
LOGON32_LOGON_NEW_CREDENTIALS (int value=9). Create a new WindowsIdentity
using the token returned from LogonUser and impersonate that new identity
when you need to access the remote resource. The new impersonated token is
used to access the remote share only , all local resources are still using
the current users token.
Please read the SDK doc's remarks on LogonUser's dwLogonType, this option
requires.


But if copy files with a DLL, MSI uninstall/path/upgrade then will not work.
I can't modify network permission or credentials.

I have tried doing this:
the setup works as per-user, error accessing network: unable to access network folder... I have not clicked on "Retry" button, but I have left the error message on the monitor.
Then, I have opened "Manage" on Windows, accessed to network, Network User credential dialog appeared, I have inserted username and password.
Then, clicked "Retry" button during Setup, and ALL WORKED.

I want that setup do this:
1) check if can access to network
2) if not, prompt Network User credential dialog (as in the above screenshot)
3) user inserts username and password
4) then setup continues install

Can you provide me this solution?

Thank you
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Network folder

Hello,

I am afraid you can not implement this using shares. It is best you look up Active Directory and GPO deployment, that technology exists to address issues like the one you are encountering.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”