无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 2964|回复: 5
打印 上一主题 下一主题

sc create命令能用pecmd命令代替吗?

[复制链接]
跳转到指定楼层
1#
发表于 2011-5-18 16:53:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
在adds中启动snapman服务
1、需要sc.exe  net.exe net1.exe 支持
sc create snapman type= kernel start= boot binpath= "system32\DRIVERS\snapman.sys"
net start snapman

2、需要sc.exe支持
sc create snapman type= kernel start= boot binpath= "system32\DRIVERS\snapman.sys"
sc start snapman


sc create snapman type= kernel start= boot binpath= "system32\DRIVERS\snapman.sys"
pecmd serv snapman


3、能否用pecmd命令取代sc create snapman type= kernel start= boot binpath= "system32\DRIVERS\snapman.sys"来减少sc.exe文件?
2#
发表于 2011-5-18 17:15:15 | 只看该作者
用第2个选择就好了

sc.exe 只是几十k而已
回复

使用道具 举报

3#
发表于 2011-5-18 17:27:43 | 只看该作者
regi   + serv   ?
回复

使用道具 举报

4#
发表于 2011-5-18 18:01:04 | 只看该作者
保存为CMD ,还可以启动SYS为服务

@echo off
title 在PE下安装硬盘控制器驱动简单脚本 by chenall 2008-12-14
rem 使用方法:        1.可直接拖放,即把对应驱动的SYS文件拖放到这个程序的图标上.
rem                2.使用命令行pe_scsi.cmd [你的SYS文件]
rem ....http://www.366840202.cn......... ... .wuyou.net.........
rem ...
if "%1"=="" goto :eof
>"%temp%\scsi_serv.inf" echo.
>>"%temp%\scsi_serv.inf" echo.[Version]
>>"%temp%\scsi_serv.inf" echo.signature = "$Windows NT$"
>>"%temp%\scsi_serv.inf" echo.[DefaultInstall.Services]
>>"%temp%\scsi_serv.inf" echo.AddService = %~n1,,Service
>>"%temp%\scsi_serv.inf" echo.[Service]
>>"%temp%\scsi_serv.inf" echo.DisplayName = "%~n1 Service"
>>"%temp%\scsi_serv.inf" echo.Description = "%~1"
>>"%temp%\scsi_serv.inf" echo.ServiceType = 2
>>"%temp%\scsi_serv.inf" echo.StartType = 2
>>"%temp%\scsi_serv.inf" echo.ErrorControl = 1
>>"%temp%\scsi_serv.inf" echo.ServiceBinary = %%12%%\%~nx1
copy /y %1 %WinDir%\system32\drivers >nul
rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %temp%\scsi_serv.inf
if not errorlevel 1 (echo.%~nX1驱动安装成功!&pecmd serv %~n1&pause) else (echo.安装失败!&pause)
del /f /q "%temp%\scsi_serv.inf"
回复

使用道具 举报

5#
 楼主| 发表于 2011-5-19 09:20:54 | 只看该作者
dvd008,这个批处理在win7pe下不行,不知在03pe下怎样?

我还是内置注册表简单一点,把snapman.sys放入内核drviers下,还可节省sc.exe所需的几个dll文件。

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\_system\ControlSet001\Services\snapman]
"ErrorControl"=dword:00000001
"ImagePath"="system32\\DRIVERS\\snapman.sys"
"Start"=dword:00000000
"Type"=dword:00000001

其实snapapi.dll放到adds文件夹下就可以了,不需要复制到system32下。
回复

使用道具 举报

6#
发表于 2011-5-19 11:29:32 | 只看该作者
更新驱动时,只需要更换SYS即可

那个我03没问题.还有两个工具,也可以启动SYS为服务
但都需要几十K
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-2-26 00:31

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表