安装的时候提示这样的错误???大家帮我看看是哪里出了问题?
-------------------------------------------------------------------
C:\>installutil.exe c:\windowsservice1\bin\debug\windowsservice1.exe
Microsoft (R) .NET 框架安装实用工具版本 1.0.3705.0
Copyright (C) Microsoft Corporation 1998-2001. All rights reserved.
正在运行事务处理安装。正在开始安装的“安装”阶段。
查看日志文件的内容以获得 c:\windowsservice1\bin\debug\windowsservice1.exe 程序集
的进度。
该文件位于 c:\windowsservice1\bin\debug\windowsservice1.InstallLog。
正在安装程序集“c:\windowsservice1\bin\debug\windowsservice1.exe”。
受影响的参数是:
   assemblypath = c:\windowsservice1\bin\debug\windowsservice1.exe
   logfile = c:\windowsservice1\bin\debug\windowsservice1.InstallLog
正在安装服务 Service1...
正在日志 Application 中创建 EventLog 源 Service1...在“安装”阶段发生异常。
System.ComponentModel.Win32Exception: 帐户名无效或不存在,或者密码对于指定的帐户
名无效。正在开始安装的“回滚”阶段。
查看日志文件的内容以获得 c:\windowsservice1\bin\debug\windowsservice1.exe 程序集
的进度。
该文件位于 c:\windowsservice1\bin\debug\windowsservice1.InstallLog。
正在回滚程序集“c:\windowsservice1\bin\debug\windowsservice1.exe”。
受影响的参数是:
   assemblypath = c:\windowsservice1\bin\debug\windowsservice1.exe
   logfile = c:\windowsservice1\bin\debug\windowsservice1.InstallLog
正在将事件日志还原到源 Service1 的前一状态。“回滚”阶段已成功完成。已完成事务处理安装。
安装失败,已执行回滚。

解决方案 »

  1.   

    不懂.
    不過要提醒你的是: windows2000server本身有這個功能.
      

  2.   

    楼住,我把你的代码copy过来,如下信息:正在安装程序集“e:\winweb\winweb\bin\debug\winweb.exe”。
    受影响的参数是:
       assemblypath = e:\winweb\winweb\bin\debug\winweb.exe
       logfile = e:\winweb\winweb\bin\debug\winweb.InstallLog
    没有 RunInstallerAttribute 的公共安装程序。在 e:\winweb\winweb\bin\debug\winweb.exe 程序集中可能可以找到“Yes”属性。
    正在提交程序集“e:\winweb\winweb\bin\debug\winweb.exe”。
    受影响的参数是:
       assemblypath = e:\winweb\winweb\bin\debug\winweb.exe
       logfile = e:\winweb\winweb\bin\debug\winweb.InstallLog
    没有 RunInstallerAttribute 的公共安装程序。在 e:\winweb\winweb\bin\debug\winweb.exe 程序集中可能可以找到“Yes”属性。
    没有安装程序,因此移除 InstallState 文件。
      

  3.   

    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
     
    using System.IO;
    using System.Net;
    using System.Net.Sockets;
    namespace Console1
    {
     /// <summary>
     /// Class1 的摘要说明。
     /// </summary>
     
     class Class1
     {
      /// <summary>
      /// 应用程序的主入口点。
      /// </summary>
      
      
      [STAThread]
       
      static void Main(string[] args)
      {
       
      
       // If a directory is not specified, exit program.
    //   if(args.Length != 2)
    //   {
    //    // Display the proper way to call the program.
    //    Console.WriteLine("Usage: Watcher.exe (directory)");
    //    return;
    //   }
       // Create a new FileSystemWatcher and set its properties.
       FileSystemWatcher watcher = new FileSystemWatcher();
       watcher.Path = @"c:\mj";
       /* Watch for changes in LastAccess and LastWrite times, and 
          the renaming of files or directories. */
       watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite 
        | NotifyFilters.FileName | NotifyFilters.DirectoryName;
       // Only watch text files.
       watcher.Filter = "*.txt";
       // Add event handlers.
       watcher.Changed += new FileSystemEventHandler(OnChanged);
       watcher.Created += new FileSystemEventHandler(OnChanged);
       watcher.Deleted += new FileSystemEventHandler(OnChanged);
       watcher.Renamed += new RenamedEventHandler(OnRenamed);
     
       // Begin watching.
       watcher.EnableRaisingEvents = true;
     
       // Wait for the user to quit the program.
       Console.WriteLine("Press \'q\' to quit the sample.");
       while(Console.Read()!='q');
     
     
     
      }
      
      
     
     
      // Define the event handlers.
      public static void OnChanged(object source, FileSystemEventArgs e)
      {
       // Specify what is done when a file is changed, created, or deleted.
       Console.WriteLine("File: " +  e.FullPath + " " + e.ChangeType);
       
      }
     
      public static void OnRenamed(object source, RenamedEventArgs e)
      {
       // Specify what is done when a file is renamed.
    /在这里实现你要实现的功能:具体怎么写就看你的需求了
       File.Copy(e.FullPath,"c:\\mj\\dd.txt");
       Console.WriteLine("File: {0} renamed to {1}", e.OldFullPath, e.FullPath);
      }
     
     
     }
    }
     
     
    //这是一个控制台程序,你可copy过去。
      

  4.   

    你的问题似乎是出现在安装上,是否是你在做MSI 时本地帐号与目标帐号不符或者根本没设置过帐号?对你的问题只能表示同情,我帮不了你,我的做法不同我从来不用有依赖性的东西或者执行、托付给自己不明白的东西,包括TMD 所谓的“企业级”,也就是说,我做网页不用Frontpage 或dw,写程序不用IDE(布局除外),做安装不用MSI或第三方安装软件所以我对水晶报表、dategrid、MSI 等等都不熟悉,关于它们的问题几乎都答不上来。。通常情况下我们都是用自己的方法去实现,这样的话在移植、转换平台转换语言、并且在控制上都非常的方便否则,这些东西在使用时正常时你什么都不知道,不正常时你还是什么也不知道(报出一堆的函数名和错误参数给我们打长途问?)。。我做的services 全部是使用 instsrv.exe 来安装和删除,该工具位于win2k 资源kit 盘上找到(http://postboy.myetang.com/files/instsrv.exe)用法安装:instsrv.exe 服务名 exe文件名 -a 帐号名 -p 密码
    删除:instsrv.exe 服务名 REMOVE在winxp 或更高可以使用内置的 sc 命令,你可以直接执行 SC 来了解用法