Visual Basic Foro

Programación => Visual Basic 6 => Mensaje iniciado por: Harmmy en Agosto 05, 2012, 05:18:50 am

Título: Vb6 Exe Taskmgr list SYSTEM Help?
Publicado por: Harmmy en Agosto 05, 2012, 05:18:50 am
exe file in the list of taskmsgr.exe want to open as SYSTEM.
Help?
Visual Basic 6
Título: Re:Vb6 Exe Taskmgr list SYSTEM Help?
Publicado por: LeandroA en Agosto 05, 2012, 11:04:20 am
Hola MiniJoe, te paso un código rebuscado, pero quizas sirva para que te calmes  ;D, es utilizando el comando "AT" y puede tener un minuto de retrazo, no se que se puede hacer con esto ya que todo se ejecuta oculto.

Código: (vb) [Seleccionar]

Option Explicit
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal lBuffer As Long) As Long
Private Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long

Private Sub Form_Load()
    If Command <> "-openassystem" Then
        Shell "at " & Format(DateAdd("s", 60, Now), "HH:MM") & " " & GetMyShortPath & " -openassystem"
        End
    End If
    '--------
    'aqui tu codigo
   
End Sub


Public Function GetMyShortPath() As String
    Dim sLongPath As String * 255
    Dim sShortPath As String * 255
    Dim lRet As Long
 
    GetModuleFileName 0, sLongPath, 255
    lRet = GetShortPathName(sLongPath, sShortPath, 255)
    GetMyShortPath = Left$(sShortPath, lRet)
End Function

Título: Re:Vb6 Exe Taskmgr list SYSTEM Help?
Publicado por: Harmmy en Agosto 08, 2012, 07:14:31 am
GetMyShortPath variable not defined