/build/static/layout/Breadcrumb_cap_w.png

Installing a driver

Hello,

How can I install a driver service using windows installer?? (MSI)

Regards,
milindsm

0 Comments   [ + ] Show comments

Answers (22)

Posted by: jmcfadyen 14 years ago
5th Degree Black Belt
2
not really.

do you understand the installation sequences ? installation sequencing is quite complex and in general the installation will run in the context of the logged on user. you can elevate CA's to run as admin which is what you need to do.

to gain access to elevation in msi you need to run the CA in deferred mode, if you need data from the msi it gets a little more complex and you need to run 2 CA's.

one in immediate to send data across to the deferred, and 1 in deferred which references that data and executes the required tasks. You should really have a commit/rollback CA for any CA in deferred which means that you should really have 4 CA's to do 1 job. you may want to do some research on immediate / deferred / commit rollback CA's etc.
Posted by: AngelD 14 years ago
Red Belt
0
Is it a service or a driver and if the latter a plug'n play or kernel driver?
Posted by: milindsm 14 years ago
Blue Belt
0
PnP
Posted by: AngelD 14 years ago
Red Belt
0
search for dpinst.exe and/or difxapp (merge module)
Posted by: milindsm 14 years ago
Blue Belt
0
Could you please elaborate ??
Posted by: Jsaylor 14 years ago
Posted by: anonymous_9363 14 years ago
Red Belt
0
Indeed you are. For Google, at any rate. I think what Kim was getting at was that AppDeploy is chock-full of posts about DPInst, PnP drivers, etc.
Posted by: milindsm 14 years ago
Blue Belt
0
I finally managed to get DIFxApp. I then followed these steps but ....

1. I added 3 files to Installer project, MyDriver.SYS, MyDriver.INF and a fake MyDriver.CAT (as it was giving me some error without Catalog file)
2. Merged DIFxApp.msm with the installer. (It gave me two conflicts but they were related to _Validation table).
3. Added component id of MyDriver.INF to MsiDriverPackages table with Flags set to 1.
4. Save & Run

Error from the log file was,


Action start 17:29:07: MsiProcessDrivers.
DIFXAPP: 'Component' is 'C__C6B18D429F334DA9A38BB1B1080E5027'
DIFXAPP: Component state 0x2 -> 0x3
DIFXAPP: 'ComponentId' is {F0EDEBFC-6AF5-B110-582D-F09254D9FF44}
DIFXAPP: 'Flags' is 1
DIFXAPP: component path is C:\Program Files\MyOrg\MyDriver\
Action 17:29:07: MsiRollbackInstall.
Action start 17:29:07: MsiRollbackInstall.
DIFXAPP: RollbackInstall
DIFXAPP: ERROR 0x57 reading the 'CustomActionData' property.
DIFXAPP: Rollback failed with error 0x57
Action ended 17:29:08: MsiRollbackInstall. Return value 3.
DIFXAPP: ERROR 0x643 creating MsiRollbackInstall custom action for C__C6B18D429F334DA9A38BB1B1080E5027
Action ended 17:29:08: MsiProcessDrivers. Return value 3.
Action ended 17:29:08: INSTALL. Return value 3.


What am I doing wrong???
Posted by: Inabus 14 years ago
Second Degree Green Belt
0
Run dpinst outside of MSI world and get it working there before attempting to deploy it via an MSI.

P
Posted by: milindsm 14 years ago
Blue Belt
0
I tried with DPInst.exe


INFO: Found driver package: 'F:\Assignments\ScriptTest\Drvr\MyDriver.INF'.
INFO: ENTER: DriverPackagePreinstallW
ERROR: Failed to calculate strong name from 'f:\assignments\scripttest\drvr\MyDriver.CAT'. Check if catalog is valid and if file is in the same directory as the INF. (Error code 0x80092009: Cannot find the requested object.)
INFO: RETURN: DriverPackagePreinstallW (0xE0000304)
INFO: Returning with code 0x80010000


Is fake CAT file causing a problem??? I should I create a catalog file???
Posted by: milindsm 14 years ago
Blue Belt
0
A point I would like to mention,
If I right click .INF file and "Install", everything works fine.
Posted by: jaybee96 14 years ago
Red Belt
0
I would suggest using AdminStudio it has a driver wizard which adds drivers to your package in 1 step.
you can use the evaluation version to test it and create the driver components and export them as a Merge Module.
Posted by: anonymous_9363 14 years ago
Red Belt
0
Is fake CAT file causing a problem??? I should I create a catalog file??? Ya think?

Everything you've read so far will have directed to either obtain a signed driver or sign it yourself. Which did you do? Neither, clearly.
Posted by: PackageExpert 14 years ago
Blue Belt
0
ORIGINAL: milindsm

Is fake CAT file causing a problem??? I should I create a catalog file???



indeed....you can't be any smarter to fake a driver installation my friend :) create a catalog file a.k.a .cat file from Inf2cat.exe tool. Search AppDeploy for the followings and you will get all you need to get your driver installed..

driver signing;driver installation;makecert;inf2cat;pnp driver install

There is more than enough information here to get you rolling... Good Luck..
Posted by: milindsm 14 years ago
Blue Belt
0
Finally managed to install a driver on XP, it fails on Vista though. It says you don't have enough permission to install a driver. Although it is asking for elevation, it fails to install a driver :(
Posted by: PackageExpert 14 years ago
Blue Belt
0
you have to run the command line in elevated mode and install
Posted by: milindsm 14 years ago
Blue Belt
0
But the installation gets elevated when I click on "Install" button, driver installation doesn't take place in this elevated mode, is it??
Posted by: jmcfadyen 14 years ago
5th Degree Black Belt
0
u don't seem to of mentioned the CA used to install this. You can elevate the CA and you can elevate the installation using Vista UAC manifests. You will likely need to do both in this case.
Posted by: milindsm 14 years ago
Blue Belt
0
Can I keep the installation elevated through out the installation??? So, there will be only one prompt at the beginning asking for elevation and then no prompt till the end. BTW, I embedded manifest in custom action DLL but no luck. I think I am missing some step in between.
Posted by: milindsm 14 years ago
Blue Belt
0
I also tried placing the driver install custom action between InstallInitialize and InstallFinalize but it didn't ask for elevation and RUNDLL32 failed while copying a driver file from %TEMP% to C:\Windows\System32
Posted by: milindsm 14 years ago
Blue Belt
0
jmcfadyen

jmcfadyen..!! It worked...!!! Thanks a lot !!! n Thanks all whose patience was tested by me :)
Posted by: milindsm 14 years ago
Blue Belt
0
I was trying to open database in the deferred action function. As per your instructions, I separated out the File copying (extraction from MSI) part and actual execution part and it worked.

Lesson Learnt : You can not play (open/edit etc.) with the .MSI database while in deferred mode.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