Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Urgent help needed installing a pesky Xerox DocuColor 242 Unattended

- - - - -

  • Please log in to reply
16 replies to this topic

#1
clivebuckwheat

clivebuckwheat

    Senior Member

  • Member
  • PipPipPipPip
  • 566 posts
I have a script to install a Xerox DocuClor 242 printer driver.yet the warning still plagues me.

bcdedit.exe /set loadoptions DDISABLE_INTEGRITY_CHECKS

bcdedit.exe /set loadoptions TESTSIGNINGON

net stop spooler


reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" /v \\Myprintserver\4G11P-DocuColor242 /t REG_SZ /f


net start spooler

printui.exe /ia /m "DocuColor 242-252-260 PCL" /h "x64" /v "Type 3 - User Mode" /f "\\Myprintserver\drivers\Xerox\DocuColor 242\PRNTDRVR\Pcl6_drvr\Win_2K_XP_VISTA\oemsetup.inf"

RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b "4G11P-DocuColor242" /r "\\Myprintserver\4G11P-DocuColor242" /m "DocuColor 242-252-260 PCL"

The problem is the driver is not signed, and I get the popup in the attached screenshot, if i click install the driver the printer installs fine. I have tried to disable the Digital driver signing under windows 7 using

bcdedit.exe /set loadoptions DDISABLE_INTEGRITY_CHECKS

bcdedit.exe /set loadoptions TESTSIGNINGON

Here is the oemsetup.inf

; PCL printer INF for WINXP
; 
;
[Version]
Signature="$Windows NT$"
Provider=%MFG%
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer
DriverVer=05/01/2009
CatalogFile.NTx86=5p1x12e3.cat
CatalogFile.NTamd64=5p1x12e6.cat

[Watermark_Reg]
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Watermark","1",2,"0,0,255,0,0,1,0,0,450,700,0,24,Helvetica,CONFIDENTIAL"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Watermark","2",2,"0,0,0,0,255,1,0,0,450,700,0,24,Helvetica,COPY"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Watermark","3",2,"0,0,0,255,0,1,0,0,450,700,0,24,Helvetica,DRAFT"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Watermark","4",2,"0,0,0,255,0,1,0,0,450,700,0,24,Helvetica,TOP SECRET"
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Watermark","5",2,"0,0,0,255,0,1,0,0,450,700,0,24,Helvetica,ORIGINAL"
;
; Manufacturer Sections
;
; This section lists all of the manufacturers that we will
; display in the Dialog box.
;
[Manufacturer]
%MFG%=Xerox, NTamd64

;
; Model Sections 
;
; These sections correspond with an entry listed in the
; [Manufacturer] section above. The models will be displayed in the order
; that they appear here.
;
; plug-and-play id, if hw does not support it, remove everything after .pdd
[Xerox]
%Printer1%=EF5P1X12.PDD,LPTENUM\XeroxDocuColor_242-2D26

[Xerox.NTamd64]
%Printer1%=EF5P1X12.PDD,LPTENUM\XeroxDocuColor_242-2D26

;
; Installer Sections
;
;

[EF5P1X12.PDD]
CopyFiles=@EF5P1X12.PDD,PCLDriverFiles_NT1, SYS32
DataFile=EF5P1X12.PDD
DataSection=PCLData_NT1
AddReg=Watermark_Reg



;
;
; 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
; installer section, using the @filename notation) or if it's a color
; profile (since the DestinationDirs can only handle sections, and not
; individual files).


[SYS32]
msvcp80.dll
msvcr80.dll
[PCLDriverFiles_NT1]
EF5P1X12.chm
EF5P1X12.dll
EF5P1X12.dlx
EF5P1X12.esi
EF5P1X12.ext
EF5P1X12.fin
EF5P1X12.ifx
EF5P1X12.lan
EF5P1X12.mrx
EF5P1X12.oem
EF5P1X12.uat
EF5P1X12.uim
EF5P1X12.upd
EF5P1X12.xml
Microsoft.VC80.CRT.manifest
efjm.dll
msvcp80.dll
msvcr80.dll
harmony10.dll
harmony_bridge.dll
harmony_core.dll
harmony_ctp.dll
harmony_efi.dll
harmony_efi_color.dll



