This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- installshield 2009 automation - Add NT Service
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 04, 2010
08:02 AM
installshield 2009 automation - Add NT Service
How can I add NT Service to my component using vbs or C#?
I need example. Please help
My sample code (C#):
ISWiAuto15.ISWiProject project = new ISWiAuto15.ISWiProject();
project.CreateProject("c:\\ism\\test07.ism", ISWiAuto15.ISWiProjectType.eptMsi);
project.OpenProject("c:\\ism\\test07.ism",false);
project.ProductCode = project.GenerateGUID();
project.ProductVersion = "1.0";
project.ProductName = "Name 123";
ISWiAuto15.ISWiComponent component;
component = project.AddComponent("Component123");
component.AddFile("c:\\tftp.exe");
project.AddFeature("MyFeature123").AttachComponent(component);
project.SaveProject();
project.CloseProject();
I need example. Please help
My sample code (C#):
ISWiAuto15.ISWiProject project = new ISWiAuto15.ISWiProject();
project.CreateProject("c:\\ism\\test07.ism", ISWiAuto15.ISWiProjectType.eptMsi);
project.OpenProject("c:\\ism\\test07.ism",false);
project.ProductCode = project.GenerateGUID();
project.ProductVersion = "1.0";
project.ProductName = "Name 123";
ISWiAuto15.ISWiComponent component;
component = project.AddComponent("Component123");
component.AddFile("c:\\tftp.exe");
project.AddFeature("MyFeature123").AttachComponent(component);
project.SaveProject();
project.CloseProject();
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 04, 2010
01:20 PM
InstallShield automation interface currently does not support adding NT services to your projects. I filed the work order #IOA-000057629 so that we will take into cosideration for a future release.
If your .ism project file is stored in Binary format, you can write to the ISM tables (ServiceControl and ServiceInstall) directly using Windows Installer Automation, as described in this old DevLetter tip: Using MSI Automation to Modify a Developer 7 Project.
If your .ism project file is stored in Binary format, you can write to the ISM tables (ServiceControl and ServiceInstall) directly using Windows Installer Automation, as described in this old DevLetter tip: Using MSI Automation to Modify a Developer 7 Project.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 04, 2010
02:45 PM
Time and time again I discover that there are countless items that the automation interface doesn't do. Do you think you could write a ticket that generically covers them all?
I.e. there shouldn't be a single control and I can click on the IDE that I can't also programatically update. The UI shouldn't have any access to the datalayer without going through the same business layer that is exposed to the automation interface.
My guess is there is only about 80% coverage for the automation interface.
I.e. there shouldn't be a single control and I can click on the IDE that I can't also programatically update. The UI shouldn't have any access to the datalayer without going through the same business layer that is exposed to the automation interface.
My guess is there is only about 80% coverage for the automation interface.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 05, 2010
02:27 AM
Can I modify ISM Tables (in Direct Editor) using ISWiAuto15?
I have error while open ISM file in DirectMode using Windows Installer Automation.
Type installerType = Type.GetTypeFromProgID("WindowsInstaller.Installer");
Installer installer = (Installer)Activator.CreateInstance(installerType);
Database database = installer.OpenDatabase("c:\\ism\\test04.ism", MsiOpenDatabaseMode.msiOpenDatabaseModeDirect);
But in ReadOnly mode I successfully open ISM file
Database database = installer.OpenDatabase("c:\\ism\\test04.ism", MsiOpenDatabaseMode.msiOpenDatabaseModeReadOnly);
I have error while open ISM file in DirectMode using Windows Installer Automation.
Type installerType = Type.GetTypeFromProgID("WindowsInstaller.Installer");
Installer installer = (Installer)Activator.CreateInstance(installerType);
Database database = installer.OpenDatabase("c:\\ism\\test04.ism", MsiOpenDatabaseMode.msiOpenDatabaseModeDirect);
But in ReadOnly mode I successfully open ISM file
Database database = installer.OpenDatabase("c:\\ism\\test04.ism", MsiOpenDatabaseMode.msiOpenDatabaseModeReadOnly);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 05, 2010
07:51 AM
What I always do in my build automation is use the Auto for everything I can and then call into the project property that allows me to switch the format from XML to Binary. You do check it into source control as xml, right? 🙂
Once it's in Binary format I use WiX DTF as my MSI interop library of choice. Microsoft.Deployment.WindowsInstaller is a wrapper for the win32 P/Invoke ( much better then COM interop ) and comes complete with support for IDispose via using(){} blocks. Search my blog for DTF for examples ... you will love it.
Once it's in Binary format I use WiX DTF as my MSI interop library of choice. Microsoft.Deployment.WindowsInstaller is a wrapper for the win32 P/Invoke ( much better then COM interop ) and comes complete with support for IDispose via using(){} blocks. Search my blog for DTF for examples ... you will love it.
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)