PDA

View Full Version : INF and installShield 2008 basic question...honest



Gary Clark
06-15-2007, 03:11 PM
Hello,

Got a quick question concerning INF and install shield for device drivers.
Basically I conjured up a very simple INF file that installs a local driver within the INF file it installs the file into the system32 directory and sets up the registry.

Now being new,green but keen to MSI. I added the INF to a basic project using the dandy device driver wizard. Marvelous. Anyway I built the project and when installing the test project I didnt see the device driver in windows\system32 directory. When I run the .inf it always installs the driver
into system32.

Attached the local INF file.

Any ideas. This going to be obvious to the guru. I dont have any registry settings in the MSI project. I have only added the .inf file to the project.

Much appreciated,
Garyc

;;;
;;; test install
;;;
;;;
;;; Copyright (c) 2001, Microsoft Corporation
;;;

[Version]
Signature = "$Chicago$"
Class = "ActivityMonitor"
Provider = %Msft%
DriverVer = 03/28/2007,1.0.0.0


;; 12 refers to the driver directory
;; 10 refers to the windows directory %windir%

[DestinationDirs]
DefaultDestDir = 12
LLFilter.DriverFiles = 12 ;%windir%\system32\drivers


;;
;; Default install sections
;;

[DefaultInstall]
CopyFiles = LLFilter.DriverFiles

[DefaultInstall.Services]
AddService = %LLFilterServiceName%,,LLFilter.service
;;
;; Default uninstall sections
;;

[DefaultUninstall]
DelFiles = LLFilter.DriverFiles



[DefaultUninstall.Services]
DelService = LLFilter,0x200 ;Ensure service is stopped before deleting

;
; Services Section
;

[LLFilter.Service]
DisplayName = %LLFilterServiceName%
Description = %LLFilterServiceDesc%
ServiceBinary = %12%\LLFilter.sys ;%windir%\system32\drivers\LLFilter.sys
ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
LoadOrderGroup = "FSFilter Activity Monitor"
AddReg = LLFilter.AddRegistry
Dependencies = FltMgr


[LLFilter.DriverFiles]
testdrv.sys



;
; Registry Modifications
;
[LLFilter.AddRegistry]
HKR,%RegInstancesSubkeyName%,%RegDefaultInstanceValueName%,0x00000000,%DefaultInstance%
HKR,%RegInstancesSubkeyName%"\"%Instance1.Name%,%RegAltitudeValueName%,0x00000000,%Instance1.Altitude%
HKR,%RegInstancesSubkeyName%"\"%Instance1.Name%,%RegFlagsValueName%,0x00010001,%Instance1.Flags%


;
; Copy Files
;
[LLFilter.DriverFiles]
testdrv.sys


;;
;; String Section
;;

[Strings]
Msft = "Microsoft Corporation"
LLFilterServiceDesc = "LLFilter mini-filter driver"
LLFilterServiceName = "LLFilter"
RegDefaultInstanceValueName = "DefaultInstance"
RegTagValueName = "Tag"
RegDependsOnService = "DependsOnService"
RegDependsOnGroup = "DependsOnGroup"
RegGroupValue = "Group"
LLFilterServiceDesc = "LLFilter mini-filter driver"
LLFilterServiceName = "LLFilter"
RegInstancesSubkeyName = "Instances"
RegDefaultInstanceValueName = "DefaultInstance"
RegAltitudeValueName = "Altitude"
RegFlagsValueName = "Flags"



; Filter Instances specific information.
DefaultInstance = "LLFilter - Top Instance"
Instance1.Name = "LLFilter - Top Instance"
Instance1.Altitude = "385000"
Instance1.Flags = 0x0 ; Suppress automatic attachments

Holger_G
06-18-2007, 02:56 AM
InstallShield uses Microsoft´s Driver Install Frameworks Tools (DIFx) to install PnP Function Drivers or Class Filter Drivers.
So you should first make sure that your driver package meets the Requirements of DIFx.

You can download DIFx (including Documentation) here (http://www.microsoft.com/whdc/driver/install/DIFxtls.mspx) (most current version of the Driver Install Frameworks (DIFx) tools is available in the Windows Driver Kit (WDK)).

You can simply use DPInst.exe of DIFx to test your driver package.

Hope that helps a little bit.

-Nick