; Data Sections
;
[PCLData_NT1]
DriverFile=EF5P1X12.dlx
ConfigFile=EF5P1X12.ifx

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

[DestinationDirs]
DefaultDestDir=66000

SYS32 = 66002
;
; diskid = description,tagfile,unused,subdir
;
[SourceDisksNames]
1 = %DiskID1%,, 0000-0000
;
;
[SourceDisksNames.x86]
1 = %DiskID1%,, 0000-0000
;
;


[SourceDisksFiles.x86]
EF5P1X12.PDD = 1
EF5P1X12.chm = 1,\i386
EF5P1X12.dll = 1,\i386
EF5P1X12.dlx = 1,\i386
EF5P1X12.esi = 1,\i386
EF5P1X12.ext = 1,\i386
EF5P1X12.fin = 1,\i386
EF5P1X12.ifx = 1,\i386
EF5P1X12.lan = 1,\i386
EF5P1X12.mrx = 1,\i386
EF5P1X12.oem = 1,\i386
EF5P1X12.uat = 1,\i386
EF5P1X12.uim = 1,\i386
EF5P1X12.upd = 1,\i386
EF5P1X12.xml = 1
Microsoft.VC80.CRT.manifest = 1,\i386
efjm.dll = 1,\i386
msvcp80.dll = 1,\i386
msvcr80.dll = 1,\i386
harmony10.dll = 1,\i386
harmony_bridge.dll = 1,\i386
harmony_core.dll = 1,\i386
harmony_ctp.dll = 1,\i386
harmony_efi.dll = 1,\i386
harmony_efi_color.dll = 1,\i386

[SourceDisksFiles.amd64]
EF5P1X12.PDD = 1
EF5P1X12.chm = 1,\amd64
EF5P1X12.dll = 1,\amd64
EF5P1X12.dlx = 1,\amd64
EF5P1X12.esi = 1,\amd64
EF5P1X12.ext = 1,\amd64
EF5P1X12.fin = 1,\amd64
EF5P1X12.ifx = 1,\amd64
EF5P1X12.lan = 1,\amd64
EF5P1X12.mrx = 1,\amd64
EF5P1X12.oem = 1,\amd64
EF5P1X12.uat = 1,\amd64
EF5P1X12.uim = 1,\amd64
EF5P1X12.upd = 1,\amd64
EF5P1X12.xml = 1
Microsoft.VC80.CRT.manifest = 1,\amd64
efjm.dll = 1,\amd64
msvcp80.dll = 1,\amd64
msvcr80.dll = 1,\amd64
harmony10.dll = 1,\amd64
harmony_bridge.dll = 1,\amd64
harmony_core.dll = 1,\amd64
harmony_ctp.dll = 1,\amd64
harmony_efi.dll = 1,\amd64
harmony_efi_color.dll = 1,\amd64

; Localizable Strings
;
[Strings]
MFG="Xerox"
DiskID1="User Software"
Printer1="DocuColor 242-252-260 PCL"
CLASSNAME="Printer"

Posted Image][/code]

Edited by clivebuckwheat, 25 August 2012 - 11:16 AM.



How to remove advertisement from MSFN

#2
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,018 posts
  • OS:none specified
  • Country: Country Flag

The problem is the driver is not signed, and I get the popup in the attached screenshot, if i click install the driver the printer installs fine.

What about the good old way of AutoIt or nircmd clicking the "OK"? :unsure:

jaclaz

#3
clivebuckwheat

clivebuckwheat

    Senior Member

  • Member
  • PipPipPipPip
  • 566 posts
I am really not good with auto it?

