『楼 主』:
 注册表中二进制读取问题(VBS)
 
使用 LLM 解释/回答一下
  
'Date 2008-3-15 BY:snowhill 
dim wshshell,result,enable,disable,warnning,answer 
enable="Now,the usb is avaliable!" 
disable="Now,the sub is disable!" 
warning="Warning!" 
key="HKLM\system\currentcontrolset\services\usbstor\Start" 
set wshshell=wscript.createObject("wscript.shell") 
result= wshshell.RegRead(key) 
if( result=4) then 
  answer=msgbox (disable&"are you want to enable the usb device?",1,Warnning) 
   if (answer=1) then  
    wshshell.Regwrite key,3,"REG_DWORD" 
   end if  
end if  
if result="3" then 
  answer=msgbox(enable&"are you want to disable the usb device?",1,warnning) 
  if(answer=1)then 
  wshshell.Regwrite key,4,"REG_DWORD" 
  end if  
end if 
当读DWORD值是肯定没问题地,但读BINARY值就不行,哪位高手知道如何处理REG_BINARY问题啊.msgbox alltrim(str(result(1)))这是微软官网上的一个处理办法但行不通 
 
    
 
  
 |