Recent content by Nucleus

  1. N

    Populating variables from DataGridView selections

    vb.net has a steep learning curve, so please bare with me. I am trying to create a program where you can select multiple Linux hosts, then select a bash script (which already exists on the Linux hosts), and click a button to execute the script on all the hosts. I've managed to get vb.net to...
  2. N

    SSH view command output in real time

    Hi, I am trying to create an application that runs bash scripts on a remote Linux computer. The scripts already exist on the Linux computer, I just want to run them using this application. I'm using SSH NET by Renci to establish the SSH connection. The scripts are expected to provide full...
  3. N

    Question Editing a text file problem

    Thank you for your help.
  4. N

    Question Editing a text file problem

    I have a CheckedListBox and I want to use it for editing a text file. This is what I have so far. Private Sub CheckedListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CheckedListBox1.SelectedIndexChanged If CheckedListBox1.CheckedItems(0) = "test1" Then...
  5. N

    Question cannot open service "servicename" on computer '.'.

    Your suggestion worked. Thanks for your help.
  6. N

    Question cannot open service "servicename" on computer '.'.

    I am an administrator on the machine I am writing this code and I have UAC disabled.
  7. N

    Question cannot open service "servicename" on computer '.'.

    For some reason, when using the code below, when I click any of the 2 buttons to stop or start the spooler service, I get the error attached. I've googled it, but I could not find the reason why. Any ideas? Imports System.ServiceProcess Public Class Form1 Dim Spooler As New...
  8. N

    defining all the if's when first loading a form

    Thank you for the reply. It was very helpful.
  9. N

    defining all the if's when first loading a form

    So, I'm creating a form with a label, a picture box and two buttons. This form will control the Spooler service. The label will say "Running" when the service is running and the picture box will be green. The "Start" button will be disabled and the "Stop" button will be enabled. The label will...
  10. N

    Read from text to textbox

    Yes you are right. But then we got into the writing back to the file. But you have a point, so i wont continue this discussion.
  11. N

    Read from text to textbox

    The above actually erased the whole httpd.conf file and entered the word "ServerAdmin" :p
  12. N

    Read from text to textbox

    Ok the reading and displaying to the textbox is done TextBox1.Text = mid(line(59),instr(line(59),"ServerAdmin")+len("ServerAdmin "),len(line(59))-instr(line(59),"ServerAdmin")+len("ServerAdmin")) Now for writing back to the textfile if the textbox value is changed I've gotten as far as this...
  13. N

    Read from text to textbox

    I have a form with a textbox and I want that textbox to read from httpd.conf on line 162. Line 162 reads ServerAdmin you@yourdomain.com Shouldn’t this code work? Because it does not. Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles...
  14. N

    enable button if checkbox state changes

    Sorry to be bringing this up again, but instead of checkboxes, I am now using a CheckedListBox. So now I cannot go on each checkbox and tell it to enable the button if the checkbox state changes. Now I need to somehow check all the items in the CheckedListBox and find out if any one of them...
  15. N

    error message when pressing save button

    For some reason this replaces the whole file with "LoadModule actions_module modules/mod_actions.so" Dim apacheconf = "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf" Dim Line() As String = System.IO.File.ReadAllLines(apacheconf) Private Sub SaveApache_Click(sender...
Top Bottom