Citation :
I find another way to update the SourceList of pre-deployed packages. I create a VBS launched at startup that update the SourceList with adding the new UNC path
Here an exemple of script (for adding an UNC path)
Code :
- Const ProductCode= "{31CB5031-C850-416C-B7B2-EEC53356118B}" : 'an exemple of ProductCode
- Const SID = "" : 'UserSid must be NULL for per-machine context. UserSid can be null to specified current user, when context is not per-machine.
- Const SourcePath="\\xxx\yyy\zzz\"
- 'Const SourcePath = "http://www/yyy/zzz/"
- Const msiInstallSourceType = 1 : 'MSISOURCETYPE_NETWORK
- 'Const msiInstallSourceType = 2 : 'MSISOURCETYPE_URL
- 'Const msiInstallContext = 1 : 'Products under managed context.
- 'Const msiInstallContext = 2 : 'Products under unmanaged context.
- Const msiInstallContext = 4 : 'Products under machine context.
- Const Index = 0
- Dim Installer, Product
- Set Installer = CreateObject("WindowsInstaller.Installer" )
- Set Product = Installer.Product(ProductCode,SID,msiInstallContext)
- Product.SourceListAddSource msiInstallSourceType,SourcePath,Index
|
If you prefer URL path for the same product, switch in this script the settings SourcePath and msiInstallSourceType to the others values
NB : in my case, i choose msiInstallContext = 4 (Products under machine context). You'll have to define yours
More info about product object :
http://msdn.microsoft.com/library/ [...] object.asp
|