Windows > Windows Forms Forums > ClickOnce and Setup & Deployment Projects > Publishing to Program Files folder in other languages...
Ask a questionAsk a question
 

AnswerPublishing to Program Files folder in other languages...

  • Tuesday, November 03, 2009 7:34 PMAlGamez Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    I'm trying to Publish a document created with VSTO for Office 2003. In the location to publish the application I don't want to supply the specific path to 'Progam Files' because this documents will be used by user with Windows in other languages and in those installations that folder name is different (eg. Spanish is 'Archivos de Programa'). I'm trying to put something like "%ProgramFiles\MyApp", but instead of resolving the variable, the publishing process creates a folder named '%ProgramFiles%".

    Anyone with a clue about this.

    Thanks in advance.

Answers

  • Thursday, November 05, 2009 11:31 AMAland LiMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi AlGamez,

    If you created a Setup Project to publish, we need to set the DefaultLocation property to custom the install directory. When we right click the Application Folder in File System view in the Setup Project to open the properties dialog, we can find a property named DefaultLocation. The default value of the DefaultLocation property is [ProgramFilesFolder][Manufacturer]\[ProductName]
    The begin part([ProgramFilesFolder]) is a msi property, it is dependent on the language of the operation system. In other words, it would change if you install the msi package on a machine of different language. So I think you need to do nothing to achieve your goal. If you want to set it to a const directory, you can set this property to a custom directory, such as C:\test. The thread below talks about the similar issue.

    If you publish the project via ClickOnce, you cannot modify the install directory as far as I know and I think it is unnecessary to change it. The directory often looks like this: “C:\Users\[Your Name]\AppData\Local\Apps\2.0”. Since the directory is included in the current user’s local directory, this would reduce some issues about privilege during installation.

    Let me know if this helps or not.
    Aland Li


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.

All Replies

  • Wednesday, November 04, 2009 6:37 PMPhilWilsonModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Is this ClickOnce?
    Phil Wilson
  • Thursday, November 05, 2009 11:31 AMAland LiMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi AlGamez,

    If you created a Setup Project to publish, we need to set the DefaultLocation property to custom the install directory. When we right click the Application Folder in File System view in the Setup Project to open the properties dialog, we can find a property named DefaultLocation. The default value of the DefaultLocation property is [ProgramFilesFolder][Manufacturer]\[ProductName]
    The begin part([ProgramFilesFolder]) is a msi property, it is dependent on the language of the operation system. In other words, it would change if you install the msi package on a machine of different language. So I think you need to do nothing to achieve your goal. If you want to set it to a const directory, you can set this property to a custom directory, such as C:\test. The thread below talks about the similar issue.

    If you publish the project via ClickOnce, you cannot modify the install directory as far as I know and I think it is unnecessary to change it. The directory often looks like this: “C:\Users\[Your Name]\AppData\Local\Apps\2.0”. Since the directory is included in the current user’s local directory, this would reduce some issues about privilege during installation.

    Let me know if this helps or not.
    Aland Li


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.