diff --git a/WpkgInstaller/ProjectInstaller.Designer.cs b/WpkgInstaller/ProjectInstaller.Designer.cs new file mode 100755 index 0000000000000000000000000000000000000000..08800457b6541039745e5b60460ad211f02e23e3 --- /dev/null +++ b/WpkgInstaller/ProjectInstaller.Designer.cs @@ -0,0 +1,59 @@ +namespace WpkgInstaller +{ + partial class ProjectInstaller + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.serviceProcessInstaller = new System.ServiceProcess.ServiceProcessInstaller(); + this.serviceInstaller = new System.ServiceProcess.ServiceInstaller(); + // + // serviceProcessInstaller + // + this.serviceProcessInstaller.Account = System.ServiceProcess.ServiceAccount.LocalSystem; + this.serviceProcessInstaller.Password = null; + this.serviceProcessInstaller.Username = null; + this.serviceProcessInstaller.AfterInstall += new System.Configuration.Install.InstallEventHandler(this.serviceProcessInstaller1_AfterInstall); + // + // serviceInstaller + // + this.serviceInstaller.Description = "Service to synchronize the state of WPKGs on this computer."; + this.serviceInstaller.ServiceName = "WpkgInstaller"; + // + // ProjectInstaller + // + this.Installers.AddRange(new System.Configuration.Install.Installer[] { + this.serviceProcessInstaller, + this.serviceInstaller}); + + } + + #endregion + + private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller; + private System.ServiceProcess.ServiceInstaller serviceInstaller; + } +} \ No newline at end of file diff --git a/WpkgInstaller/ProjectInstaller.cs b/WpkgInstaller/ProjectInstaller.cs new file mode 100755 index 0000000000000000000000000000000000000000..1e19c1d35bd889a9906ea6ae3f512bc503679499 --- /dev/null +++ b/WpkgInstaller/ProjectInstaller.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Configuration.Install; +using System.Linq; +using System.Threading.Tasks; + +namespace WpkgInstaller +{ + [RunInstaller(true)] + public partial class ProjectInstaller : System.Configuration.Install.Installer + { + public ProjectInstaller() + { + InitializeComponent(); + } + + private void serviceProcessInstaller1_AfterInstall(object sender, InstallEventArgs e) + { + + } + } +} diff --git a/WpkgInstaller/ProjectInstaller.resx b/WpkgInstaller/ProjectInstaller.resx new file mode 100755 index 0000000000000000000000000000000000000000..68e797efe74d0fe9a961aff9322d83b398a65987 --- /dev/null +++ b/WpkgInstaller/ProjectInstaller.resx @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="serviceProcessInstaller.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="serviceInstaller.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>328, 17</value> + </metadata> + <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>False</value> + </metadata> +</root> \ No newline at end of file diff --git a/WpkgInstaller/WpkgInstaller.Designer.cs b/WpkgInstaller/WpkgInstaller.Designer.cs index 3cc47e6d5ddc42c20e417e61924dd72c91b81c29..488aabd31fc70a1ec03204c451e979cf3f8dfc01 100755 --- a/WpkgInstaller/WpkgInstaller.Designer.cs +++ b/WpkgInstaller/WpkgInstaller.Designer.cs @@ -38,7 +38,7 @@ // // WpkgInstaller // - this.ServiceName = "Service1"; + this.ServiceName = "WpkgInstaller"; ((System.ComponentModel.ISupportInitialize)(this.eventLog)).EndInit(); } diff --git a/WpkgInstaller/WpkgInstaller.csproj b/WpkgInstaller/WpkgInstaller.csproj index 7a54c39fbf769e6b28e155efdabb6937503974ea..dbfefd7ef82152c7d23c092ea43b6178b31afbc3 100755 --- a/WpkgInstaller/WpkgInstaller.csproj +++ b/WpkgInstaller/WpkgInstaller.csproj @@ -34,7 +34,9 @@ </PropertyGroup> <ItemGroup> <Reference Include="System" /> + <Reference Include="System.Configuration.Install" /> <Reference Include="System.Core" /> + <Reference Include="System.Management" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="Microsoft.CSharp" /> @@ -44,11 +46,17 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="Service1.cs"> + <Compile Include="ProjectInstaller.cs"> <SubType>Component</SubType> </Compile> - <Compile Include="Service1.Designer.cs"> - <DependentUpon>Service1.cs</DependentUpon> + <Compile Include="ProjectInstaller.Designer.cs"> + <DependentUpon>ProjectInstaller.cs</DependentUpon> + </Compile> + <Compile Include="WpkgInstaller.cs"> + <SubType>Component</SubType> + </Compile> + <Compile Include="WpkgInstaller.Designer.cs"> + <DependentUpon>WpkgInstaller.cs</DependentUpon> </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> @@ -56,5 +64,13 @@ <ItemGroup> <None Include="App.config" /> </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="ProjectInstaller.resx"> + <DependentUpon>ProjectInstaller.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="WpkgInstaller.resx"> + <DependentUpon>WpkgInstaller.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> \ No newline at end of file