Wanted : Sample simple Windows NT printer driver installation script.

Wanted : Sample simple Windows NT printer driver installation script.

Post by Scott Hil » Fri, 06 Feb 1998 04:00:00



Hi y'all,

        Subject says it all really. I'm in need of a simple printer driver
installation oemsetup.inf file. Basically I'm writing a Windows NT4.0
printer driver and I'm currently trying to get the install file working.
I've got a working Win95 version, which I tried to modify for NT, but this
seems to install the files then comes up with the error :

        Printer driver for Windows NT 4.0 x86 could not be installed. The system
cannot find the file specified.

        I've checked I'm not trying to install a file that doesn't exist, I've
read and re-read the docs and I'm stumped. So if anybody has a simple
printer driver oemsetup.inf files that successfully installs a driver and
maybe one or two additional files (as mine needs to do), I'd be eternaly
gratefull if you could e-mail me a copy.

TIA,

--
Scott Hill

Software Engineer (and all round nice guy)

"The best trick the devil ever pulled was convincing people he didn't
exist..."
                                                                - Verbal Kent.

"the Internet is here so we can waste time talking about nothing in
 particular when we should be working" - Marcus Hill.

 
 
 

Wanted : Sample simple Windows NT printer driver installation script.

Post by Larry Deac » Sat, 07 Feb 1998 04:00:00


Why don't you look at the NT printer INF? It's in windows\inf\ directory
and it's called NTPRINT.INF. I started with this and hacked most of it away
then looked at the NT DDK documentation for details. If you can write the
NT driver this should be easy for you.

 
 
 

Wanted : Sample simple Windows NT printer driver installation script.

Post by Abhi » Wed, 11 Feb 1998 04:00:00


Otherwise you can use the AddPrinter and AddPrinterDriver function to perform
your own installation.
This topic is more suitable for  print newsgroup.
abhi


> Why don't you look at the NT printer INF? It's in windows\inf\ directory
> and it's called NTPRINT.INF. I started with this and hacked most of it away
> then looked at the NT DDK documentation for details. If you can write the
> NT driver this should be easy for you.

 
 
 

Wanted : Sample simple Windows NT printer driver installation script.

Post by Scott Hil » Thu, 12 Feb 1998 04:00:00




Quote:> Why don't you look at the NT printer INF? It's in windows\inf\ directory
> and it's called NTPRINT.INF. I started with this and hacked most of it
away
> then looked at the NT DDK documentation for details. If you can write the
> NT driver this should be easy for you.

        Um, tried that still no joy. Below is my oemsetup.inf file, this file and
those specifically named in that file are the only files in my install
directory. I point the Printers->Add Printer wizard to that directory using
the Have Disk option, but still I get this damned cannot find specified
file error. I can't see what's wrong with it, can you?

Oemsetup.inf :

[Version]
Signature="$Windows NT$"
Provider=%IMAGIK%
LayoutFile=layout.inf
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer

;
; Manufacturer section.
;
; This section lists all of the manufacturers
; that we will display in the Dialog box
;
[Manufacturer]
"Imagik"

;
; Model sections.
;
; Each section here corresponds with an entry listed in the
; [Manufacturer] section, above. The models will be displayed in the order
; that they appear in the INF file.
;

[Imagik]
"Cardstar 300"=cs300.DLL

;
; Installer Sections
;
; These sections control file installation, and reference all files that
; need to be copied. The section name will be assumed to be the driver
; file, unless there is an explicit DriverFile section listed.
;

[cs300.DLL]

DataSection=cs300_DATA

