locked
Setup program - Shared folders RRS feed

  • Question

  • Hi guys,

     

    An add in I'm trying to install, needs to put a file in one of the shared folders so that all users can access it.

    What path should I use in my installer to write it to? So that the user could then go to \\server\software to get the file.

     

    Thanks,

    Nick

    Friday, April 11, 2008 10:03 PM

Answers

  • I see no reason why your add-in's installer wouldn't be able to access the server's shares directly:

    \\%computername%\software\NicksAddin
    Saturday, April 12, 2008 12:49 PM
    Moderator

All replies

  • I see no reason why your add-in's installer wouldn't be able to access the server's shares directly:

    \\%computername%\software\NicksAddin
    Saturday, April 12, 2008 12:49 PM
    Moderator
  • Or write to d:\shares\software\NicksAddin

     

    The problem is the localization. An English and German WHS use both Software, but a French one uses Logiciel.

     

    Regards

    Martin

     

    Monday, April 28, 2008 8:33 PM
    Moderator
  • Most likely one could do something fancy to get the correct folder name. Writing to D:\Shares\etc. is a no-no, however. It works fine, but we're supposed to go through the shares for all storage pool access.
    Monday, April 28, 2008 9:36 PM
    Moderator
  • Sure, but that's not as easy to do in a WIX based installer.

    Regards
    Martin
    Tuesday, April 29, 2008 6:10 AM
    Moderator
  • Atm I hardcoded it to d:\... but indeed this isn't the way to do it... :-(

    I will have a look in the WHS registry, maybe it is stored there somewhere... (hopefully)

     

    I'll let you guys know if I find something.

     

    Nick

    Tuesday, April 29, 2008 6:38 AM
  • It's stored in the registry - but the key is a GUID and this is different on each installation.
    That's the reason why I said it's not easy to do in WIX.

    Regards
    Martin
    Tuesday, April 29, 2008 6:57 AM
    Moderator
  • Nick, I still think that \\%computername%\sharename is viable. Or you can use \\localhost\sharename.
    Tuesday, April 29, 2008 11:32 AM
    Moderator
  • Hi Ken,

     

    But how do I know what the name of the share is?

    Like another user said, in the french version it is 'logiciel'.

     

    So you have:

    WHS english/german: \\server\software

    WHS french: \\server\logiciel

     

    So atm I'm stuck with that :-(

     

    In the installer I could check if the share exists, but if another language comes along that would have to be added to the installer every time :-/

    Tuesday, April 29, 2008 11:50 AM
  • Use Microsoft.HomeServer.Controls.ShareManager.SoftwareShareName

    Tuesday, April 29, 2008 2:17 PM
    Moderator
  •  

    Yes I just found that also, but how can I access it from my installer?

    If it doesn't work out, I can still do it 'quick & dirty', by creating a console app that reads in that property and writes it to the registry and then let the installer read that entry.

    But it's not the kind of thing I like to do...

    Tuesday, April 29, 2008 2:25 PM
  • I only used WIX once,  hence I am not that familiar with it; usually use the MSI included in Visual Studio and use Orca to patch things up.
    But can’t you just add a reference to HomeServerControls.dll?

    Tuesday, April 29, 2008 2:28 PM
    Moderator
  • Well I do the same, I don't like WIX.

    But that is an assembly so it doesn't export anything natively.

    And as I am accessing it from a native installer, I can't access the classes themselves.

     

    hmmmm, the more I think about it, the more I think the custom console app will save me a lot of time & trouble. :-/

    Tuesday, April 29, 2008 2:36 PM
  •  Nick Journals wrote:
    In the installer I could check if the share exists, but if another language comes along that would have to be added to the installer every time :-/
    This is generally referred to as "Localization" and yes, it's a pain in the butt. It's something every ISV has to deal with, though. There are ways to find the information (Alexander K has provided one, I think) so perhaps you will need to build a custom installer that your .msi runs...
    Tuesday, April 29, 2008 2:38 PM
    Moderator
  •  

    Yes i second what Ken Warren is saying... add an installer to your assembly which can reference the dll and use a custom action to invoke it.
    Tuesday, April 29, 2008 2:44 PM
    Moderator
  • Anyone have a solution to this yet?

     

    PS: What are the existing share-folders out there?

    Currently we have:

    English & German = Software

    French = Logiciel

    Spanish = ???

    ... = ???

    There are a lot of SKU's out there already:

    • CCQ-00061 – English
    • CCQ-00060 – German
    • CCQ-00058 – French
    • CCQ-00057 – Spanish ???
    • CCQ-00019 – Japanese ???
    • CCQ-00068 – Chinese Simplified ???
    • CCQ-00069 – Chinese Traditional ???
    • CCQ-00070 – Chinese Traditional Hong Kong ???

    Nick

    Friday, August 1, 2008 6:46 AM
  • Nick - did you ever find a solution to your problem? I'm facing a similar issue where I'd like to know those shares from a 3rd party application (not the WHS add-in).

    Michael
    Friday, February 20, 2009 1:16 PM