0

I have created a Setup project in VS 2010 for a windows forms project. The application installs to C:\Program Files correctly. I have some configuration files that needs to be copied to a network mapped drive (I:\ drive). How do I achieve this?

Below are the steps followed: 1. Setup project --> View --> File System 1. Add Special folder 2. Custom folder 3. Copied all the configuration files to the custom folder. 4. Custom folder --> DefaultLocation (property) --> [I:]\

Am I doing something wrong here?

  • Can you try and rephrase your question? It's confusing. You are saying that you need to copy some configuration files **to** a network drive, and you listed steps that you "followed", then you are asking what's wrong? – Lee Gary Sep 29 '14 at 09:44
  • Thanks for the reply Lee. After I build the setup project and try to install the MSI, I get a error message -- "Could not access network location. \". That's the reason I asked if I am doing something wrong. – ankonhar Sep 30 '14 at 12:42

1 Answers1

0

I don't believe you can do this for two reasons:

  1. The install runs with the system account which doesn't normally have access to the network.

  2. Mapped drive letters are not system-wide. They are specific to the user context that created them, so the system account has no idea of an I: drive created by another user. A share mapping that doesn't use drives such as \server\share\location might work if point 1 can be overcome.

In these case it's usually better to copy the files when your app first runs as part of a configuration step.

PhilDW
  • 20,260
  • 1
  • 18
  • 28