无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 11146|回复: 27
打印 上一主题 下一主题

抛砖引玉:利用ghost的ghststat.txt确定活动分区及最后有效分区的方法 [09.06.19]

[复制链接]
跳转到指定楼层
1#
发表于 2009-6-19 16:34:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
抛砖引玉:利用ghost的ghststat.txt确定活动分区及最后有效分区的方法 [09.06.19]

特点:此方法完全利用ghost自身的信息来进行一键恢复类工具所需的基本信息的处理。

1,用ghost -dd取得硬盘信息。
   
2,对生成的ghststat.txt进行处理,适用于ghost v8.0~ v11.02。

DOS处理脚本及结果见附图:






ghststat.txt文件内容:
*********************************
Date   : Fri Jun 19 08:14:26 2009
Error Number: (0)
Message: Stats Dump
Version: 11.0.2.1573 (Nov 14 2007, Build=1573)
OS Version: DOS v7.10
Command line arguments: -dd
Active Switches :
       AutoName
PathName            :
DumpFile            :
DumpPos             : 0
FlagImplode         : 0
FlagExplode         : 0
Operation Details :
  Total size.........0
  MB copied..........0
  MB remaining.......0
  Percent complete...0%
  Speed..............0 MB/min
  Time elapsed.......0:00   
  Time remaining.....0:00   
Program Call Stack
sub_main
main
Call Stack
  0x0039846c
  0x0009d011
  0x0000307e
  0x00004d09
  0x00003f2f
  0x003a1698
End Call Stack

Start heap available: 250216448
Cur   heap available: 250019840
Total Memory:         257753088
Allocated
   1024 DpmiDjgpp.cpp:56
  33504 ghost.cpp:1396
     48 DiskDriveAccessExInt13.cpp:152
    528 IdeDmaServerPci.cpp:127
    528 IdeDmaServerPci.cpp:127
    512 DiskDriveAccessExInt13.cpp:152
    512 DiskDriveAccessExInt13.cpp:152
Free
     16 MsdosLfoFilesystem.cpp:408
     80 DiskDriveAccessExInt13.cpp:115
    512 DiskDriveAccessInt13.cpp:189
   1024 DiskDriveAccessExInt13.cpp:236
   2048 DiskDriveAccessExInt13.cpp:236
  32768 BlockDeviceDosDrive.cpp:392
Fat details:
NTFS details:
----------------
NTFS Global Flags:
----------------
  contiguousWrite=1 forceDiskClusterMapping=0
  inhibitCHKDSK=1 ignoreBadLog=0 ignoreCHKDSKBit=0
  enable_cache=0 xfrbuflen=0
  last_attr_type = 0
  loadExact = 0
----------------
Disk Info :
  remote.............0
  drive..............0
  sectorsUsedCount.......10506069
  estimatedUsedCount.....0
  numPartitions..............8
  Version............0
# Ord Boot Id Ext     First        Num       Last       Used NTFS
0  0    0  1b No         63    2056257    2056320          0 No
1  1    1   b No    2056320    2457945    4514265          0 No
2  2    0   b Yes    4514328    1028097    5542425          0 No
3  3    0   7 Yes    5542488    3084417    8626905          0 No
4  4    0  83 Yes    8626968     417627    9044595          0 No
5  5    0  83 Yes    9044658     626472    9671130          0 No
6  6    0  82 Yes    9671193     626472   10297665          0 No
7  7    0   b Yes   10297728     208782   10506510          0 No
Disk Info :
  remote.............0
  drive..............0
  sectorsUsedCount.......0
  estimatedUsedCount.....0
  numPartitions..............0
  Version............0
