Archive

Posts Tagged ‘vb.net’

XAMPPLITE MINI CONTROL

November 3rd, 2008 No comments

XAMPPLITE MINI CONTROL

Using the XAMPPLITE sometimes i have a little trouble with xampp-control.exe to start or stop Apache and MySQL so I decide to make a small program.

Here the source code to compile it in VB.NET 2008:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        xampplite.run_services()
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        xampplite.stop_services()
    End Sub
End Class
 
Module xampplite
    Sub run_services()
        run_batch("C:\xampplite\apache_start.bat")
        run_batch("C:\xampplite\mysql_start.bat")
    End Sub
    Sub stop_services()
        run_batch("C:\xampplite\apache_stop.bat")
        run_batch("C:\xampplite\mysql_stop.bat")
    End Sub
    Sub run_batch(ByVal x As String)
        Dim psi As New ProcessStartInfo
        psi.FileName = x
        psi.WorkingDirectory = "C:\xampplite\"
        psi.WindowStyle = ProcessWindowStyle.Hidden
        Process.Start(psi)
    End Sub
End Module
Categories: develop, windows Tags: , ,

Switch to our mobile site