Solved

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

Posted on 1997-05-08
7
1,433 Views
Last Modified: 2008-03-03
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
0
Comment
Question by:summerset
  • 3
  • 3
7 Comments
 

Author Comment

by:summerset
ID: 1426100
Edited text of question
0
 
LVL 1

Expert Comment

by:dark_wader
ID: 1426101
why do you want all this?
why not just write directly to win.ini and so on?
(be Microsoft independent as possible :)
0
 
LVL 5

Accepted Solution

by:
y96andha earned 100 total points
ID: 1426102

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 5

Expert Comment

by:y96andha
ID: 1426103
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
 

Author Comment

by:summerset
ID: 1426104
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
 
LVL 5

Expert Comment

by:y96andha
ID: 1426105
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
 

Author Comment

by:summerset
ID: 1426106
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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now