# Ord Boot Id Ext     First        Num       Last       Used NTFS
Fixed Drives
Drive 128 CntxCorpHD
Int 13h
Total Sectors            16434495
Bytes per Sector         512
MB                       8024
Cylinders                1023
Heads                    255
Sectors per Track        63
Successful IO Count      0
Extended Int 13h (Active)
Total Sectors            33554304
Bytes per Sector         512
MB                       16383
Successful IO Count      199
IDE using PIO
Total Sectors            33554304
Bytes per Sector         512
MB                       16383
Cylinders                33288
Heads                    16
Sectors per Track        63
Successful IO Count      0
Drive 129 CntxCorpHD
Int 13h (Active)
Total Sectors            4185216
Bytes per Sector         512
MB                       2043
Cylinders                519
Heads                    128
Sectors per Track        63
Successful IO Count      103
Extended Int 13h
Total Sectors            4194288
Bytes per Sector         512
MB                       2047
Cylinders                4161
Heads                    16
Sectors per Track        63
Successful IO Count      0
IDE using PIO
Total Sectors            4194288
Bytes per Sector         512
MB                       2047
Cylinders                4161
Heads                    16
Sectors per Track        63
Successful IO Count      0
Floppy Drives
Drive 0
Int 13h (Active)
Total Sectors            18720
Bytes per Sector         512
MB                       9
Cylinders                260
Heads                    2
Sectors per Track        36
Successful IO Count      1
Extended Int 13h
Total Sectors            18720
Bytes per Sector         512
MB                       9
Cylinders                260
Heads                    2
Sectors per Track        36
Successful IO Count      0
Remote Drives
AsyncIo : 0
Image Devices
Key[1]   1.1:
Key[2]   1:1
Path     1.1:
Desc     1.1: [WIN_1]
Type     FAT
Disk     0
Offset   63
Key[1]   1.2:
Key[2]   1:2
Key[3]   C:
Path     C:
Desc     C: 1.2: [WINXP_C]
Type     FAT
Disk     0
Offset   2056320
Key[1]   1.3:
Key[2]   1:3
Key[3]   D:
Path     D:
Desc     D: 1.3: [PRO]
Type     FAT
Disk     0
Offset   4514328
Key[1]   1.4:
Key[2]   1:4
Path     1.4:
Desc     1.4: [DATA]
Type     NTFS
Disk     0
Offset   5542488
Key[1]   1.8:
Key[2]   1:8
Key[3]   E:
Path     E:
Desc     E: 1.8: [TEST4]
Type     FAT
Disk     0
Offset   10297728
Key[1]   2.1:
Key[2]   2:1
Path     2.1:
Desc     2.1: [SYSTEM]
Type     NTFS
Disk     1
Offset   63
Key[1]   2.2:
Key[2]   2:2
Path     2.2:
Desc     2.2: [DSK1_VOL2]
Type     NTFS
Disk     1
Offset   822591
Key[1]   2.3:
Key[2]   2:3
Path     2.3:
Desc     2.3: [DSK1_VOL3]
Type     NTFS
Disk     1
Offset   1846719
Key[1]   2.4:
Key[2]   2:4
Key[3]   F:
Path     F:
Desc     F: 2.4: [TEST_PRI2]
Type     FAT
Disk     1
Offset   3911103
Key[1]   A:
Path     A:
Desc     A:
Type     Floppy
Key[1]   @CD-R1
Path     @CD-R1
Desc     @CD-R1 CntxCorpC/DVD-ROM      
Type     CD

ConvMemoryAllocationFactoryDpmi diagnostic...
=============================================
Conventional Memory
Initial Conventional Memory Size = 419824
Current Conventional Memory Size = 346544
Allocated
   1024 DpmiDjgpp.cpp:56
  33504 ghost.cpp:1396
     48 DiskDriveAccessExInt13.cpp:152
    528 IdeDmaServerPci.cpp:127
    528 IdeDmaServerPci.cpp:127
    512 DiskDriveAccessExInt13.cpp:152
    512 DiskDriveAccessExInt13.cpp:152
Free
     16 MsdosLfoFilesystem.cpp:408
     80 DiskDriveAccessExInt13.cpp:115
    512 DiskDriveAccessInt13.cpp:189
   1024 DiskDriveAccessExInt13.cpp:236
   2048 DiskDriveAccessExInt13.cpp:236
  32768 BlockDeviceDosDrive.cpp:392

