|
本帖最后由 lht27829 于 2010-11-3 08:06 编辑
这个是源码Dim $CDRom,$i,$Target,$Drive,$Flag,$Flagr,$Flagrr
$Flag=MsgBox(1,"系统安装","确认要将硬盘分为4个区吗?这会删除当前硬盘所有数据!")
If $Flag=2 Then
Exit
EndIf
$Target="hd-4.gho"
For $i=90 To 67 Step -1
$Drive=Chr($i)
If FileExists($Drive ":\GHOST\" & $Target) Then
$CDRom=$Drive ":"
ExitLoop
EndIf
Next
If FileExists($CDRom) Then
If FileExists($CDRom "\PESOFT\GHOST\Ghost32.exe") And FileExists($CDRom & "\ghost\hd-4.gho") Then
ToolTip(@CR" 正在执行一键四区,请稍候... "&@CR, @DesktopWidth-220, @DesktopHeight-120)
Run($CDRom "\PESOFT\GHOST\Ghost32.exe -nousb -clone,mode=load,src=" & $CDRom & "\ghost\hd-4.gho,dst=1 -fx")
ProcessWaitClose("Ghost32.exe")
ToolTip("")
$Flagr=MsgBox(1,"系统安装","硬盘分区完成,要立即安装XP系统到C盘吗?")
If $Flagr=2 Then
Exit
EndIf
IF FileExists($CDRom "\ghost\winxp.gho") Then
ToolTip(@CR" 正在执行恢复XP到C盘,请稍候... "&@CR, @DesktopWidth-260, @DesktopHeight-120)
Run($CDRom "\PESOFT\GHOST\Ghost32.exe -nousb -clone,mode=pload,src=" & $CDRom & "\ghost\winxp.gho:1,dst=1:1 -crcignore -sure -fx")
ProcessWaitClose("Ghost32.exe")
ToolTip("")
$Flagrr=MsgBox(1,"系统安装","系统文件复制完成,请重启电脑完成安装",5)
If $Flagrr=2 Then
Exit
EndIf
Run(@ComSpec " /c " & 'pecmd shut r', "", @SW_HIDE)
Else
MsgBox(0,"Error","未发现winxp.gho镜像文件!")
Exit
EndIf
ElseIf Not FileExists($CDRom "\PESOFT\GHOST\Ghost32.exe") Then
MsgBox(0,"Error","未发现Ghost32.exe程序!")
Exit
EndIf
Else
MsgBox(0,"Error","未发现HD-4.GHO镜像文件!")
Exit
EndIf
用这个源码出现以下错误 怎么解决
E:\新建 AutoIt v3 脚本.au3(9,32) : 错误: 表达式错误
If FileExists($Drive ":\GHOST\"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(10,18) : 错误: 表达式错误
$CDRom=$Drive ":"
~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(15,49) : 错误: 表达式错误
If FileExists($CDRom "\PESOFT\GHOST\Ghost32.exe"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(16,42) : 错误: 表达式错误
ToolTip(@CR" 正在执行一键四区,请稍候... "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(17,68) : 错误: 表达式错误
Run($CDRom "\PESOFT\GHOST\Ghost32.exe -nousb -clone,mode=load,src="
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(24,40) : 错误: 表达式错误
IF FileExists($CDRom "\ghost\winxp.gho"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(25,46) : 错误: 表达式错误
ToolTip(@CR" 正在执行恢复XP到C盘,请稍候... "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(26,69) : 错误: 表达式错误
Run($CDRom "\PESOFT\GHOST\Ghost32.exe -nousb -clone,mode=pload,src="
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(33,20) : 错误: 表达式错误
Run(@ComSpec " /c "
~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3(38,57) : 错误: 表达式错误
ElseIf Not FileExists($CDRom "\PESOFT\GHOST\Ghost32.exe"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\新建 AutoIt v3 脚本.au3 - 10 error(s), 0 warning(s) |
|