Here is my solution:
First I was pleased because I had one MSI running fine when installed manually, like I always do testing before running by GPO.
The MSI could install printer and remove printer when activated by me logged on as administrator.
But running By GPO the installation stopped like some dialog wanted reply I did´t get any error messages.
So I had to study more about the Windows Installer operation and Custom Action basics
One great help for me has been the new Install Shield Press book by Bob Baker
Practical Windows Installer Solutions ISBN 0-9715708-3-3.
I have bought the book because of his solution to install PnP devises also with custom actions
I don’t have that one yet but I’m getting there I hope.
First the installed printer driver must be digitally signed, that was my first problem.
The printer driver I got from HP was not signed.
I found that Microsoft have included ntprint.inf supporting all included printers in the box.
ntprint.inf is a system file so you don’t find it at first, but it I located at %SystemRoot%\inf folder
It is vital that you use the right combination of execution type and the right sequence to get it working. Bob Baker’s book helped me there.
This is my Custom Action for install Printer:
InstallPrinter
Working Directory : SystemFolder
Filename & Command line : rundll32 printui.dll,PrintUIEntry /if /b "CaseWarePrinter" /f "C:\windows\inf\ntprint.inf" /r "Lpt1:" /m "HP LaserJet 4" /z /u
Return Processing : Synchronous(ignores exit code)
In-script Execution : Deferred Execution in System Context
Execution Scheduling : Always execute
Use 64bit : no
Install UI sequence :
Install Exec Sequence : After Install Files
Install Exec Condition : REMOVE=""
Admin UI Sequence :
Admin Exec Sequence :
Admin Exec Condition :
MSI type number : 3170
RemovePrinter
Working Directory : SystemFolder
Filename & Command line : rundll32 printui.dll,PrintUIEntry /dl /n "CaseWarePrinter" /q
Return Processing : Synchronous(ignores exit code)
In-script Execution : Deferred Execution in System Context
Execution Scheduling : Always execute
Use 64bit : no
Install UI sequence :
Install Exec Sequence : After Install Files
Install Exec Condition : REMOVE="ALL"
Admin UI Sequence :
Admin Exec Sequence :
Admin Exec Condition :
MSI type number : 3170
The Install Printer Custom action is also running when you remove the package, that’s why I have to place a condition there ass well.
Other wise the printer gets off an on again when pulling it off.
my testing so far confirms me in how invincible I am.
Sweede 😉 🙂