none
Shell pelo IPAQ RRS feed

Todas as Respostas

  • Ola,

    Use os seguinte imports

    'Imports System.PInvoke
    'Imports System.Runtime.InteropServices

    Public Structure PROCESS_INFORMATION
    Public hProcess As UInt32
    Public hThread As UInt32
    Public dwProcessId As UInt32
    Public dwThreadId As UInt32
    End Structure

    <DllImport("coredll.dll", EntryPoint:="CreateProcess", SetLastError:=True)> _
    Public Function CreateProcess(ByVal lpszImageName As String, _
    ByVal lpszCmdLine As String, _
    ByVal lpsaProcess As IntPtr, _
    ByVal lpsaThread As IntPtr, _
    ByVal fInhritHandles As Integer, _
    ByVal fdwCreate As UInt32, _
    ByVal lpvEnvironment As IntPtr, _
    ByVal lpszCurDir As IntPtr, _
    ByVal lpsiStartInfo As IntPtr, _
    ByVal lppiProcInfo As PROCESS_INFORMATION) As Integer
    End Function

    Public Function StartProcess(ByVal imageName As String, ByVal cmdLine As String) As UInt32
    Dim procInfo As New PROCESS_INFORMATION
    CreateProcess(imageName, cmdLine, IntPtr.Zero, IntPtr.Zero, 0, _
    Convert.ToUInt32(0), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, procInfo)
    Return Convert.ToUInt32(procInfo.dwProcessId)
    End Function

    'Use este para intalar componetes
    Public
    Sub GACInstall(ByVal imageName As String)
    StartProcess("cgacutil.exe", "-i " & imageName)
    End Sub

    'Use esse para desintalar componentes
    Public
    Sub GACUninstall(ByVal imageName As String)
    StartProcess("cgacutil.exe", "-u " & imageName)
    End Sub

    Para chamar um programa use:

    StartProcess("\FileStore\xxxxx.exe", "")

    Alvaro Neto.

    quarta-feira, 30 de agosto de 2006 12:54
  • Muito obrigado Alvaro, desculpa pela demora da resposta.

    Já classifiquei.

    Valeu,

    sexta-feira, 15 de setembro de 2006 03:14