Parsi Coders
[VB6] Disable UAC - نسخه قابل چاپ

+- Parsi Coders (http://parsicoders.com)
+-- انجمن: Software Development Programming (http://parsicoders.com/forumdisplay.php?fid=37)
+--- انجمن: Visual Basic Programming (http://parsicoders.com/forumdisplay.php?fid=39)
+---- انجمن: Visual Basic 6 (http://parsicoders.com/forumdisplay.php?fid=44)
+---- موضوع: [VB6] Disable UAC (/showthread.php?tid=1095)



[VB6] Disable UAC - Amin_Mansouri - 10-17-2011

سورس کد غیر فعال کردن uac با ویژوال بیسیک
کد:
Private Declare Function RegSetValueExA Lib "advapi32.dll" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Long, ByVal cbData As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long

Public Sub DisableUac()
Dim lKey As Long

Call RtlAdjustPrivilege(17, True, True, 0)
If RegOpenKeyEx(&H80000002, "SOFTWARE\Microsoft\Security Center", 0&, &H20000 Or &H2& Or &H4&, lKey) = 0& Then
If (RegSetValueExA(lKey, "UACDisableNotify", 0, 4, 0, 4) = 0&) Then
RegCloseKey lKey
End If
End If
If RegOpenKeyEx(&H80000002, "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies \System", 0&, &H20000 Or &H2& Or &H4&, lKey) = 0& Then
If (RegSetValueExA(lKey, "EnableLUA", 0, 4, 0, 4) = 0&) Then
RegCloseKey lKey
End If
End If
End Sub



RE: [VB6] Disable UAC - s7004u - 05-19-2012

Call RtlAdjustPrivilege(17, True, True, 0)


این براش تعریف نشده و برنامه کار نمیکنه