Click to open or copy the files for the InfInst sample.
The InfInst sample demonstrates the basic use of the Win32 Setup APIs. The Win32 Setup APIs are a series of functions for installing files, modifying the registry, and modifying INI files. The primary way to use the Win32 Setup APIs is to combine the INF handling functions with one or more INF files that describe the actions to perform during your install or uninstall. One benefit of the Win32 Setup APIs is that it provides dialog boxes that are consistent, familiar to user from the NT and Windows 95 setup, and localized if the OS is localized. Moreover, the copy operations can handle things like version checking and replacing in use files. See the thorough documentation in the Win32 SDK help.
The primary APIs used in this sample are implemented in the Doinst.c file. The rest of the sample is a basic wizard that collects simple information from the user. The wizard is based on the win32\wizard sample and is not complete in its error handling and in helping the user determine things like available disk space.
This sample uses the following keywords:
checkradiobutton; closehandle; createfile; createwindow; createwizard; custom_options; defwindowproc; dispatchmessage; doinstallation; enddialog; fillinpropertypage; free; getdlgitem; getlasterror; getmessage; getmodulefilename; getparent; getregstring; getstockobject; initapplication; initinstance; install; install_destination; install_type; installfinish; license; loadcursor; loadicon; lstrcpy; mainwndproc; makeintresource; makelong; messagebox; postmessage; postquitmessage; propertysheet; propsheet_setwizbuttons; readfile; regclosekey; regcreatekeyex; registerclass; registerstring; regopenkeyex; regqueryvalueex; regsetvalueex; runtimeregistration; senddlgitemmessage; sendmessage; setdlgitemtext; setfocus; setupclosefilequeue; setupcloseinffile; setupcommitfilequeue; setupdefaultqueuecallback; setupinitdefaultqueuecallbackex; setupinstallfilesfrominfsection; setupinstallfrominfsection; setupopenfilequeue; setupsetdirectoryid; setuptermdefaultqueuecallback; setwindowlong; showwindow; specify_location; strcat; strcpy; strrchr; switch; text; translatemessage; unreferenced_parameter; updatewindow; welcome; winexec; winmain; wsprintf; yourinfo