![]() |
Folder location for Addins
Hi
I am deploying an xla applications on tens of computers spread all over the world and am wondering how I can get automaticaly (vbs script) the default location for Addins... Most of the time such a path will work WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\") BUT I also know that on French machines the final path is not "\Microsoft\AddIns\" but "&"\Microsoft\Macro Complementaire\" So is there someone who would know - how many different locations exist ? - how to find a way to automatically recover the exact location of a given machine My intention being to do that through a vbs script... Thanks to you Kind Regrads Alain |
Folder location for Addins
have a look at UserLibraryPath Property in excel vba help.
-- jb "Desaivres Alain" wrote: Hi I am deploying an xla applications on tens of computers spread all over the world and am wondering how I can get automaticaly (vbs script) the default location for Addins... Most of the time such a path will work WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\") BUT I also know that on French machines the final path is not "\Microsoft\AddIns\" but "&"\Microsoft\Macro Complementaire\" So is there someone who would know - how many different locations exist ? - how to find a way to automatically recover the exact location of a given machine My intention being to do that through a vbs script... Thanks to you Kind Regrads Alain |
Folder location for Addins
Why would you need to know the addin location? I have deployed many addins,
and I can't recall needing to know this. -- HTH Bob "Desaivres Alain" wrote in message ... Hi I am deploying an xla applications on tens of computers spread all over the world and am wondering how I can get automaticaly (vbs script) the default location for Addins... Most of the time such a path will work WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\") BUT I also know that on French machines the final path is not "\Microsoft\AddIns\" but "&"\Microsoft\Macro Complementaire\" So is there someone who would know - how many different locations exist ? - how to find a way to automatically recover the exact location of a given machine My intention being to do that through a vbs script... Thanks to you Kind Regrads Alain |
Folder location for Addins
Chip Pearson has a good description at
http://www.cpearson.com/EXCEL/installinganxla.aspx Personally I always install Addins and associated files (help files etc) in a user-chosen directory (default Program Files) by using an Install script. regards Charles Hi I am deploying an xla applications on tens of computers spread all over the world and am wondering how I can get automaticaly (vbs script) the default location for Addins... Most of the time such a path will work WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\") BUT I also know that on French machines the final path is not "\Microsoft\AddIns\" but "&"\Microsoft\Macro Complementaire\" So is there someone who would know - how many different locations exist ? - how to find a way to automatically recover the exact location of a given machine My intention being to do that through a vbs script... Thanks to you Kind Regrads Alain |
Folder location for Addins
forgot to add that you may find following code useful as well.
Sub FindAddins() With Worksheets(1) .Rows(1).Font.Bold = True .Range("a1:d1").Value = _ Array("Name", "Full Name", "Title", "Installed") For i = 1 To AddIns.Count .Cells(i + 1, 1) = AddIns(i).Name .Cells(i + 1, 2) = AddIns(i).FullName .Cells(i + 1, 3) = AddIns(i).Title .Cells(i + 1, 4) = AddIns(i).Installed Next .Range("a1").CurrentRegion.Columns.AutoFit End With End Sub -- jb "john" wrote: have a look at UserLibraryPath Property in excel vba help. -- jb "Desaivres Alain" wrote: Hi I am deploying an xla applications on tens of computers spread all over the world and am wondering how I can get automaticaly (vbs script) the default location for Addins... Most of the time such a path will work WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\") BUT I also know that on French machines the final path is not "\Microsoft\AddIns\" but "&"\Microsoft\Macro Complementaire\" So is there someone who would know - how many different locations exist ? - how to find a way to automatically recover the exact location of a given machine My intention being to do that through a vbs script... Thanks to you Kind Regrads Alain |
Folder location for Addins
Yes understood and can be the case I'll do it that way in a near futur...
For the moment "my" users (around 150) are used to do it themselves inside the "per default" location and in order not to modify all at the same time, my willing was while using now a vbs script for the installation to place the xla application at the place they are used to find it... Which mean ....\Microsoft\Application Data\Addins\ The problem being that this location seems to be atached to the office native country... Having for example ...\Microsoft\Macros Complementaires for pure french Office... I also have the feeling that this kind of location have desappeared with office 2007 but not sure... Thanks for your contribution Regards Alain |
Folder location for Addins
Thanks for this input but then how to place such a command inside a script file
What to place i spite of application inside "Application.UserLibraryPath" Sorry for this silly question but I am not yet so used with scripting... More or less same question concerning the code you suggested in order to list Addins... Is it possible to run such a code into a script while Excel is switched off... ? Thanks once more Regards Alain |
Folder location for Addins
Hi...
Point1 = with my script supposed to run on logon I just want to be able to update an xla file with a new version having the same name and this without disturbing the user... Point2 = why in this specific location ? my users are already used to activate their addins manually through standard addins activation window, then my intention is not to change that point, for teh moment... The suggestion given per john and based on the command Application.UserLibraryPath is rather interesting for me but I do not know yet know how to use such a command inside a vbscript... erhaps it's even not possible ! Regards Alain Regards Alain "Charles Williams" wrote: Chip Pearson has a good description at http://www.cpearson.com/EXCEL/installinganxla.aspx Personally I always install Addins and associated files (help files etc) in a user-chosen directory (default Program Files) by using an Install script. regards Charles |
Folder location for Addins
It would be
addinPath = Application.UserLibraryPath but if the code is in the addin (why else would you have an addin), then why would you not use addinPath = ThisWorkbook.Path or even if you are accessing an adding from another addin you could use addinPath = Workbooks("other addin.xla").Path or addinName = Workbooks("other addin.xla").FullName -- HTH Bob "Desaivres Alain" wrote in message ... Hi... Point1 = with my script supposed to run on logon I just want to be able to update an xla file with a new version having the same name and this without disturbing the user... Point2 = why in this specific location ? my users are already used to activate their addins manually through standard addins activation window, then my intention is not to change that point, for teh moment... The suggestion given per john and based on the command Application.UserLibraryPath is rather interesting for me but I do not know yet know how to use such a command inside a vbscript... erhaps it's even not possible ! Regards Alain Regards Alain "Charles Williams" wrote: Chip Pearson has a good description at http://www.cpearson.com/EXCEL/installinganxla.aspx Personally I always install Addins and associated files (help files etc) in a user-chosen directory (default Program Files) by using an Install script. regards Charles |
Folder location for Addins
Thanks for your help I have finaly found my way... Here it is On Error Resume Next Set appXL = CreateObject("Excel.Application") If Err = 0 Then addin_folder = appXL.UserLibraryPath Else addin_folder = _ WshShell.ExpandEnvironmentStrings ("%APPDATA%"&"\Microsoft\AddIns\") End If On Error Goto 0 Set appXL = Nothing Regards Alain |
All times are GMT +1. The time now is 04:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com