• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
clivebuckwheat

Urgent help needed installing a pesky Xerox DocuColor 242 Unattended

17 posts in this topic

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"

Screen%20Shot%202012-08-25%20at%2012.38.11%20PM.jpg]

Edited by clivebuckwheat
0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

Nircmd can click ok?

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

jaclaz

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

How would I do it with autoit?

Some suitable examples can be found here:

http://www.coretechnologies.com/products/AlwaysUp/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

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

My Windows Security Script

Use this:

http://www.coretechnologies.com/products/AlwaysUp/AutoIt/SendEnterKeyToWindow.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

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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.autoitscript.com/autoit3/docs/functions/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

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.