Dim AutoRunProgram
Set AutoRunProgram = WScript.CreateObject("WScript.Shell")
RegPath = "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\"
Type_Name = "REG_SZ"
Key_Name = "AutoRun"
Key_Data = "C:\Myfile\autorun.exe"
AutoRunProgram.Write RegPath & Key_Name, Key_Data, Type_NameMsgBox ("Success!")
没有错,但是就是没有往注册表里面写