I'm having trouble with a silent installation script for printers on Windows 10 1709.
We have an installation script that does the following.
Make a connection with the printserver via net use.
Import Point-To-Point registry file
Install the printers
Remove Point-To-Point registry keys and values
This works fine for our Server 2008 computers. I have to do the same trick for Windows 10 1709 computers. Only with a few (not all) printers, i get the following error.
When i install the printer by hand, it works fine. I get a popup that says i have to trust the printer. When i click on install drivers, it installs the printer. It just wont silently install.
Here are the installation scripts.
Install:
echo "Import Point And Print Settings"
reg import PointAndPrint.reg
REM Aanmelden Print Server
net use \\print01\IPC$ /USER:**** *******
echo "Install Printer Drivers"
rundll32 printui.dll PrintUIEntry /in /q /n\\print01\HPLJ-M201n-WSN-Timmerwerkplts
rundll32 printui.dll PrintUIEntry /in /q /n\\print01\Zebra-DIV-VS
rundll32 printui.dll PrintUIEntry /in /q /n\\print01\HPLJ-M127fn-CJG_WSN
rundll32 printui.dll PrintUIEntry /in /q /n\\print01\B8065-Fractiekamer
rundll32 printui.dll PrintUIEntry /in /q /n\\print01\BrotherQL720NW
rundll32 printui.dll PrintUIEntry /in /q /n\\print01\MP2401-GKW-PLOTTER
echo "Import Point and Print"
reg import RemovePointAndPrint.reg
Registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint]
"Restricted"=dword:00000001
"TrustedServers"=dword:00000001
"ServerList"="PRINT01;PRINT01.domain.local"
"InForest"=dword:00000001
"NoWarningNoElevationOnInstall"=dword:00000001
"UpdatePromptSettings"=dword:00000002
I used Procmon to see what happended when you "Trust the printserver" if you manually installed it.
This registry setting was set:
[HKEY_CURRENT_USER\Printers\LegacyPointAndPrint]
"DisableLegacyPointAndPrintAdminSecurityWarning"=dword:00000001
Related
I am trying to add a network printer via batch file, provided I feed the data(Printer IP, Printer Name, Computer IP) into the entries.
rundll32 printui.dll,PrintUIEntry /if /b "KONICA MINOLTA C451 PS(P)" /c\\%computerNameIP% /h "x86" /f %windir%\inf\prnkm002.inf /r "IP_%computerNameIP%" /m "KONICA MINOLTA C451 PS(P)" /n\\%computerNameIP%\%printerName% /F %windir%\inf\prnkm002.inf
Now, once this command is completed, I receive the following error:
Operation could not be completed(error 0x00000032). This operation is not supported.
I ran a similar code with runs the GUI:
rundll32 printui.dll,PrintUIEntry /il /b "KONICA MINOLTA C451 PS(P)" /c\\%computerNameIP% /h "x86" /f %windir%\inf\prnkm002.inf /r "IP_%computerNameIP%" /m "KONICA MINOLTA C451 PS(P)" /n\\%computerNameIP% \%printerName% /F %windir%\inf\prnkm002.inf
and I have to choose a local local Printer: which I adjust to be TCP/IP and the drivers come default since I set it. After choosing my driver, I receive the error as well.
I just can't pinpoint what exactly isn't supported.
Windows 7 32-bit. I made adjustments to the registry, print management, group policy, but none of those seem concrete to what is preventing a remote add to a network printer.
I found another way to do it with the prncnfg.vbs files. First create the port, assign it, then manage it.
This is all located in the admin scripts in Windows folder
I've written an installer that sets a NUL: port and installs a printer driver and then installs the printer. However, when I run it under an admin account, the printer is always set as the default printer.
How can I stop that from happening?
Here's the code that sets the printer:
ReadRegStr $3 HKLM "SYSTEM\CurrentControlSet\Control\Print\Printers\$DisplayName" "Name"
${If} ${Errors}
ExecWait '$SYSDIR\rundll32.exe printui.dll,PrintUIEntry /if /r "$PrinterPort" /b "$DisplayName" /z /Gw /f "$DriverPath" /m "$DriverModel"'
${EndIf}
I don't have a good answer for this. This blog post documents /y as the switch to set the default printer but I don't see a switch to prevent changes to the default printer. You could try /-y or /y- but I really doubt those are supported.
You can read the Device value under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows to get the current default and then use RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "$SavedPrinterName" to restore it when you are done but that is a bit of a hack and would only affect the current user.
If you are a hardware manufacturer you can probably ask Microsoft support for a official answer...
In the help of printui.dll,PrintUIEntry /?, we have the following examples for remotely installing printer driver with the help of /c switch.
Add printer driver using inf:
rundll32 printui.dll,PrintUIEntry /ia /c\\machine /m "Brother DCP-128C" /h "x86" /v "Type 3 - User Mode" /f c:\infpath\infFile.inf
Add printer driver using inf:
rundll32 printui.dll,PrintUIEntry /ia /K /c\\machine /m "Brother DCP-128C" /h "x86" /v 3
I am failing in getting this to work with an error code of 0x32 (This function is not supported). I am doing the following :
Using "net use" to create a connection to the remote server using the remote server's admin credentials.
Disabling the UAC in the remote machine.
Running the above command with and without /K.
I can see that it is copying the driver files into the remote machines "print$" folder but the remote installation finally fails with an error prompt with error code of 0x32.
Is there a way or a specific condition to make this thing work ? Because it is mentioned as an example in the help documentation, I think that I might be missing something.
Are there any other ways to achieve the desired task?
I am working on a Virtual Printer and I'm stuck at printer installation. Installation is made by InnoSetup
[run] Filename : rundll32.exe; Parameters: "printui.dll, PrintUIEntry /if /f ""{app}\ghostscript\ghostpdf.inf"" /r ""TitusVirtualPrinter:"" /m ""Ghostscript PDF"" /b ""Virtual Printer"" /u /Y "; StatusMsg: Installing PS Printer for Ghostscript; Description: Ghostscript PS Printer; Flags: waituntilterminated shellexec;
That line works perfectly and the program installs on Windows 7 systems (Pro 32&64bits) but not in Windows 8. I don't have any error message.
could it be the same as this:
http://www.jenovarain.com/2012/12/ghostscript-printer-on-windows-8-64-bit/
perhaps they key information in that article relating to your problem is
you will want to select option #7 “Disable Driver Signature
Enforcement”
I want to install the DirectX 9c user package in quiet mode. Is there any option like /quiet /q /qb etc.
None of these worked.
Note:
With this file DXSETUP.exe /q
not the extractor file directx_9c_redist.exe /q ( this works fine.)
Try this (taken from MSDN):
Set up silently.
Launch setup in silent mode so that users do not accidentally skip
updating the DirectX runtime. You can
do this by launching dxsetup.exe with
the following command:
path-to-redistributable\dxsetup.exe
/silent
or by calling DirectSetup and not showing any UI.
If you are using DX11 installer from here:
https://www.microsoft.com/en-in/download/details.aspx?id=35
/silent will result in an error. You need to use /Q
Yeah,
it works fine as you launch the DXSETUP.exe in the windows command prompt (>cmd).
If I give it something like this:
>call "C:\Users\John\Desktop\DirectX_11\DXSETUP.exe" /silent