<[EMAIL PROTECTED]> writes:

> In his response, Friedrich asked: Well couldn't I run the custom action
> when I like for what good should be the After, Before etc stuff then?
>
> Yes, up to a point you can run a custom action whenever you want. I say
> "up to a point" because doing so after "InstallFinalize" is not usually
> a good idea, for example, and if you need access to installed files - as
> you do - it cannot be run before "InstallFiles" and/or "PatchFiles".
It was scheduled after InstallFiles.
>
> I must admit I have never had to install a printer driver so I really
> can't be of much help. I suspect you may benefit from taking a look at
> Microsoft's Driver Install Frameworks (DIFx). I believe they have some
> custom actions already defined to install device drivers, and for all I
> know they may have something that would help configure the printer too.
> See http://www.microsoft.com/whdc/driver/install/difxtools.mspx for more
> details.
Not that I would be aware of it. I'm using the difxapi, because of
this I do not have to care where the files get installed. And that
installation works smoothless AFAIKS. Howerver that does not create a
Printer symbol and I can remember seeing anything that suggests otherwise.
>
> So... Has anyone else out there in WiX land installed a printer driver?
> If so, would you be willing to share how you did it?
Well yes I did, but with big WORKS BUT...

1) at first I installed the difxapp tools
   - Howerver it is unclear to me if a printer falls under it's
requirements. In the docs they state:
"By default, the DIFx tools support installing signed Plug and Play
(PnP) function drivers and signed class filter drivers beginning with
Microsoft Windows 2000. The DIFx tools can also be configured in
legacy mode to install unsigned PnP function drivers and unsigned
class filter drivers. In legacy mode, the DIFx tools will also install
driver packages that have missing files."

In the docs I just can find for DriverPackageType
- ClassFilter
- FileSystem
- FileSystemFilter
- KernelModule
- KernelService
- Network
- PlugAndPlay.

I assume Printer falls under PlugAndPlay.....



2) then wix2 and wix3 (I have not idea really what one to prefer)
3) after that I trid my best to get the unidrv stuff compiled. In the
end that was the "easy" task"

4) no we get to deployment
   - I downloaded tons of stuff to read from 
    * http://www.microsoft.com/whdc/driver/install/default.mspx
    * plus everything I could get my hands on with Printer in it's
header, especially of course Printer Installation in Windows Vista

Now the first trouble has stroke:
According to the later docs I have to write an .inf file whichis
package aware. Well getting that was not really an easy
undertaking. And checking if it works with chkinf just ended in error
messages from Perl (which I had to install separatly from
ActiveState). However it seems I got that "right" at least so much
that I could use the .inf file to install the printer.

Howerver open questions still remain:
- Do I need a co-installer? 
- Am I expected to write any other special "setup" routine
I can't tell and that makes me aggressive. Why the hell couldn't that
be documented? No don't say check the examples. The examples do not
help the slighest. The give you some .inf file and say use this or
that for installation.
- the mentionin of core drivers has meant to me that I can expect that
the needed files (unidrvxxxx.dll) are installed on any Vista. So I do
not have to provide them in my installer. But that's  guess, it's not
stated anywhere I have looked explicitly. So maybe I'm wrong about
this assumption....


However in the end it kind of works. But there is one
Problem left:
Usually you can take the Add Printer Wizard and fed him hte .inf files
used for installing the printer. Howerver during the install you get
asked if you want to replace the "existing" driver or not. Well AFAIKT
you can not say replace the existing driver. It then complains about
some missing file. But nevertheless if no printer is there at all the
stuff gets installed... 

Falling back to an .inf files for pre Vista works kind of but on fresh
install vista complains about some NT 4.x driver policy which is not
enabled on default. But if that installation works why not the stuff
with replacement even if that would a no-operation?

5) Now it's getting realyl messy. After the driver is installed I want
the setup to add a Printer symbol. As written before I can not see how
to achieve that without using a custom action. 

To my suprise it has worked out of the box on my development
machine. I did expect problems with some missing files but because the
.inf approach has worked... 

Now in a freshly setup up vista. It dos not work the error message was
just a return value of 3 in the installer which just means some "fatal
error" is there. After some tries to figure that out I finally settled
for looking in the Events and there I found the trouble witht the
c-runtime libraries. But finding it and solving it are two different
pair of shoes. Just imaging my horror, to see that adding such a
fundamental important library is a task in itself. 

Ok let's go to the deployment options:
http://msdn2.microsoft.com/en-us/library/e2444w33(VS.80).aspx
here
http://msdn2.microsoft.com/en-us/library/2kt85ked(VS.80).aspx

especially in my case:

http://msdn2.microsoft.com/en-us/library/aw2dz878(VS.80).aspx
but again it's just based on what you an do in VS2005. 

What I need in the end I thought was some merge module which contains
the proper c runtime files. Those things are installed by VS2005 in
some sub directory ... or you can get it from Microsoft in some extra
package. 

Now how to use that stuff. Fortunatly integrating a msm files is shown
in the docs. And after getting that right my installer grows by some
megabytes so something must be in there. However looking at the
generated installer yields a few warnings with wix-2.... don't know
how to judge how severe this warnings are.

I now have a file with hopefully the proper runtime files. But
unfortunatly I end up with the trouble mentioned before. And believe
it or not 
see 

http://msdn2.microsoft.com/en-us/library/ms235624(VS.80).aspx

the comment at the end is very encouriging. Yes I know I have
Installer larger than 3 available, but then tell my why I can not
simply add the proper merge module and are done with it?


 That is why I wrote
"frustration". 

My "solution". I linked the stuff statically and at least it partly
works. I now "just" have to figure how am I supposed to use AddPort
and AddPortMonitor properly. Funny enough it should be better to rely
on shared libraries. Howerver adding them to my installer makes it
larger by  few megabytes and well AFAIKT it adds the shared library to
some "store", and so does another installer and another installer.

It seems to me that the suggestion is to have at least a few dozens
shared libraries to your disposal and that means to me in the end one
is much better of with not using shared libraries at all....

I'm really fed-up with this stuff....

Regards
Friedrich













-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to