Click here to Skip to main content
15,913,722 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralPlanet Source Code Visual Basic 2002 CD Pin
shacks30-Jan-03 8:57
shacks30-Jan-03 8:57 
Generalmoving cursor to last (new) row in datagrid Pin
mcm30-Jan-03 6:23
mcm30-Jan-03 6:23 
Generalstructure Pin
pnpfriend30-Jan-03 5:18
pnpfriend30-Jan-03 5:18 
GeneralRe: structure Pin
Jeremy Falcon30-Jan-03 7:50
professionalJeremy Falcon30-Jan-03 7:50 
GeneralRe: structure Pin
Abbas_Riazi30-Jan-03 8:00
professionalAbbas_Riazi30-Jan-03 8:00 
GeneralThanks Pin
pnpfriend30-Jan-03 8:06
pnpfriend30-Jan-03 8:06 
GeneralRemote execute an application(executable). Pin
Len Naude30-Jan-03 1:55
Len Naude30-Jan-03 1:55 
GeneralRe: Remote execute an application(executable). Pin
Paul Farry22-Feb-03 17:33
professionalPaul Farry22-Feb-03 17:33 
not sure about vb.net, but this should still work.

Search the WMI stuff relating to remote launching, you basically connect to the server(remote machine), then tell it to create a process.

I've written a component to do this in C++, but the reason for that is I'm using a Dialup connection to connect to 380 machines, and I need other operations to continue whilst the WMI connection starts(in a thread).

If you don't have these issues, there are lots of WMI examples in MSDN for doing this.


This is a function I've used previously.
<br />
Function LaunchRemoteProgram(program As String, Optional user As String = "", Optional pass As String = "", Optional servername As String = ".") As Integer<br />
    Dim objLocator As WbemScripting.SWbemLocator<br />
    Dim objService As WbemScripting.SWbemServices<br />
    Dim objInstance As WbemScripting.SWbemObject<br />
    <br />
    Set objLocator = New WbemScripting.SWbemLocator<br />
    On Error Resume Next<br />
    If servername = "." Then<br />
        Set objService = objLocator.ConnectServer(".", "root\cimv2")<br />
    Else<br />
        Set objService = objLocator.ConnectServer(servername, "root\cimv2", user, pass)<br />
    End If<br />
<br />
    If Err.Number Then<br />
    '<br />
    LaunchRemoteProgram = Err.Number<br />
    Else<br />
        Set objInstance = objService.Get("Win32_Process")<br />
        objInstance.Security_.AuthenticationLevel = wbemAuthenticationLevelConnect<br />
        objInstance.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate<br />
        objInstance.Create program, Null, Null, LaunchRemoteProgram<br />
    End If<br />
End Function<br />


Hi this is of use to you.
Generalzip a file Pin
shanksprasad29-Jan-03 18:50
shanksprasad29-Jan-03 18:50 
GeneralRe: zip a file Pin
pnpfriend30-Jan-03 3:39
pnpfriend30-Jan-03 3:39 
GeneralRe: zip a file Pin
Abbas_Riazi30-Jan-03 8:06
professionalAbbas_Riazi30-Jan-03 8:06 
GeneralRe: zip a file Pin
Davy Mitchell30-Jan-03 20:44
Davy Mitchell30-Jan-03 20:44 
GeneralRe: zip a file Pin
Carlos Antollini31-Jan-03 4:06
Carlos Antollini31-Jan-03 4:06 
GeneralLogin system for a program Pin
Sean Cull29-Jan-03 10:57
Sean Cull29-Jan-03 10:57 
GeneralRe: Login system for a program Pin
Jerome Conus30-Jan-03 1:33
Jerome Conus30-Jan-03 1:33 
QuestionHow to Cast dynamically? Pin
FruitBatInShades29-Jan-03 2:57
FruitBatInShades29-Jan-03 2:57 
GeneralDES Encryption Pin
Zaid Ansari29-Jan-03 2:05
Zaid Ansari29-Jan-03 2:05 
QuestionPrinting a datagrid in VB.NET? Pin
James Williams28-Jan-03 8:11
James Williams28-Jan-03 8:11 
GeneralThe Recent Projects dialog Pin
Like2Byte28-Jan-03 8:13
Like2Byte28-Jan-03 8:13 
GeneralUnwanted rounding in a sum !!!!! Pin
mixahlos28-Jan-03 3:09
mixahlos28-Jan-03 3:09 
GeneralRe: Unwanted rounding in a sum !!!!! Pin
Richard Deeming28-Jan-03 4:16
mveRichard Deeming28-Jan-03 4:16 
QuestionHow pass an enum as parameter to a function Pin
EckhardBraun27-Jan-03 21:29
EckhardBraun27-Jan-03 21:29 
AnswerRe: How pass an enum as parameter to a function Pin
SimonS27-Jan-03 21:41
SimonS27-Jan-03 21:41 
GeneralRe: How pass an enum as parameter to a function Pin
EckhardBraun27-Jan-03 21:53
EckhardBraun27-Jan-03 21:53 
GeneralRe: How pass an enum as parameter to a function Pin
SimonS28-Jan-03 0:24
SimonS28-Jan-03 0:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.