-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileSearch #233
Comments
Correct. It does not. File/Registry/Component/Directory/IniFile Search is one of those convoluted MSI concepts that MS had to go with due to the MSI limitations. WixSharp lifts manu of those limitations and now one can have a proper routine with complex condition and flow control. Look how cleaner, more natural and more intuitive it can be done with WixSharp: static public void Main(string[] args)
{
var project = new ManagedProject("DreamProduct",
...
project.AfterInstall += session =>
{
var browser_exe = (string)Registry.GetValue(@"SYSTEM\CurrentControlSet\services\SQLBrowser",
"ImagePath", null);
if (File.Exists(browser_exe))
Process.Start(browser_exe);
}; Don't want to use ManagedProject? Still can do... static public void Main(string[] args)
{
var project = new Project("CustomActionTest",
...
new ManagedAction(CustomActions.StartSQLBrowser, ... Condition.NOT_Installed));
...
public class CustomActions
{
[CustomAction]
public static ActionResult StartSQLBrowser(Session session)
{
var browser_exe = (string)Registry.GetValue(@"SYSTEM\CurrentControlSet\services\SQLBrowser",
"ImagePath", null);
if (File.Exists(browser_exe))
Process.Start(browser_exe);
return ActionResult.Success;
}
} Saying that, I already have compromised once for RegistrySearch, which is implemented as Thus I am putting it for voting. If community up votes this feature request, then be it. |
Change of heart... :) After some more considerations I decided to proceed with this feature. Nothing has changed. I do believe the MSI/WiX API paradigm is rather faulty, but... I cannot ignore the fact that some users are facing the task of porting legacy WiX solutions. In some cases using managed Custom Actions can also be difficult (hard to imagine but...). Thus accomplishing the tasks in such cases can be difficult. Anyway, I scheduled it for the next release. |
Done. Will be available in the next release: new Property("SQL_BROWSER_LOCATION",
new RegistrySearch(RegistryHive.LocalMachine, @"SYSTEM\CurrentControlSet\services\SQLBrowser", "ImagePath", RegistrySearchType.file,
new FileSearch("sqlbrowser.exe"))) |
Great news. Thank you so much. |
This opens the gates for the implementation of all other |
---- * Migration of WixSharp types to IGenericEntity model: * Rework Certificate using IGenericEntity * Rework SqlDatabase, SqlString and SqlScript using IGenericEntity * Rework DriverInstaller using IGenericEntity * Rework FirewallException using IGenericEntity * Rework EnvironmentVariable using IGenericEntity * Rework FirewallException using IGenericEntity * Rework User using IGenericEntity * Rework IniFile using IGenericEntity * Added support for new WiX types: * CloseAppplication * RemoveRegistryKey * Defect fixes: * Issue #258: WixSharp doesn't remove temporary files if custom output name is specified * Issue #251: Passing UseCertificateStore parameter from DigitalSignatureBootstrapper * Issue #247: Handling null TimeUrl * Issue #251: Passing UseCertificateStore parameter from DigitalSignatureBootstrapper through to DigitallySign * Issue #233: FileSearch * Issue #230: CustomAction Condition extension * Issue #226: Project.HashedTargetPathIdAlgorithm generates invalid ids * Various improvements and minor fixes: * Fixed the problem with EnvironmentVariable not having XML parent when it is hosted by the component-less WiX (e.g. ConsumingMergeModule sample). * CustomAction.UsesProperties & .RollbackArgs space trimming * Trim all spaces around properties (name and value) before passing to msi * CommonTasks.InstallService fix & new overload * Fixed installService args location, added overload that accepts username and password * Added `WixObject.MapComponentToFeatures` to assist with implementation of IGenericEntity based WiX objects. * fix "CustomActionRef.When" property handling in compile. * change to use just WixSharp.When.ToString() * fix CustomActionRef will add "Before" attribute in Custom Element even if set When.After * Added extension methods for - `Project.Add(IGenericEntity[])` - `File.Add(IGenericEntity[])` - `Dir.Add(IGenericEntity[])` * AppVeyor integration (https://ci.appveyor.com/project/oleg-shilo/wixsharp)
---- * Migration of WixSharp types to IGenericEntity model: * Rework Certificate using IGenericEntity * Rework SqlDatabase, SqlString and SqlScript using IGenericEntity * Rework DriverInstaller using IGenericEntity * Rework FirewallException using IGenericEntity * Rework EnvironmentVariable using IGenericEntity * Rework FirewallException using IGenericEntity * Rework User using IGenericEntity * Rework IniFile using IGenericEntity * Added support for new WiX types: * CloseAppplication * RemoveRegistryKey * Defect fixes: * Issue #258: WixSharp doesn't remove temporary files if custom output name is specified * Issue #251: Passing UseCertificateStore parameter from DigitalSignatureBootstrapper * Issue #247: Handling null TimeUrl * Issue #251: Passing UseCertificateStore parameter from DigitalSignatureBootstrapper through to DigitallySign * Issue #233: FileSearch * Issue #230: CustomAction Condition extension * Issue #226: Project.HashedTargetPathIdAlgorithm generates invalid ids * Various improvements and minor fixes: * Fixed the problem with EnvironmentVariable not having XML parent when it is hosted by the component-less WiX (e.g. ConsumingMergeModule sample). * CustomAction.UsesProperties & .RollbackArgs space trimming * Trim all spaces around properties (name and value) before passing to msi * CommonTasks.InstallService fix & new overload * Fixed installService args location, added overload that accepts username and password * Added `WixObject.MapComponentToFeatures` to assist with implementation of IGenericEntity based WiX objects. * fix "CustomActionRef.When" property handling in compile. * change to use just WixSharp.When.ToString() * fix CustomActionRef will add "Before" attribute in Custom Element even if set When.After * Added extension methods for - `Project.Add(IGenericEntity[])` - `File.Add(IGenericEntity[])` - `Dir.Add(IGenericEntity[])` * AppVeyor integration (https://ci.appveyor.com/project/oleg-shilo/wixsharp)
It looks like Wix# does not support FileSearch.
Can you implement it? I think I can not handle it. :)
Example:
The text was updated successfully, but these errors were encountered: