Private Declare Function ShellExecute Lib "shell32" _
Alias "ShellExecuteA" ( _
ByVal hWnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
ShellExecute hWnd, "runas", "reg.exe", "add ""HKEY_CURRENT_USER\Control Panel\Desktop"" /v test /t REG_BINARY /d 00102030", CurDir$(), vbNormalFocus
End Sub
첫댓글 문제는 hWnd 이군요
VB6 이 정의하지 않은 변수도 인정을 하는게 기본값이라서 저게됩니다
자바스크립트랑 매우 흡사한 부분인데 이거 정의문 퍼온데가 스택오버플로 인데 ... 그대로써도 문제는 없죠