Hi,
I have a very simple vb.net program that uses psexec from the shell command to exec a program remotely. Works fine - here's all the code:
The above works fine but now what I need to do is connect to SQL2005 table and read in the machine names from that table and pass them into my shell statement.
I'm new at this and don't know how to make a connection to the table and then (step two) replacing 'ZSW-ROB' with the machine names from that table.
So when completed - I need to execute my program remotely for every machine that's in my SQL table. Hope that makes sense.
I have a very simple vb.net program that uses psexec from the shell command to exec a program remotely. Works fine - here's all the code:
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("C:\pstools\psexec.exe \\ZSW-ROBCON -i -u WSIHQ\Administrator -p M3rl1n ""C:\Program Files (x86)\G4SGS\Time Reminder Installer\Time Reminder.exe""")
End Sub
End Class
I'm new at this and don't know how to make a connection to the table and then (step two) replacing 'ZSW-ROB' with the machine names from that table.
So when completed - I need to execute my program remotely for every machine that's in my SQL table. Hope that makes sense.