DiskManager diagnostic...
=========================
Fixed Drives
Drive 128 CntxCorpHD
Int 13h
Total Sectors            16434495
Bytes per Sector         512
MB                       8024
Cylinders                1023
Heads                    255
Sectors per Track        63
Successful IO Count      0
Extended Int 13h (Active)
Total Sectors            33554304
Bytes per Sector         512
MB                       16383
Successful IO Count      204
IDE using PIO
Total Sectors            33554304
Bytes per Sector         512
MB                       16383
Cylinders                33288
Heads                    16
Sectors per Track        63
Successful IO Count      0
Drive 129 CntxCorpHD
Int 13h (Active)
Total Sectors            4185216
Bytes per Sector         512
MB                       2043
Cylinders                519
Heads                    128
Sectors per Track        63
Successful IO Count      103
Extended Int 13h
Total Sectors            4194288
Bytes per Sector         512
MB                       2047
Cylinders                4161
Heads                    16
Sectors per Track        63
Successful IO Count      0
IDE using PIO
Total Sectors            4194288
Bytes per Sector         512
MB                       2047
Cylinders                4161
Heads                    16
Sectors per Track        63
Successful IO Count      0
Floppy Drives
Drive 0
Int 13h (Active)
Total Sectors            18720
Bytes per Sector         512
MB                       9
Cylinders                260
Heads                    2
Sectors per Track        36
Successful IO Count      1
Extended Int 13h
Total Sectors            18720
Bytes per Sector         512
MB                       9
Cylinders                260
Heads                    2
Sectors per Track        36
Successful IO Count      0
The following devices do not use an IRQ:
   (0x00, 0x00, 0x00):   IRQ: 0x00, INT#: -, Link: 0x00
      Class: Bridge, SubClass: Host/PCI
      Vendor: 0x8086, Device: 0x7192
   (0x00, 0x07, 0x00):   IRQ: 0x00, INT#: -, Link: 0x00
      Class: Bridge, SubClass: PCI/ISA
      Vendor: 0x8086, Device: 0x7110, RoutePINS: 0x00, 0x00, 0x00, 0x63,
   (0x00, 0x07, 0x01):   IRQ: 0x00, INT#: -, Link: 0x00
      Class: Mass Storage, SubClass: IDE Controller
      Vendor: 0x8086, Device: 0x7111, RoutePINS: 0x00, 0x00, 0x00, 0x63,
   (0x00, 0x07, 0x03):   IRQ: 0x00, INT#: A, Link: 0x00
      Class: Bridge, SubClass: Other Bridge
      Vendor: 0x8086, Device: 0x7113, RoutePINS: 0x00, 0x00, 0x00, 0x63,
   (0x00, 0x08, 0x00):   IRQ: 0x00, INT#: -, Link: 0x00
      Class: Display, SubClass: VGA compatible
      Vendor: 0x5333, Device: 0x8811, RoutePINS: 0x60, 0x61, 0x62, 0x63,
The following hard wire-ord devices share IRQ 11:
   (0x00, 0x0a, 0x00):   IRQ: 0x0b, INT#: A, Link: 0x60
      Class: Network, SubClass: Ethernet
      Vendor: 0x1011, Device: 0x0009, RoutePINS: 0x60, 0x61, 0x62, 0x63,
The following hard wire-ord devices share IRQ 255:
   (0x00, 0x07, 0x02):   IRQ: 0xff, INT#: D, Link: 0x63
      Class: , SubClass:
      Vendor: 0x0000, Device: 0x0000, RoutePINS: 0x00, 0x00, 0x00, 0x63,

FilesystemManager diagnostic...
===============================
Volume 1
VolumePos: 1.2:
DriveLetter: C:
Description:    1.17GB Primary Disk 0 Offset 1004.06MB    1.17GB CntxCorpHD
Type:        fsfFat32
Name:        WINXP_C
Volume 2
VolumePos: 1.3:
DriveLetter: D:
Description:     502MB Logical Disk 0 Offset    2.15GB     502MB CntxCorpHD
Type:        fsfFat32
Name:        PRO
Volume 3
VolumePos: 1.8:
DriveLetter: E:
Description:  101.94MB Logical Disk 0 Offset    4.91GB  101.94MB CntxCorpHD
Type:        fsfFat32
Name:        TEST4
Volume 4
VolumePos: 2.4:
DriveLetter: F:
Description:  137.78MB Logical Disk 1 Offset    1.86GB  137.78MB CntxCorpHD
Type:        fsfFat32
Name:        TEST_PRI2
Volume 5
VolumePos: 1.1:
DriveLetter:
Description: 1004.03MB Primary Disk 0 Offset   31.50KB 1004.03MB CntxCorpHD
Type:        fsfFat32
Name:        WIN_1
Volume 6
VolumePos: 1.4:
DriveLetter:
Description:    1.47GB Logical Disk 0 Offset    2.64GB    1.47GB CntxCorpHD
Type:        fsfNtfsWindowsXP
Name:        DATA
Volume 7
VolumePos: 1.5:
DriveLetter:
Description:  203.92MB Logical Disk 0 Offset    4.11GB  203.92MB CntxCorpHD
Type:        fsfExt2
Name:        TEST1*********************************
2#
发表于 2009-6-19 16:54:16 | 只看该作者
方法很不错!!!就是不知道速度如何?GHOST运行时有些慢的。。。
回复

使用道具 举报

