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

Installing to a network drive


9 replies to this topic

Matthias1967

Matthias1967
  • Full Members
  • 92 posts

Posted 30 April 2009 - 09:38

Hello,

does Windows Installer have a built-in mechanism to enable/prevent installing files to a network drive? I could use a custom action to check whether the target directory of a component is local, however I think this task would be easier to accomplish if MSI did this check.

Regards,

Matthias

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 30 April 2009 - 11:31

In a word, no. smile.gif
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 30 April 2009 - 11:36

You can modify the Browse dialog to exclude remote drives. That dialog has a DirectoryCombo control, set its attributes accordingly.

Users may circumvent the browse dialog with commandlines like
Msiexec /i Mysetup.msi INSTALLDIR=R:\test
To prevent that, always reset INSTALLDIR in your sequence.

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 30 April 2009 - 12:50

QUOTE (Zweitze @ 2009-04-30 10:36)
To prevent that, always reset INSTALLDIR in your sequence.

Wouldn't that force your folder structure on the user? I hate when set-ups do that: I want to install it where *I* want to put it. I think it would be cleaner and friendlier to handle the selection of network drives in the sequence, perhaps with a scripted Custom Action.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 30 April 2009 - 21:15

Indeed, that forces the folder structure for users - assuming these users run silent or basic UI.
'Normal' users see the UI and can change the destination folder as they see fit.

So (somewhat obvious but preventing misinterpretation)
In the start of InstallUISequence INSTALLDIR is reset by a simple CA. Later the dialogs come and the user may use the browse dialogs to change the destination folder.
In the InstallExecuteSequence, INSTALLDIR is also reset, but with the condition (UILevel <> 4). This condition preserves any user choices in the dialog, but corrects users starting the install silent with an INSTALLDIR on the commandline.

Both CAs that reset INSTALLDIR can be simple type 51 CAs, making the property empty. They should be scheduled before the costing process.

Matthias1967

Matthias1967
  • Full Members
  • 92 posts

Posted 02 June 2009 - 07:30

But there are customer admins that heavily urge software producers to let them set INSTALLDIR from the command line - and I can understand that they want to control their folder structure.

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 02 June 2009 - 08:59

QUOTE (Matthias1967 @ 2009-06-02 06:30)
I can understand that they want to control their folder structure.

I can understand wanting to control SUB-folder structure but, if they're too thick to code their apps to understand where they're installed, they really have no business being in software development. Jeez, even a VBS can detect where it was launched from!
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Matthias1967

Matthias1967
  • Full Members
  • 92 posts

Posted 02 June 2009 - 09:33

VBScab, I agree with you that there are customer admins out there that want to be able to set their target folder (via INSTALLDIR on the command line), and I can understand those admins.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 02 June 2009 - 10:52

QUOTE (Matthias1967 @ 2009-06-02 06:30)
But there are customer admins that heavily urge software producers to let them set INSTALLDIR from the command line - and I can understand that they want to control their folder structure.

What do you want to achieve? In the opening post you stated that you want to prevent customer admins to set the install folder to a location on a network drive. Now you state that you understand the fact that a customer admin wants to install to a network drive?!

Edited by Zweitze, 02 June 2009 - 10:52.


Matthias1967

Matthias1967
  • Full Members
  • 92 posts

Posted 02 June 2009 - 14:49

Not actually to a network drive, but to a location different from the default INSTALLDIR.

As to network drives, there are situations where I want to know whether the target directory of a component is local.