D
deskcheck1
Guest
Hi,
I'm writing a Windows Form app that needs to be deployed on our Domain Controller. The app monitors all clusters within the domain by running an executable file on each cluster. The cluster app is another Windows Form app that resides in each cluster; the DC is supposed to execute the cluster app remotely. I've created cluster checkboxes for selection; then clicking the "Start Monitor" button, cluster apps should execute in the selected clusters. This domain does not have Internet access, so it's "off-the-grid". The DC has Windows Server 2012 R2 operating system. The clusters vary: Windows 7 Enterprise, Windows 7 Professional, and Windows 10 Professional.
There are over 100 clusters connected to this DC. What the separate cluster app does is upload some local performance metrics to a database located in the DC.
Problem: I used PSEXE from SysInternals but it doesn't launch the cluster app Windows Form. Without it actually running as an app, it doesn't upload their metrics to the DC. Remotely calling a command using PSEXEC simply runs it without launching the cluster app Windows form. However, in Resource Monitor, the process is shown as running. Although it's running when viewed in the Resource Monitor, it doesn't upload their status to the SQL Server database in the DC. In fact, it doesn't do anything at all. So confusing.
My PSEXEC script is as follows:
If DirectCast(ctrl, CheckBox).Checked = True Then
System.Threading.Thread.Sleep(100)
index = DirectCast(ctrl, CheckBox).Tag
Dim p As New ProcessStartInfo
p.FileName = "cmd.exe"
If Mainform.RbtnName.Checked Then p.Arguments = "/c psexec -accepteula \\" & computer_name(index) & ".insect.bug -i -d -realtime " & creds & " C:\Cluster\Client_monitor.exe"
If Mainform.RbtnIp.Checked Then p.Arguments = "/c psexec -accepteula \\" & IP(index) & " -i -d -realtime " & creds & " C:\Cluster\Client_monitor.exe"
' Use a hidden window
p.WindowStyle = ProcessWindowStyle.Hidden
' Start the process
Dim myprocess As New Process
myprocess = Process.Start(p)
Mainform.Status.Text = p.Arguments
Mainform.Refresh()
End If
Is there a better way to run an executable file from the Domain Controller that would actually launch the Windows Form app in each selected cluster? The above runs the process but the Windows Form is not running.
Appreciate any help.
Marilyn Gambone
Continue reading...
I'm writing a Windows Form app that needs to be deployed on our Domain Controller. The app monitors all clusters within the domain by running an executable file on each cluster. The cluster app is another Windows Form app that resides in each cluster; the DC is supposed to execute the cluster app remotely. I've created cluster checkboxes for selection; then clicking the "Start Monitor" button, cluster apps should execute in the selected clusters. This domain does not have Internet access, so it's "off-the-grid". The DC has Windows Server 2012 R2 operating system. The clusters vary: Windows 7 Enterprise, Windows 7 Professional, and Windows 10 Professional.
There are over 100 clusters connected to this DC. What the separate cluster app does is upload some local performance metrics to a database located in the DC.
Problem: I used PSEXE from SysInternals but it doesn't launch the cluster app Windows Form. Without it actually running as an app, it doesn't upload their metrics to the DC. Remotely calling a command using PSEXEC simply runs it without launching the cluster app Windows form. However, in Resource Monitor, the process is shown as running. Although it's running when viewed in the Resource Monitor, it doesn't upload their status to the SQL Server database in the DC. In fact, it doesn't do anything at all. So confusing.
My PSEXEC script is as follows:
If DirectCast(ctrl, CheckBox).Checked = True Then
System.Threading.Thread.Sleep(100)
index = DirectCast(ctrl, CheckBox).Tag
Dim p As New ProcessStartInfo
p.FileName = "cmd.exe"
If Mainform.RbtnName.Checked Then p.Arguments = "/c psexec -accepteula \\" & computer_name(index) & ".insect.bug -i -d -realtime " & creds & " C:\Cluster\Client_monitor.exe"
If Mainform.RbtnIp.Checked Then p.Arguments = "/c psexec -accepteula \\" & IP(index) & " -i -d -realtime " & creds & " C:\Cluster\Client_monitor.exe"
' Use a hidden window
p.WindowStyle = ProcessWindowStyle.Hidden
' Start the process
Dim myprocess As New Process
myprocess = Process.Start(p)
Mainform.Status.Text = p.Arguments
Mainform.Refresh()
End If
Is there a better way to run an executable file from the Domain Controller that would actually launch the Windows Form app in each selected cluster? The above runs the process but the Windows Form is not running.
Appreciate any help.
Marilyn Gambone
Continue reading...