3#
发表于 2009-6-20 17:07:36 | 只看该作者
我认为应该还可以再深度开发这个功能,绝对不只停留在活动分区和最后有效分区着样。
回复

使用道具 举报

4#
 楼主| 发表于 2009-6-20 17:43:29 | 只看该作者
原帖由 yichya 于 2009-6-20 17:07 发表
我认为应该还可以再深度开发这个功能,绝对不只停留在活动分区和最后有效分区着样。


提供的是处理思路,至于如何利用,就看各人的用途了。呵呵。
回复

使用道具 举报

5#
发表于 2009-6-20 21:34:46 | 只看该作者
可以把U+启动导致的第一硬盘为U盘的环境处理加入,思路是:在开始处预判断第一总硬盘大小是否小于某个值(如16G),从而是否跳转进对第二硬盘进行处理。。。还得再判断激活分区是否与最后分区为同一区来进行提示操作。。。lianjiang 这块砖抛的非常有指导意义,只是GHOST的DD命令有点不争气——好慢!
回复

使用道具 举报

6#
 楼主| 发表于 2009-6-20 21:43:23 | 只看该作者
遗憾的是ghost v11.5的检测出的信息与以前版本变化较大,还没找到处理11.5版的分区信息的通用办法。
所以暂时只好把11.5给排除掉了。
回复

使用道具 举报

7#
 楼主| 发表于 2009-6-20 22:21:12 | 只看该作者
还有一种办法,就是直接从分区id号入手处理有效分区问题。
回复

使用道具 举报

8#
发表于 2009-6-21 09:58:22 | 只看该作者
直接用omnifs!
回复

使用道具 举报

9#
 楼主| 发表于 2009-6-21 10:06:50 | 只看该作者
原帖由 小咕咚 于 2009-6-21 09:58 发表
直接用omnifs!


我一直用的是omnifs,现正想抛弃omnifs,改用ghost,呵呵。
回复

使用道具 举报

10#
发表于 2009-6-21 17:11:27 | 只看该作者
似乎OMNIFS也是很慢的,要是有个快一点的工具就好了。
回复

使用道具 举报

11#
发表于 2009-6-25 01:14:46 | 只看该作者
用DSPTW很快的.而且也很小巧.
DOS和WIN通用.

http://www.cn-dos.net/forum/viewthread.php?tid=24419&fpage=1

[ 本帖最后由 chenall 于 2009-6-25 01:19 编辑 ]
回复

使用道具 举报

12#
 楼主| 发表于 2009-6-25 05:51:02 | 只看该作者
原帖由 chenall 于 2009-6-25 01:14 发表
用DSPTW很快的.而且也很小巧.
DOS和WIN通用.

http://www.cn-dos.net/forum/viewthread.php?tid=24419&fpage=1



GGhost一键恢复最早用的就是dspt+ghost的,后改用omnifs+ghost,下一步计划搞成仅用ghost。
回复

使用道具 举报

13#
发表于 2009-6-25 10:54:17 | 只看该作者
不明白为什么抛弃DSPTW快速的分区判断方式,反而要用GHOST呢???
回复

使用道具 举报

14#
 楼主| 发表于 2009-6-25 11:02:06 | 只看该作者
原帖由 sgw888 于 2009-6-25 10:54 发表
不明白为什么抛弃DSPTW快速的分区判断方式,反而要用GHOST呢???


你认为,对于一键工具而言,速度是最重要的吗?

对这个问题的回答的不同,就会出现不同的方案。呵呵。

就我的GGhost一键恢复系列工具而言,速度仅是一个可忽略不计的次要因素。
回复

使用道具 举报

15#
发表于 2009-6-25 11:24:08 | 只看该作者
当然了,速度并不是最主要的问题,能够正确备份恢复是第一位的,可是速度也是很重要的。
目前我正在打算用SNAPSHOT。EXE在系统里手动备份,然后最终用户可以按F11在DOS下一键恢复。不过,SNAPSHOT。EXE是用来代替GHOST做VISTA的备份的,因为SNAPSHOT。EXE在速度方面比GHOST有优势,特别是在数据量很大的时候,做VISTA的备份,宁可牺生空间来换取时间,以前都是用VISTA一键还原做VISTA的备份,有些C盘数据多的,要备份半个小时,时间太长了,用SNAPSHOT。EXE就可以在15分钟左右。
回复

使用道具 举报

16#
 楼主| 发表于 2009-6-25 11:48:29 | 只看该作者
