安装的时候提示这样的错误???大家帮我看看是哪里出了问题?
-------------------------------------------------------------------
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 的前一状态。“回滚”阶段已成功完成。已完成事务处理安装。
安装失败,已执行回滚。
-------------------------------------------------------------------
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 的前一状态。“回滚”阶段已成功完成。已完成事务处理安装。
安装失败,已执行回滚。
解决方案 »
- C#用smtp发送邮件问题
- 实现 正则表达式 匹配
- SQL语句“update table1 set field=value,...”中的update是否具有新建记录的功能。还是只能更新已有记录。
- C#控制鼠标
- 在Web窗体中怎样使动态添加的控件显现出来?
- 怎样获得远程计算机的系统目录?如何将本地文件复制到该目录下?没有System.Managenment命名空间
- 如何取某一字段的数据类型//没分了
- .net高手请进(和iframe内框架相关问题)
- C#默认支持复数运算吗?
- 请教如何使用string类的format方法格式化一个字符串。
- 如何把combobox的样式置为flat外观
- 怎么對一窗體進行繼承?
不過要提醒你的是: windows2000server本身有這個功能.
受影响的参数是:
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 文件。
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过去。
删除:instsrv.exe 服务名 REMOVE在winxp 或更高可以使用内置的 sc 命令,你可以直接执行 SC 来了解用法