无忧启动论坛

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

求助-------代码分析

[复制链接]
跳转到指定楼层
1#
发表于 2007-9-13 15:13:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
IBM + PM + ghost 8.3 一键还原光盘版安装程序

IBM + PM + ghost 8.3 一键还原光盘版安装程序

安装分三个部分
第一是 PQPM 脚本自动划分空间大小  卷标为 IBM_SERVICE
第二是把自制作的ghost备份还原代码拷到划分的 卷标为 IBM_SERVICE 分区里
第三安装IBM F11 隐藏 卷标为 IBM_SERVICE 分区。实现一键启动。


以下是自制作的ghost备份还原代码安装到划分的 卷标为 IBM_SERVICE 分区里

@echo off
set bian=z
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=y
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=x
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=w
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=v
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=u
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=t
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=s
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=r
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=q
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=p
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=o
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=n
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=m
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=l
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=k
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=j
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=i
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=h
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=g
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=f
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=e
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=d
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

set bian=c
dir c:\  >%bian%:\yjhf.txt
if exist %bian%:\yjhf.txt goto copy

:copy

TW /np /n3 > nul
cls
@ ECHO 找到“IBM_SERVICE”隐藏分区
@ ECHO 正在安装,请等候……
copy  ghost.sys %bian%:\ghost.cab >nul
copy  ebd.sys  %bian%:\ebd.cab >nul
ghost /y /l %bian%:\ /e %bian%:\ghost.cab >nul
copy  ghost.exe  %bian%:\extract.exe >nul
copy  restart.com  %bian%:\  >nul
del %bian%:\ghost.cab  >nul
dir %bian%:\  /w/a
@ ECHO ghost备份程序成功安装在“IBM_SERVICE”隐藏分区。
@ ECHO 请不要取出光盘,按任意键继续,进行第三步安装。
@ ECHO 重启后“安装 IBM F11 一键启动”。
Echo.
Echo.
Echo 有问题请QQ、Email、博客留言。
Echo QQ:279331909
Echo Email:wangrenmi20030610@163.com
Echo 百度博客:http://hi.baidu.com/yyzzkj
pause
%bian%:\restart.com
:end

========================================

测试结果:

测试一:
测试平台:Virtual PC
测试系统:winXP
安装前硬盘分区情况:C盘(FAT格式)、D盘(FAT格式)、E盘(FAT格式)、F盘(FAT格式)
安装后硬盘分区情况:C盘(FAT格式)、D盘(FAT格式)、E盘(FAT格式)、F盘(FAT格式)、G盘(FAT格式 IBM_SERVICE 隐藏分区)
测试结果:正常

======================================================

测试二:
测试平台:Virtual PC
测试系统:winXP
安装前硬盘分区情况:C盘(FAT格式)、D盘(NTFS格式)
安装后硬盘分区情况:C盘(FAT格式)、D盘(NTFS格式)、E盘(FAT格式 IBM_SERVICE 隐藏分区)
测试结果:自动划分指定大小的IBM_SERVICE隐藏分区正常,第二部分安装出现异常,自制的ghost备份代码全部安装到了C盘,正常情况应该安装在卷标为“IBM_SERVICE”的E盘里。

补充:
在纯DOS下手工命令只能访问C盘,无法访问IBM_SERVICE的分区,提示“Invalid drive spacification”,而进入WinXP系统后而能正常读写,不需要格式化就能用。
E盘空间是用PQPM 脚本将最后一个分区自动划分出来的(从NTFS格式的D盘)。


==========================================================

有谁知道是什么原因的请指点一下

[ 本帖最后由 wangrenmi 于 2007-9-13 05:31 PM 编辑 ]
2#
发表于 2007-9-13 15:43:29 | 只看该作者
不妨把@echo off去掉,中间加上几个pause,看看哪里出问题了,对你测试的情况而言,只需在TW /np /n3 > nul 之前加上一个pause就差不多了。
1,从批处理上讲,假如所有盘上都没找到你找的特征文件的话,就会自动拷贝到C:\,此情况不知是否是你希望的。
2,若使用循环,批处理可以简化不少。
如:
set drv_ibm=
for %%i in (t: s: r: q: p: o: n: m: l: k: j: i: h: g: f: e: d: c:) do if exist %%i\yjhf.txt  set drv_ibm=%%i
if %drv_ibm%#==# goto  notfind

:copy
......


:notfind
.....
回复

使用道具 举报

3#
发表于 2007-9-16 13:52:56 | 只看该作者
想按装在 卷标为 IBM_SERVICE 分区里:

@echo off
TW /np /n3 > nul
cls
for %%i in (D E F G H I J K L M N O P Q R S T U V W X Y Z) Do vol %%i: | find /i "IBM_SERVICE" >nul && Set bian=%%i && goto copy
echo 不存在IBM分区,安装中止!
goto end

:copy
@ ECHO 找到“IBM_SERVICE”隐藏分区
@ ECHO 正在安装,请等候……
copy  ghost.sys %bian%:\ghost.cab >nul
copy  ebd.sys  %bian%:\ebd.cab >nul
ghost /y /l %bian%:\ /e %bian%:\ghost.cab >nul
copy  ghost.exe  %bian%:\extract.exe >nul
copy  restart.com  %bian%:\  >nul
del %bian%:\ghost.cab  >nul
dir %bian%:\  /w/a
@ ECHO ghost备份程序成功安装在“IBM_SERVICE”隐藏分区。
@ ECHO 请不要取出光盘,按任意键继续,进行第三步安装。
@ ECHO 重启后“安装 IBM F11 一键启动”。
pause
%bian%:\restart.com
:end


在DOS下安装,需要FIND.EXE文件,自已找。
回复

使用道具 举报

4#
发表于 2007-9-26 13:31:21 | 只看该作者
NTFS格式支持加载了没!
你的D是NTFS, E又是要从D分出来.
认不到D,就没有E, 那都在C了..
回复

使用道具 举报

5#
 楼主| 发表于 2012-2-17 21:12:25 | 只看该作者
下载地址1:http://ishare.iask.sina.com.cn/f/23141844.html       【IBM_F11Key_Ghost测试版.iso】
下载地址2:http://ishare.iask.sina.com.cn/f/23141843.html       【 IBM_F11Key_Ghost测试版及工具资料.001.zip】

                   http://ishare.iask.sina.com.cn/f/23141845.html        【IBM_F11Key_Ghost测试版及工具资料.002.zip】
                   http://ishare.iask.sina.com.cn/f/23141846.html        【IBM_F11Key_Ghost测试版及工具资料.003.zip】
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2025-7-26 03:03

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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