原帖由 sgw888 于 2009-6-25 11:24 发表
当然了,速度并不是最主要的问题,能够正确备份恢复是第一位的,可是速度也是很重要的。
目前我正在打算用SNAPSHOT。EXE在系统里手动备份,然后最终用户可以按F11在DOS下一键恢复。不过,SNAPSHOT。EXE是用来代 ...


上面讨论的无疑是基于ghost的一键恢复时的处理问题。dspt也好,omnifs,ghost也罢,他们之间的差别远小于核心不同带来的速度差异。
回复

使用道具 举报

17#
 楼主| 发表于 2009-7-3 14:24:27 | 只看该作者
原帖由 zhxy9804 于 2009-7-3 14:17 发表
ghost -dd
8.x和11.x处理方法不大一样。
一个搜索1:x 一个搜索1.x:


两者都有1:X,呵呵。
顶楼的批处理是经过了实测的,原则上是没问题的。
回复

使用道具 举报

18#
 楼主| 发表于 2009-7-3 22:54:29 | 只看该作者
原帖由 zhxy9804 于 2009-7-3 22:37 发表

我用过,ghost11 1:x不管用的,换成1.x:就可以。试验了好多机器。
是用img实验的


你说的1:1格式不能用,完全是你的用法有问题,呵呵。
这是毫无疑问的。
GGhost一键恢复中一直都是这么用的。

另外,顶楼提出的是所需分区的确定方案。分区号有了,即使如你所说的某种格式不能用,也完全可以简单地处理成能用的格式。
回复

使用道具 举报

19#
 楼主| 发表于 2009-7-4 07:34:47 | 只看该作者
记得上一次就说过了,没看出这段代码存在什么问题。
不清楚你说的问题是什么。

你说的1:X不能用,不清楚你的具体用法。
我用以下之类的格式是没问题的。
ghost -clone,mode=pdump,src=1:1,dst=1:5\BCAKUP\SYS.GGH
回复

使用道具 举报

20#
 楼主| 发表于 2009-7-4 07:36:25 | 只看该作者
既然说不能用,应贴出具体如何操作的,及出错信息。
回复

使用道具 举报

21#
 楼主| 发表于 2009-7-4 20:55:08 | 只看该作者
在dos下,运行一下,看看哪里出问题了。应该很容易排除的。没看到具体错误信息。
回复

使用道具 举报

22#
 楼主| 发表于 2009-7-4 20:55:37 | 只看该作者
要么直接用顶楼的方案,呵呵。
回复

使用道具 举报

23#
 楼主| 发表于 2009-7-4 22:12:08 | 只看该作者
dos下测试了一下,你提供的批处理,虽然可以使用,但存在缺陷,不建议作为通用工具里的处理方案来采用。
个人以为,顶楼的批处理要比你提供的方案更完善。

下面是你的方案的结果。



回复

使用道具 举报

24#
发表于 2010-6-23 08:31:49 | 只看该作者
谢谢大大,经常GHOST,发现老是定位不好盘区,看了大大的经验,试一下,以后应该不全再这样错误了。
回复

使用道具 举报

25#
发表于 2010-12-23 01:10:34 | 只看该作者
原帖由 sgw888 于 2009-6-25 11:24 发表
当然了,速度并不是最主要的问题,能够正确备份恢复是第一位的,可是速度也是很重要的。
目前我正在打算用SNAPSHOT。EXE在系统里手动备份,然后最终用户可以按F11在DOS下一键恢复。不过,SNAPSHOT。EXE是用来代 ...

是呀,的确快很 1.40版 的能自动放弃pagefile.sys 备份出来的文件也没比GHOST的大多少..速度到是快了不少,图为证:(win7系统下的热备份)

未标题-1.jpg (112.56 KB, 下载次数: 68)

未标题-1.jpg
回复

使用道具 举报

26#
发表于 2011-4-29 10:27:13 | 只看该作者
nset的作用是什么呀?
回复

使用道具 举报

27#
 楼主| 发表于 2011-4-29 10:58:27 | 只看该作者
原帖由 jasonwang 于 2011-4-29 10:27 发表
nset的作用是什么呀?


转贴:
NSET使用说明--DOS下进行字符处理的利器

------------------------------------------------------------------------
NSET    Extract from STDIN              Ver 2.1 (c) 1997 Horst Schaeffer
------------------------------------------------------------------------
          Note: Setting variable is not supported under Win NT/2000/XP
                See work-around described in NSET.W2K

