Passing arguments to control.exe or Appwiz.cpl???

Hi...

I am writing a program for a client which needs to have "Dial-Up Scripting" capability. Since it is unknown wether or not the users will have this installed, I need to make sure it gets installed. My first thought is to somehow pass all the information through control.exe (after I have checked to see if it is already installed):

Call Shell(System.WinDir & "control.exe APPWIZ.CPL", 1)

I want to pass the arguments to the applet and also tell it where the ?.INF file is to install the drivers, etc.

And...I want this whole process to be as invisible as possible to the user.

But, I can't find any documentation on how to do it, or what arguments to use, etc.

Any help or info would be greatly appreciated. I am using VB 4Pro 32Bit in Windows 95.

Sincerely,

-S
summersetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

summersetAuthor Commented:
Edited text of question
0
dark_waderCommented:
why do you want all this?
why not just write directly to win.ini and so on?
(be Microsoft independent as possible :)
0
y96andhaCommented:

The following could work:

Call Shell(System.WinDir & "\System32\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 " & nameofinffile$, 1)

The correct way to do it is to find the proper command to execute by looking up the .inf file extension in HKEY_CLASSES_ROOT. This will lead you to the inffile entry in HKEY_CLASSES_ROOT. Under this entry, in HKEY_CLASSES_ROOT\inffile\shell\Install\command is the command line used to install a ?.INF file. The %1 in the command should be replaced by the name of the ?.INF file.


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

y96andhaCommented:
Sorry for the bad path in my answer. I use win NT, and that was the command I found by following the instructions I gave. You need to do that on your Win95 machine. Probably you will find a different command then. Use that command instead.
0
summersetAuthor Commented:
I got the command from the registry (cool...I wasn't aware of this)...However, when I ran it...it deleted the Networking Icon from the desktop of my test computer.

Call Shell("C:\WINDOWS\rundll.exe setupx.dll,InstallHinfSection DefaultInstall 132 c:\windows\inf\msnet.inf")

I guess I should try to explain what I'm doing. I am making an install for a client. Their software needs the client's computer to have "Dial-Up Networking" and "Dial-Up Scripting" installed. If I just load all the DLL's, etc. with the install (4 disks) I get conflicts. Older versions of Windows95 have DLL conflicts with the Newer versions (Win95B and up). It's really been a pain. Especially the ones that don't even have the Internet Wizard installed.

What I need to do is find a way to install all of these progs/DLL's, etc. from the users Win CDRom (or disk) as they are needed so that they are completely compatible with their version of WEindows 95 (extract from .cab?). This would include Dial-Up Networking (if needed), a modem (if needed--which the wizard would do) and Dial-Up Scripting.

I have even begun experimenting with the "inf" files. I have done several install disks before, but I have never dealt with any Dial-Up stuff and the Registry...

Hope that helps explain. Any info or help would be greatly appreciated.

I am using Visual Basic 4.0 32Bit in Windows95.

-S
0
y96andhaCommented:
OK. When I read your question I thought that you just wanted to install dial-up scripting, and I think that would have worked with this method, since the dial-up scripting has its own .INF-file.

I am not sure about this, but I think that it would be possible to use this method anyway. As you can see, there is a parameter "DefaultInstall". I think that this is the name of the section in the .INF file that is to be installed. You can locate the section that you want to install in the .INF file and pass that name instead.
0
summersetAuthor Commented:
Yes...that worked. I can add "Slip and Scripting for Dial-Up Networking" by running the [DefaultInstall] in Rnaplus.inf (which appears to be the same as [CSLIP]). However, when I try to add the "Client for Microsoft Networks" by running the [VREDIR.Install] in Netcli.inf (which seems to be the only file used for this), it installs all the drivers and files, but it does not actually add the Client for Microsoft Networks...

Arrg...I'm getting frustrated. When I "manually" install the "Client for Microsoft Networks" it adds all the same files, et al just as it does when I run [VREDIR.Install] in Netcli.inf...EXCEPT it actually adds the "Client for Microsoft Networks" -- is there another inf file I am missing? Perhaps a [] section I do not have? Is there a binary I need to run??? It appears that something is missing after I run [VREDIR.Install] in Netcli.inf.

Any help would be GREATLY appreciated.

-S
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.