Novell Cool Solutions

Novell MSI Shortcut Launcher



By:

October 3, 2003 3:54 pm

Reads:8,866

Comments:0

Score:Unrated

Print/PDF

License:
Free

Download selfheal

ZENworks for Desktops 3.x cannot launch shortcuts directly either with or without the *.lnk file extention.

The ‘Path to executable file:’ in the Application Object hence becomes:

C:\Program Files\your app\SelfHeal.exe

‘Parameters:’

“%USERPROFILE%\Start Menu\your app\shortcut name.lnk” (include the quotes)

Launching an advertised MSI shortcut in this way invokes MSI Self-healing (hence the name)

This app was written in VB.net and hence the MS .NET Framework must be installed (i.e. latest OS Service Packs in most cases).

Note: .net security prevents this from running from anything other than a local drive.

It’s really a simple app! Here’s the code:

Module SelfHeal
     Sub Main()
          Dim separators As String = ” “
          Dim commands As String = Microsoft.VisualBasic.Command()
          Dim args() As String = commands.Split(separators.ToCharArray)
          Dim runCommand As String
          Dim x As Integer
          For x = 0 To args.GetUpperBound(0)
               If x = 0 Then
                    If args(0) = “” Or args(0) = “/?” Then MsgBox(“Novell MSI shortcut launcher” & Chr(13) &
                    Chr(13) & “Usage: selfheal “)
                    Exit Sub
                    Else
                         runCommand = args(0)
                    End If
               Else
                    runCommand = runCommand & ” ” & args(x)
               End If
          Next
          Try
               System.Diagnostics.Process.Start(runCommand)
          Catch
               MsgBox(“Error launching the command:” & Chr(13) & Chr(13) & runCommand)
          End Try
     End Sub
End Module

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...


Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS