是想使用纯AU3来实现reg.exe的功能。如:reg load
Func _REGLOADHIVE($SFILE, $SKEY)
Local $AVARRAY = SPLIT_SROOTKEY($SKEY)
Local $HKEY = REGCONNECTREGISTRY($AVARRAY[0], $AVARRAY[1])
Local $AVCURR[2][2] = [[$SE_RESTORE_NAME, $SE_PRIVILEGE_ENABLED],[$SE_BACKUP_NAME, $SE_PRIVILEGE_ENABLED]]
Local $AVPREV = _SETPRIVILEGE($AVCURR)
Local $AVRLH = DllCall("Advapi32.dll", "long", "RegLoadKey", "hwnd", $HKEY, "str", $AVARRAY[2], "str", $SFILE)
_SETPRIVILEGE($AVPREV)
REGCLOSEKEY($HKEY)
Return SetError($AVRLH[0], 0, Number($AVRLH[0] = 0))
EndFunc ;==>_REGLOADHIVE
|