Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Copying Files


3 replies to this topic

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 17 February 2006 - 07:09

Hi all,
I have a Basic MSI project. I have to copy the files(EXEs, DLLs, OCXs etc) from a network path on the local machine. Is it possible to do so.

I am trying this out then it reads the network path correctly but says Unable to copy the file.

If it is not possible then what should be done to achieve this. I am writing a InstallScript function for copying the files and calling it through the CustomAction in the Defferred Execution Mode after the InstallFiles.

What should be the correct way of copying the files over a network location.

Thanx in advance for all the help.

Swati.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 17 February 2006 - 22:03

You can copy the files because you have a valid account to the network resource. Windows Installer is executed by a service, generally executed by the local SYSTEM account - not your account. That account probably has no rights to the network resource. This is also the reason that the destination dialogs do not offer UNCs. For network drive paths a different scheme is applied, they are transferred to the SYSTEM account.
You have a number of options. You can configure the target systems so that their Windows Installer services are run under a different account. You can allow anonymous access to the network resource (I don't know if that works). The best solution is to assign a drive letter to the network path, and run the installation from that network drive.

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 20 February 2006 - 06:38

Hi,
Thanx for the reply.

But Can you please clarify the solution a little bit moe. I will explain my situation in more details.

Suppose my MSI is kept at the system A and I am trying to install the product on system B.

So I write the command on system B : msiexec /i \\A\Test\abc.msi

My files etc are kept on the path \\A\Test\Files\
My Function reads this path correctly, reaches this path and says Unable to copy the file.

So now if I want to copy the files, I should map this path to some drive say X and then try to run the MSI as: msiexec /i X\Test\abc.msi

Am I correct here. Did I understand it correctly.

Swati

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 21 February 2006 - 20:15

That's the idea.
It looks confusing, why can the Windows Installer service access the MSI, but not the other files? The reason is that the MSI is (partially) cached by MsiExec while running in user mode.