NSET picks a word, line or substring from STDIN and assigns it to an
environment variable (or sends it to STDOUT). Useful if you want to
extract data from DOS output of DIR, DATE, TIME, FIND etc. - but you'll
probably find lots of other applications...

Syntax:       NSET [options] [varname]=string
              -------------------------------

options:      /S /X /U /L /P (see below)

varname:      name of environment variable
              if the name is omitted, the result is sent to STDOUT

string:       is usually a token $1...$99 for the n-th word of STDIN,
              or $0 for a complete line.
              But you can use any text string with one or more embedded
              tokens to form the resulting string.

Using STDIN, examples:

by PIPE:      CD | NSET SDIR=$1         (SDIR=current directory)

from a file:  NSET X=$3 < some.txt      (X=3rd word from some.txt)

keyboard:     NSET IN=$0                (IN=input up to CR)

Tokens $1..$99  refer to "words" from STDIN, defined by the following
standard separators:

              blank space
              comma
              semicolon
              equal sign
              carriage return
              line feed

For other separators or substrings see options.

If the input has several lines, just count the words across lines
(unless option /L is used to restrict extraction to a specific line).

Trailing spaces are always removed. Keyboard input is limited to one
line, terminated by ENTER (Ctrl"Z" not required).

Options
-------
/S  additional separators (max: 24), terminated by a blank space (!)
    As an example, you can split up the current date to translate
    UK (with slashes) to US format (day and month swapped):

    echo.|date|NSET /S/ USdate=$6-$5-$7
                    ^^^
    UK date output:   Current Date is  Mon, 15/07/1996
    tokens:             $1     $2  $3  $4   $5 $6  $7
                                            ^^^^^^^^^^
/X  instead of /S:
    same as /S, however, standard separators are only: space, CR and LF.
    Comma, semicolon or equal sign have to be specified if required.
    (This allows exclusion of comma marks in numbers, for example).

    Option /X can be used without additional separators, but in any
    case a blank space must succeed to indicate the end of option /X.

/U  convert input words to upper case

/L  extract from specified line (line numbers: 1..9999)
    Tokens refer to words within this line only.
    Example: to get the directory path of a given file %fn%
    only the 4th line of the DIR output is used:

        DIR %fn% | NSET /L4 FPATH=$3
                         ^^
    Special feature:
/L? (question mark instead of a number) selects a random line.

/P  position (1 is leftmost), size (default: rest of line)
    This option will cut out a substring from a line. Tokens refer to
    words within this substring, $0 is the complete substring.
    In the following example 10 bytes are taken from pos.3 in line 5:

        NSET /P3,10 /L5 X=$0
              ^^^^^
    Get 2nd word from the rest of 1st line, starting at position 14:

        NSET /P14 X=$2

With token $0 the complete line (or substring) is taken regardless of
any separators. Leading spaces are not removed in this case.
Use with option /L unless you want line #1 (or there is only one).


STDOUT instead of variable
--------------------------
If you omit the variable name, the result will be sent to STDOUT.
Note that the equal sign must not be omitted!
Useful for testing or for redirection to a file.

Example:
        NSET /L? =$0  < taglines.lst > tagline.now

Notes:
------
Max input size is about 60 KB (rest ignored)

Errorlevel: 0: ok, 1: out of environment space or invalid options

To avoid conflicts when numeric data occur in the command string,
you may use e.g. $01 instead of $1 (because max 2 digits are read for
tokens):
        $15         is the 15th word
        $015        is the 1st word succeeded by constant "5"


More Examples:
--------------
    dir %file% /B | NSET /S. FN=$1      (file name without extension)
    dir %file% /B | NSET /S. EXT=$2     (file extension only)
    vol | NSET DRV=$4:                  (current drive)
    echo %string%| NSET /U string=$0    (convert string to upper case)
    echo %string%| NSET /P2,1 char=$1   (get 2nd char from string)

To save and restore drive and directory in a BAT file:

    CD | NSET XDIR=$1                   (save full path in XDIR)
    -----------------
    %XDIR%\                             (select drive *)
    CD %XDIR%                           (select directory)

    *) undocumented DOS feature: with trailing backslash the drive is
       selected (rest ignored). Does not work under NT/2000/XP.

----
NSET is freeware by Horst Schaeffer - no warranties of any kind
eMail: horst.schaeffer@gmx.net
回复

使用道具 举报

28#
发表于 2011-4-29 12:53:02 | 只看该作者
原来是外置命令,学习了,多谢L大,看来又得从你那个GGHOST.IMG中提取了。
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2024-4-25 18:30

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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