Can it install itself without using InstallUtil? Should I use the service installer class? Here is a class I use when writing services. I usually have an interactive screen that comes up when the service is not called.
Important In some cases, parameters passed to the installer may include sensitive or personally identifiable information, which, by default, is written to a plain text log file. To prevent this behavior, you can suppress the log file by specifying /LogFile= (with no filename argument) after Installutil.exe on the command line. Remarks.NET Framework applications consist of traditional program files and associated resources, such as message queues, event logs, and performance counters that must be created when the application is deployed. You can use an assembly's installer components to create these resources when your application is installed and to remove them when your application is uninstalled. Installutil.exe detects and executes these installer components.
![]()
You can specify multiple assemblies on the same command line. Any option that occurs before an assembly name applies to that assembly's installation. Except for /u and /AssemblyName, options are cumulative but overridable. That is, options specified for one assembly apply to all subsequent assemblies unless the option is specified with a new value. If you run Installutil.exe against an assembly without specifying any options, it places the following three files into the assembly's directory:.
InstallUtil.InstallLog - Contains a general description of the installation progress. assemblyname.InstallLog - Contains information specific to the commit phase of the installation process. For more information about the commit phase, see the method.
assemblyname.InstallState - Contains data used to uninstall the assembly. Installutil.exe uses reflection to inspect the specified assemblies and to find all types that have the attribute set to true. The tool then executes either the or the method on each instance of the type. Installutil.exe performs installation in a transactional manner; that is, if one of the assemblies fails to install, it rolls back the installations of all other assemblies. Uninstall is not transactional. Installutil.exe cannot install or uninstall delay-signed assemblies, but it can install or uninstall strong-named assemblies. Starting with the.NET Framework version 2.0, the 32-bit version of the common language runtime (CLR) ships with only the 32-bit version of the Installer tool, but the 64-bit version of the CLR ships with both 32-bit and 64-bit versions of the Installer tool.
When using the 64-bit CLR, use the 32-bit Installer tool to install 32-bit assemblies, and the 64-bit Installer tool to install 64-bit and Microsoft intermediate language (MSIL) assemblies. Both versions of the Installer tool behave the same. You cannot use Installutil.exe to deploy a Windows service that was created by using C, because Installutil.exe cannot recognize the embedded native code that is produced by the C compiler.
If you try to deploy a C Windows service with Installutil.exe, an exception such as will be thrown. To work with this scenario, move the service code to a C module, and then write the installer object in C# or Visual Basic.
Examples The following command displays a description of the command syntax and options for InstallUtil.exe. Installutil /? The following command displays a description of the command syntax and options for InstallUtil.exe. It also displays a description and list of options supported by the installer components in myAssembly.exe if help text has been assigned to the installer's property.
Installutil /? MyAssembly.exe The following command executes the installer components in the assembly myAssembly.exe. Installutil myAssembly.exe The following command executes the installer components in an assembly by using the /AssemblyName switch and a fully qualified name. Installutil /AssemblyName 'myAssembly, Culture=neutral, PublicKeyToken=0038abc9deabfle5, Version=4.0.0.0' The following command executes the installer components in an assembly specified by file name and in an assembly specified by strong name.
Note that all assemblies specified by file name must precede assemblies specified by strong name on the command line, because the /AssemblyName option cannot be overridden. Installutil myAssembly.exe /AssemblyName 'myAssembly, Culture=neutral, PublicKeyToken=0038abc9deabfle5, Version=4.0.0.0' The following command executes the uninstaller components in the assembly myAssembly.exe. Installutil /u myAssembly.exe The following command executes the uninistaller components in the assemblies myAssembly1.exe and myAssembly2.exe. Installutil myAssembly1.exe /u myAssembly2.exe Because the position of the /u option on the command line is not important, this is equivalent to the following command. Installutil /u myAssembly1.exe myAssembly2.exe The following command executes the installers in the assembly myAssembly.exe and specifies that progress information will be written to myLog.InstallLog.
Installutil /LogFile=myLog.InstallLog myAssembly.exe The following command executes the installers in the assembly myAssembly.exe, specifies that progress information should be written to myLog.InstallLog, and uses the installers' custom /reg option to specify that updates should be made to the system registry. Installutil /LogFile=myLog.InstallLog /reg=true myAssembly.exe The following command executes the installers in the assembly myAssembly.exe, uses the installer's custom /email option to specify the user's email address, and suppresses output to the log file. Installutil /LogFile= /[email protected] myAssembly.exe The following command writes the installation progress for myAssembly.exe to myLog.InstallLog and writes the progress for myTestAssembly.exe to myTestLog.InstallLog.
Installutil /LogFile=myLog.InstallLog myAssembly.exe /LogFile=myTestLog.InstallLog myTestAssembly.exe See Also Feedback.
Error after trying to install something: 'The Windows Installer service could not be accessed. This can occur if the windows Installer is not correctly installed.
Contact your support personnel for assistance.' I can't even install ALL of my windows updates: Error 641 from windows updater. I've had this problem for quite a few months now and just when I buy a game to play with my friends (DayZ) I try to install the software required to play the game and this thing just won't go away!
What I've tried for help: I would really appreciate it if someone could help me fix this problem and find a way to get rid of this(oh and yes my Windows 7 is legit I've even done the Net Start run command -That is the error I get after trying to do it.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |