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

Visual Basic

 
AnswerRe: My Application takes Very CPU usage and Memory Pin
Ashutosh Phoujdar28-Jan-09 19:52
Ashutosh Phoujdar28-Jan-09 19:52 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri28-Jan-09 21:14
Anubhava Dimri28-Jan-09 21:14 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Ashfield28-Jan-09 21:20
Ashfield28-Jan-09 21:20 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Ashutosh Phoujdar28-Jan-09 21:20
Ashutosh Phoujdar28-Jan-09 21:20 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri28-Jan-09 22:38
Anubhava Dimri28-Jan-09 22:38 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Dave Kreskowiak29-Jan-09 3:18
mveDave Kreskowiak29-Jan-09 3:18 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Dave Kreskowiak29-Jan-09 3:17
mveDave Kreskowiak29-Jan-09 3:17 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri29-Jan-09 19:44
Anubhava Dimri29-Jan-09 19:44 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Dave Kreskowiak30-Jan-09 1:55
mveDave Kreskowiak30-Jan-09 1:55 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri29-Jan-09 22:18
Anubhava Dimri29-Jan-09 22:18 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Ashutosh Phoujdar29-Jan-09 23:16
Ashutosh Phoujdar29-Jan-09 23:16 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri30-Jan-09 0:59
Anubhava Dimri30-Jan-09 0:59 
QuestionHow to copy conditional rows and paste them in new worksheet. Pin
jptxrose28-Jan-09 10:56
jptxrose28-Jan-09 10:56 
QuestionAutoscroll in textbox Pin
Kschuler28-Jan-09 5:17
Kschuler28-Jan-09 5:17 
AnswerRe: Autoscroll in textbox Pin
Mr Oizo28-Jan-09 22:47
Mr Oizo28-Jan-09 22:47 
GeneralRe: Autoscroll in textbox Pin
Kschuler29-Jan-09 4:25
Kschuler29-Jan-09 4:25 
Questioncould not find installable ISAM Pin
NaliniNagarajan28-Jan-09 2:56
NaliniNagarajan28-Jan-09 2:56 
AnswerRe: could not find installable ISAM Pin
Dave Kreskowiak29-Jan-09 3:14
mveDave Kreskowiak29-Jan-09 3:14 
QuestionProblem running remote process using WMI [modified] Pin
thecornflake28-Jan-09 2:07
thecornflake28-Jan-09 2:07 
Hi,

I urgently need to get this program running. I'm trying to remotely connect to a server using WMI (which is all fine) and then run an executable as a process on the server.

I currently get the error "Public member 'string' on type 'Uinteger' not found". I think this is something to do with the InvokeMethod line, as most examples have 'null' where it has 'Nothing'. However null is not allowed in VB.NET 2005 - it suggests using system.dbnull which doesn't work either.

 <br />
' Get the object on which the method will be invoked<br />
                    Dim processClass As New ManagementClass<br />
                    processClass = New ManagementClass("Win32_Process")<br />
                    processClass.Scope = scope<br />
                    ' Get an input parameters object for this method<br />
                    Dim inParams As ManagementBaseObject = processClass.GetMethodParameters("Create")<br />
                    ' Fill in input parameter values<br />
                    inParams("CommandLine") = patchcommand 'This is a string containing the command<br />
             <br />
<br />
                    ' Execute the method<br />
                    Try<br />
                        Dim outParams As ManagementBaseObject = processClass.InvokeMethod("Create", inParams, Nothing)<br />
                        Dim obj As Object = outParams("ReturnValue")<br />
<br />
                        'Check for an error<br />
                        If obj.ToString <> "0" Then<br />
                           'Error occurred<br />
                        End If<br />
                    Catch ex As Exception<br />
                        'This catches any other errors from trying to run the process<br />
                        MessageBox.Show(servername & " - Error running process - " & ex.Message & vbCrLf & ex.ToString)<br />
                       <br />
                    End Try<br />


modified on Wednesday, January 28, 2009 9:20 AM

AnswerRe: URGENT problem running remote process using WMI Pin
EliottA28-Jan-09 2:55
EliottA28-Jan-09 2:55 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 3:09
thecornflake28-Jan-09 3:09 
GeneralRe: URGENT problem running remote process using WMI Pin
EliottA28-Jan-09 3:19
EliottA28-Jan-09 3:19 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 3:21
thecornflake28-Jan-09 3:21 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 4:32
thecornflake28-Jan-09 4:32 
GeneralRe: URGENT problem running remote process using WMI Pin
Uros Calakovic28-Jan-09 5:29
Uros Calakovic28-Jan-09 5:29 

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.