Nircmd can click ok?

#4
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,018 posts
  • OS:none specified
  • Country: Country Flag

Nircmd can click ok?

Sure :thumbup , it has a few ways, cannot say which one will be suited to the specific message/window....

jaclaz

#5
clivebuckwheat

clivebuckwheat

    Senior Member

  • Member
  • PipPipPipPip
  • 566 posts
How would I do it with autoit?

#6
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
To disable driver signing in Windows 7 try following this tutorial and then reboot.
Also you script indeed disable driver signing but you need a reboot for it to be disabled as bcdedit only change boot parameter and as stated in thistutorial.
As for autoit, if you still want to do it this way, there are many way of doing it, but in all cases, you'll need to wait for the security check to appear with either a sleep command (not recommended) or a loop waiting for the right windows to appear (you can use the "autoit windows info" tool to get the need infos from the window) then focus on the windows and then send a tab and a space (or enter) with the sendkey command. When you'll get some code, if you're struggling with it post it to the right forum and you'll get help.

#7
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,018 posts
  • OS:none specified
  • Country: Country Flag

How would I do it with autoit?

Some suitable examples can be found here:
http://www.coretechn...lwaysUp/AutoIt/

The approach with AutoIt or with nircmd is essentially the same.
You must find a way to "identify" the window, then "wait" until it comes up, then let the program "click" on the right button.

jaclaz

#8
clivebuckwheat

clivebuckwheat

    Senior Member

  • Member
  • PipPipPipPip
  • 566 posts

To disable driver signing in Windows 7 try following this tutorial and then reboot.
Also you script indeed disable driver signing but you need a reboot for it to be disabled as bcdedit only change boot parameter and as stated in thistutorial.
As for autoit, if you still want to do it this way, there are many way of doing it, but in all cases, you'll need to wait for the security check to appear with either a sleep command (not recommended) or a loop waiting for the right windows to appear (you can use the "autoit windows info" tool to get the need infos from the window) then focus on the windows and then send a tab and a space (or enter) with the sendkey command. When you'll get some code, if you're struggling with it post it to the right forum and you'll get help.


I tried the tutorial with a reboot and the dialog box still pops up unfortunately.

#9
clivebuckwheat

clivebuckwheat

    Senior Member

  • Member
  • PipPipPipPip
  • 566 posts
I tried to click install with autoit to get the driver installed. It seems the Window is not activate. How do I get around this?

My Windows Security Script

WinWait("Windows Security", "")
WinActive("Windows Security", "")
Send("{TAB}")
Send("{ENTER}")
Exit(0)

Any Help would be great as I am not very skilled with autoit.

Edited by clivebuckwheat, 26 August 2012 - 07:45 AM.


#10
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,018 posts
  • OS:none specified
  • Country: Country Flag

My Windows Security Script

Use this:
http://www.coretechn...KeyToWindow.au3
as a base (seemingly you only need to add to it a "send TAB" command), i.e. replace:

$result = ControlSend($windowName, "", "", "{ENTER}")
with

$result = ControlSend($windowName, "", "", "{TAB}")
$result = ControlSend($windowName, "", "", "{ENTER}")


try with logging enabled...

jaclaz

#11
clivebuckwheat

clivebuckwheat

    Senior Member

  • Member
  • PipPipPipPip
  • 566 posts
I got it working with this.

WinWait("Windows Security", "")
WinActivate("Windows Security")
Send("{TAB}")
Send("{ENTER}")
Exit(0)

Now the issue is I need the script to loop, once the security warning box appears I need the autoit script to execute. Right now once the security warning box appears I must run the autoit script manually.

#12
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,018 posts
  • OS:none specified
  • Country: Country Flag

Now the issue is I need the script to loop, once the security warning box appears I need the autoit script to execute. Right now once the security warning box appears I must run the autoit script manually.

Try running it BEFORE (that should be the idea of the WinWait command), no need to loop... ;) i.e. call it with the same batch with which you start the install.
http://www.autoitscr...ons/WinWait.htm

