Installing Network Protocols

I have searched EE and multiple forum sites for 20+ hours now and am coming up with nothing at all. I need a way to automate the installation of RASPPPOE in Windows 98/ME/2k using VB.NET and INF files. The protocol itself can be added manually through Network Neighborhood but I am trying to simplify everything for the end user - they click, say.. "Setup" and it handles everything else for the person automatically. I can create the connection once the protocol is installed but it's getting the protocol installed that is driving me insane.

Yes, the project is in .Net but I will be using the bootstrapper program to allow installation of the .Net framework if is needed so I can fully utilize any classes easily.

The protocol is stored in an .inf file (there are a couple of them) and they also have DLL's associated with them as well as two .sys files. I need to get this installed for the person and then I'll create the connection afterwards.

Does anyone have any suggestions? I'm beating my head against the wall on this one..

I was just browsing and came across this on www.dotnet247.com. You would need to import Microsoft.Win32 and System.IO and it looks like this will install the INF file. Does anyone have any experience with this? What would the function actually return? A 1 for yet and 2 for no as to whether it was successful? Also, can anyone decipher this a little for me? I could most likely get it working but I'd really like to understand the why factor...what is making this work the way it is supposed to?

'Do a basic check to ensure that the specified file is an INF file and actually exists

If (strFileName.Length >= 4) AndAlso (strFileName.Substring(strFileName.Length - 4, 4).ToUpper = ".INF") AndAlso File.Exists(strFileName) Then
'Get the command from the regitry that is used to install INF files

objSubKey = Registry.LocalMachine.OpenSubKey("Software\Classes\.inf")

If Not IsNothing(objSubKey) Then
strClassName = objSubKey.GetValue("").Trim

I've doen some rearranging of the code above as that wasn't doing anything for me (I kept getting JIT errors about converting a string to a double. Here is all current code I am using and everything works up until the point of the installation itself. It finds the file and then attempts the install but I'm assuming it fails because it returns the MsgBox("Failed") window at the end.

Can anyone see what I'm doing wrong? The "Beginning the install.." box pops up but then I just get a failed return, there isn't any error with the try/catch block.

'Do a basic check to ensure the specified file is an INF file and actually exists
'AndAlso (strFileName.Substring(strFileName.Length - 4, 4).ToUpper = ".INF")
If (strFileName.Length >= 4) AndAlso (strFileName.Substring(strFileName.Length - 4, 4).ToUpper = ".INF") AndAlso File.Exists(strFileName) Then
'Get the command from the registry that is used to install INF files
MsgBox("Everything is good on 86")
objSubKey = Registry.LocalMachine.OpenSubKey("Software\Classes\.inf")
MsgBox("Everything is good on 88")

If Not IsNothing(objSubKey) Then
strClassName = objSubKey.GetValue("").Trim
objSubKey.Close()
If (strClassName.Length > 0) Then
objSubKey = Registry.LocalMachine.OpenSubKey("Software\Classes\" & strClassName & "\shell\Install\command")
If Not IsNothing(objSubKey) Then
strInstallCommand = objSubKey.GetValue("").Trim
objSubKey.Close()
End If
End If
End If
MsgBox("Everything is good on 108 which is right before the actual install")
'Check that the expected argument placeholder exists at the end of the string
If (strInstallCommand.Length > 3) AndAlso (strInstallCommand.Substring(strInstallCommand.Length - 3, 3) = "%1") Then
'Replace the argument placeholder with the name of the INF file
strInstallCommand = strInstallCommand.Substring(0, strInstallCommand.Length - 2) & strFileName
'Install the INF file
MsgBox("Beginning the install..")
Try
blnInstallationSuccess = (Shell(strInstallCommand, AppWinStyle.Hide, True) = 0)
Catch ex As Exception
MsgBox(ex)
End Try
End If
End If
Return blnInstallationSuccess
End Function
********************************************************************

Featured Post

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex.
A simple solution to parsing a customized CSV fi…

In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…