; Copy Sections
;
; Lists of files that are actually copied. These sections are referenced
; from the installer sections, above. Only create a section if it contains
; two or more files (if we only copy a single file, identify it in the

; profile (since the DestinationDirs can only handle sections, and not
; individual files).
;

[cs300]
cs300nt4.DLL
cs300UI.DLL

;
; Data Sections
;
; These sections contain data that is shared between devices.
;

[cs300_DATA]
DriverFile=cs300nt4.DLL
ConfigFile=cs300UI.DLL

;
; Call SetupSetDirectoryId with 66000 to set the target directory at
runtime
; (depending on which environment drivers are getting installed)
;

[DestinationDirs]
DefaultDestDir=66000

;
; Control Flags
;
[ControlFlags]
ExcludeFromSelect = 2369
;
; Localizable Strings
;
[Strings]
IMAGIK="Imagik"

--
Scott Hill

Software Engineer (and all round nice guy)

"The best trick the devil ever pulled was convincing people he didn't
exist..."
                                                                - Verbal Kent.

"the Internet is here so we can waste time talking about nothing in
 particular when we should be working" - Marcus Hill.

 
 
 

Wanted : Sample simple Windows NT printer driver installation script.

Post by Scott Hil » Sat, 14 Feb 1998 04:00:00






> > Why don't you look at the NT printer INF? It's in windows\inf\
directory
> > and it's called NTPRINT.INF. I started with this and hacked most of it
> away
> > then looked at the NT DDK documentation for details. If you can write
the
> > NT driver this should be easy for you.

>    Um, tried that still no joy. Below is my oemsetup.inf file, this file
and
> those specifically named in that file are the only files in my install
> directory. I point the Printers->Add Printer wizard to that directory
using
> the Have Disk option, but still I get this damned cannot find specified
> file error. I can't see what's wrong with it, can you?

<schnip>

Good news :) and not so good news :( Good news first - Fixed the above
problem. I was missing a DataFile entry (D'Oh!) (If you're reading this
Carey, cheers!).
Any how, now for the bad news, I've got an even more annoying problem. The
driver appears to install OK, and I get an icon for my printer in the
Printers folder, but if I try to bring up its properties I get the error :

        Device settings cannot be displayed. The driver for the specfied printer
is not installed only spooler properties will be displayed. Do you want to
install the driver now?

Like what ? I just installed the driver and it's telling me it's not
installed! Odd thing is, WinDbg seems to be indicating that NT is loading
the driver !
I really can't understand what's going on here, I've tried the MSDN (online
and offline) and Dejanews all too no avail, so you guys are my last chance.
Any idea what's going on here ?
I did notice that my driver dll has no exported functions, but I can't make
it export any - tried __declspec(dllexport) and a .def file, neither of
which worked (__declspec gave me compile errors and the def file just
wasn't used), then I had a look at some of the DDK sample driver dlls and
they don't export any functions either, so is this normal ? (BTW, I can
export all the functions in my ui dll OK).

--
Scott Hill

Software Engineer (and all round nice guy)

"The best trick the devil ever pulled was convincing people he didn't
exist..."
                                                                - Verbal Kent.

"the Internet is here so we can waste time talking about nothing in
 particular when we should be working" - Marcus Hill.

 
 
 

Wanted : Sample simple Windows NT printer driver installation script.

Post by Carey Gregor » Sat, 14 Feb 1998 04:00:00



> Any how, now for the bad news, I've got an even more annoying problem. The
> driver appears to install OK, and I get an icon for my printer in the
> Printers folder, but if I try to bring up its properties I get the error :

>         Device settings cannot be displayed. The driver for the specfied printer
> is not installed only spooler properties will be displayed. Do you want to
> install the driver now?

I've seen this before, but I don't recall exactly what I did to fix it.  Start
by taking a look at your driver's UI code and make sure it's functioning
correctly.  The driver dll doesn't export its entry points in the usual
manner.  The entry points in the driver dll are specified in the driver
function table you return in the DrvEnableDriver function.  I don't think this
is your problem.

--
Carey Gregory

 
 
 

1. Simple Windows NT Printer Driver

I am trying to convert a simple printer driver that was derived from the
BITMAP sample that was provided in the Windows 3.1 DDK. That sample used
UNIDRV.DLL to do most of the work, and only required code to write the
output to a bitmap file. The Win NT DDK does not have this sample, or
anything that resembles this sample.

Is there a sample driver somewhere that demonstates this using the RASDD
engine of WIndows NT? Is there a simple path to convert the code I have?
What I see now looks like a complete rewrite.


2. Cannot authenticate from RedHat 7.1

3. Help with developing a simple NT 4.0 printer driver

4. RZ28 Jumper settings?

5. Windows printer drivers vs. MS-DOS printer drivers

6. This game works under OS/2 Too.

7. Simple NT Printer Driver

8. Amiga fish problems

9. Wanted: Programmer to design installation script

10. Windows 95/NT Print Driver Installation

11. Windows print spooler/generic printer driver wanted

12. NT Driver installation on Windows 2000

13. NT Driver installation for Windows 2000