If you omit the timeout and - for any reason - the windows does not appear or is not "sensed" the script will "wait forever", so giving it a "reasonable" timeout may be a smart thing to do.

jaclaz

#13
clivebuckwheat

clivebuckwheat

    Senior Member

  • Member
  • PipPipPipPip
  • 566 posts
Here is the batch file I do the execution of the printer script in as well as the autoit script.

\\MyPrintserver\WindowsSecurityInstallYes.exe

net stop spooler

reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" /v \\MyPrintserver\4G11P-DocuColor242 /t REG_SZ /f


net start spooler

printui.exe /ia /m "DocuColor 242-252-260 PCL" /h "x64" /v "Type 3 - User Mode" /f " \\MyPrintserver\drivers\Xerox\DocuColor 242\PRNTDRVR\Pcl6_drvr\Win_2K_XP_VISTA\oemsetup.inf"

RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b "4G11P-DocuColor242" /r " \\MyPrintserver\4G11P-DocuColor242" /m "DocuColor 242-252-260 PCL"

Here is the autoit script with pause

WinWait("[CLASS:Windows Security]", "", 45)
WinActivate("Windows Security")
Send("{TAB}")
Send("{ENTER}")
Exit(0)

The problem is I must run the autoit script before I run the line that generates the windows security dialog.

I call the autoit script from the batch file, the batch file pauses for 45 seconds runs the autoit script and exits and THEN runs the printui.exe /ia /m "DocuColor 242-252-260 PCL" /h "x64" /v "Type 3 - User Mode" /f " \\MyPrintserver\drivers\Xerox\DocuColor 242\PRNTDRVR\Pcl6_drvr\Win_2K_XP_VISTA\oemsetup.inf" which generates the windows security warning.

Edited by clivebuckwheat, 26 August 2012 - 03:27 PM.


#14
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
You could either integrate everything in your autoit script (using runwait and run command) or modify your batch script like this:
start /separate "process security warning" \\MyPrintserver\WindowsSecurityInstallYes.exe


#15
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,018 posts
  • OS:none specified
  • Country: Country Flag

You could either integrate everything in your autoit script (using runwait and run command) or modify your batch script like this:

start /separate "process security warning" \\MyPrintserver\WindowsSecurityInstallYes.exe

Hmmm. :unsure:
http://ss64.com/nt/start.html

Options for 16-bit WINDOWS programs only

/SEPARATE Start in separate memory space (more robust)
/SHARED Start in shared memory space (default)


I would try with a simpler:

START "process security warning" \\MyPrintserver\WindowsSecurityInstallYes.exe

and then try with:

START "process security warning" /MIN \\MyPrintserver\WindowsSecurityInstallYes.exe



jaclaz

#16
clivebuckwheat

clivebuckwheat

    Senior Member

  • Member
  • PipPipPipPip
  • 566 posts


You could either integrate everything in your autoit script (using runwait and run command) or modify your batch script like this:

start /separate "process security warning" \\MyPrintserver\WindowsSecurityInstallYes.exe

Hmmm. :unsure:
http://ss64.com/nt/start.html

Options for 16-bit WINDOWS programs only

/SEPARATE Start in separate memory space (more robust)
/SHARED Start in shared memory space (default)


I would try with a simpler:

START "process security warning" \\MyPrintserver\WindowsSecurityInstallYes.exe

and then try with:

START "process security warning" /MIN \\MyPrintserver\WindowsSecurityInstallYes.exe



Indeed the missing piece of the puzzle was to start the autoit script in a different process, so the rest of the batch file still runs. Thank you all, everything now works.


jaclaz



#17
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,018 posts
  • OS:none specified
  • Country: Country Flag

Indeed the missing piece of the puzzle was to start the autoit script in a different process, so the rest of the batch file still runs. Thank you all, everything now works.

:thumbup

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN