在DOS下运行这个编译后的程序老提示变量错误,万分苦恼中,请能帮忙修正,谢谢,附上源码:#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=Icon_2.ico
#AutoIt3Wrapper_Res_Comment=FZ_Deploy
#AutoIt3Wrapper_Res_Description=FZ_Deploy
#AutoIt3Wrapper_Res_Fileversion=2010.5.26.0
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
_Deploy_WinXP_Main()
Exit
#include<guiconstants.au3>
Func _Deploy_WinXP_Main()
;通过读取系统变量获取系统盘盘符
GUICreate("",@DesktopWidth,@DesktopHeight,"","",$ws_popup)
GUICtrlCreatePic(@SystemDir&"\sysprep\Deploy.bmp",0,0,@DesktopWidth,@DesktopHeight,BitOR($ss_notify,$ws_group,$ws_clipsiblings))
GUISetState(@SW_SHOW)
Local $SystemDrive=EnvGet("SystemDrive")
;部署前调用
RunWait($SystemDrive&"\sysprep\ComputerReName.exe")
RunWait($SystemDrive&"\sysprep\drivers\EasyDrv3.5..exe")
;删除 CMDLine键值
RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\setup","cmdline")
;执行最小化系统部署
RunWait($SystemDrive&"\Windows\System32\Setup.exe -newsetup -mini")
;写入RunOnce键值以在注册组件调用运行fz_oper.exe和写入run键值以在进入桌面后运行调用fz_run.exe
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","oper","REG_SZ",@WindowsDir&"\fz_oper.exe")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","oper","REG_SZ",@WindowsDir&"\fz_run.exe")
;恢复默认备份boot_NTLDR_Bootfont.bin
RunWait($SystemDrive&"\sysprep\boot.exe")
EndFunc
|