ahstax
Goto Top

Programm mittels vb.net-Tool installieren

Programm mittels vb.net-Tool installieren

Hallo,

ich möchte gerne mittels eines zu schreibenden vb.Net-Tools eine Software installieren lassen. Die Installation soll "überwacht" werden, gerne auch mit einem Progress-Bar. Auf jeden Fall soll aber eine Fertigstellungsmeldung ausgegeben werden.

Kann mit jemand einen Tip geben, wo ich da Infos oder einen Teil-Code zu finde?

Einen schönen Tag erstmal!
Neugierige Grüße,
Andreas

Content-ID: 205288

Url: https://administrator.de/forum/programm-mittels-vb-net-tool-installieren-205288.html

Ausgedruckt am: 13.04.2025 um 22:04 Uhr

ahstax
ahstax 23.04.2013 aktualisiert um 15:31:22 Uhr
Goto Top
Das geht beispielsweise (bei mir) so:

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Module SoftwareInstallieren

    Sub Main()

        Dim StrInstSwitch As String
        Dim StrUnSwitch As String

        Dim myProcess_Setup_App As Process


        Console.WindowHeight = 10
        Console.Title = "Software-Installation"  
        Console.WriteLine(" ")  
        Console.WriteLine("Es wird eine Software installiert. Bitte um etwas Geduld.")  
        Console.WriteLine("Dieses Fenster schließt sich automatisch, wenn der Vorgang abgeschlossen ist.")  
        Console.WriteLine(" ")  
        Console.WriteLine("Bitte auf KEINEN Fall selbst manuell schließen!")  

        'uninstall  
        Try

            StrUnSwitch = " /uninstall " & Chr(34) & _  
                "\\SERVER\bla\bla\tool.msi" & Chr(34) & " /passive"  
            myProcess_Setup_App = System.Diagnostics.Process.Start("msiexec.exe", StrUnSwitch)  
            myProcess_Setup_App.WaitForExit()

        Catch ex As Exception
            MsgBox("Fehler Deinstallation: " & ex.Message)  
        End Try
        myProcess_Setup_App = Nothing

        'install  
        Try
            StrInstSwitch = " /package " & Chr(34) & _  
                "\\SERVER\bla\bla\tool.msi" & Chr(34) & " /passive /norestart"  
            myProcess_Setup_App = System.Diagnostics.Process.Start("msiexec.exe", StrInstSwitch)  
            myProcess_Setup_App.WaitForExit()

        Catch ex As Exception
            MsgBox("Fehler Installation: " & ex.Message)  
        End Try
        myProcess_Setup_App = Nothing

    End Sub

End Module

Vielleicht nicht schön, funktioniert aber...