- Printing from windows to machines
- Вопрос
- Ответы
- Все ответы
- Windows Machine File Copy task
- YAML snippet
- Arguments
- Open source
- I get a system error 53 when using this task. Why?
- Do I need an agent?
- I’m having problems. How can I troubleshoot them?
- I can’t select a default agent pool and I can’t queue my build or release. How do I fix this?
- My NuGet push task is failing with the following error: «Error: unable to get local issuer certificate». How can I fix this?
- I use TFS on-premises and I don’t see some of these features. Why not?
- Introduction to Printing
- Printing (Documents and Printing)
- Desktop App Printing
Printing from windows to machines
Вопрос
WE have a a user that has a laser printer on A windows 7 machine that others in the office can access EXCEPT the one person on a Windows 8 machine. We have tried everything, but cannot get her to print to this printer. Says it cannot be found. What does Windows 8 need to see a printer on a Win 7 workstation. She does have access to network printers and her own.
Ответы
Can you add the printer? What’s the error message you receive?
Please check if the priter has the correct driver for Windows 8.
Niki Han
TechNet Community Support
Все ответы
Can you add the printer? What’s the error message you receive?
Please check if the priter has the correct driver for Windows 8.
Niki Han
TechNet Community Support
cannot get her to print to this printer. Says it cannot be found.
How is it specified? Sounds like a contradiction.
Can you see it using netsh commands? (Or also via PowerShell I suppose. )
Cool. ISE has a PrintManagement module which I just got via Get-Printer.
We have the same kind of problem but a bit different.
Dell Printer (used for years shared on a network) was moved to our Windows 7 machine plugged in via USB. We only use a plain workgroup with no Domain as we also have Macs on the network.
I have Macs using shared printer, a Windows XP using the shared printer, and even Windows 7 under Parallels on the Macs using the shared printer no problem.
I had the lone Windows 8 laptop using the shared printer but then it just stopped working. So I deleted it and now when I try to add it is want credentials and none work. It will not connect to the shared printer on the Windows 7 machine.
I have Windows 7 (which also has a couple shared drives that do work) set for No Homegroup and No Password for sharing — pretty much open as we are behind a Cisco Firewall to the outside. No firewalls on the pcs.
Windows Machine File Copy task
Azure Pipelines | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 — TFS 2015
Use this task to copy application files and other artifacts such as PowerShell scripts and PowerShell-DSC modules that are required to install the application on Windows Machines. It uses RoboCopy, the command-line utility built for fast copying of data.
In Microsoft Team Foundation Server (TFS) 2018 and previous versions, build and release pipelines are called definitions, runs are called builds, service connections are called service endpoints, stages are called environments, and jobs are called phases.
YAML snippet
Arguments
Argument | Description |
---|---|
Source | The path to the files to copy. Can be a local physical path such as c:\files or a UNC path such as \\myserver\fileshare\files . You can use pre-defined system variables such as $(Build.Repository.LocalPath) (the working folder on the agent computer), which makes it easy to specify the location of the build artifacts on the computer that hosts the automation agent. |
Machines | A comma-separated list of machine FQDNs or IP addresses, optionally including the port number. Can be: — The name of an Azure Resource Group. — A comma-delimited list of machine names. Example: dbserver.fabrikam.com, dbserver_int.fabrikam.com:5986,192.168.34:5986 — An output variable from a previous task. |
Admin Login | The username of either a domain or a local administrative account on the target host(s). — Formats such as domain\username, username, and machine-name\username are supported. — UPN formats such as username@domain.com and built-in system accounts such as NT Authority\System are not supported. |
Password | The password for the administrative account specified above. Consider using a secret variable global to the build or release pipeline to hide the password. Example: $(passwordVariable) |
Destination Folder | The folder on the Windows machine(s) to which the files will be copied. Example: C:\FabrikamFibre\Web |
Advanced — Clean Target | Set this option to delete all the files in the destination folder before copying the new files to it. |
Advanced — Copy Files in Parallel | Set this option to copy files to all the target machines in parallel, which can speed up the copying process. |
Advanced — Additional Arguments | Arguments to pass to the RoboCopy process. Example: /min:33553332 /l |
Select Machines By | Depending on how you want to specify the machines in the group when using the Filter Criteria parameter, choose Machine Names or Tags. |
Filter Criteria | Optional. A list of machine names or tag names that identifies the machines that the task will target. The filter criteria can be: — The name of an Azure Resource Group. — An output variable from a previous task. — A comma-delimited list of tag names or machine names. Format when using machine names is a comma-separated list of the machine FQDNs or IP addresses. Specify tag names for a filter as |
Control options | See Control options |
Open source
This task is open source on GitHub. Feedback and contributions are welcome.
I get a system error 53 when using this task. Why?
Typically this occurs when the specified path cannot be located. This may be due to a firewall blocking the necessary ports for file and printer sharing, or an invalid path specification. For more details, see Error 53 on TechNet.
Do I need an agent?
You need at least one agent to run your build or release.
I’m having problems. How can I troubleshoot them?
I can’t select a default agent pool and I can’t queue my build or release. How do I fix this?
My NuGet push task is failing with the following error: «Error: unable to get local issuer certificate». How can I fix this?
This can be fixed by adding a trusted root certificate. You can either add the NODE_EXTRA_CA_CERTS=file environment variable to your build agent, or you can add the NODE.EXTRA.CA.CERTS=file task variable in your pipeline. See Environment variables for more details.
I use TFS on-premises and I don’t see some of these features. Why not?
Some of these features are available only on Azure Pipelines and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.
Introduction to Printing
The Microsoft Windows printing architecture consists of a print spooler and a set of printer drivers. By calling device-independent functions, applications can create print jobs and send them to many devices. This includes laser printers, vector plotters, raster printers, and fax machines.
Printer drivers include a rendering component and a configuration component. The rendering component converts the graphics commands from the application into a data format that the printer uses to render the image on the page. The configuration component contains a user interface component that enables users to control a printer’s selectable options and a program interface that communicates the printer’s configuration and features to an application.
When a Microsoft Win32 GDI application prints, it calls GDI functions in the Win32 API. These functions pass the information to the GDI graphics engine. The GDI graphics engine either spools the drawing instructions as an enhanced metafile (EMF) file or, together with a printer driver, renders a printable image that can be sent to the spooler. Spooler components interpret EMF files, and they can insert page layout information and job control instructions into the data stream. The spooler then sends the data stream to the serial, parallel, or network port driver associated with the target printer’s I/O port. In addition, if printing to an XPS device, the GDI print commands are converted through the GDI to XPS conversion component, and the print job is sent down the XPS print path.
In the XPS print path, printer drivers are based on the XML Paper Specification (XPS). When a Microsoft Win32 XPS application prints, the application calls XPS functions in the XPS Print API. When it prints to queues with XPSDrv printer drivers, the spooler passes the XPS spool file straight to the device for rendering and output. When the XPS file is printed to a GDI device, it is converted to an EMF file through the XPS to GDI Conversion Module. It is then sent through the GDI print path in a manner similar to Win32 GDI applications.
Windows Presentation Foundation (WPF) applications call WPF print support functions to spool XPS documents to the spooler in the XPS spool file format. As when printing from Win32 XPS applications, when the spooler prints to print queues with XPSDrv printer drivers, the spooler passes the spooled file in its original format to the XPSDrv printer driver for rendering and output to the printer. When the spooler prints to printers that have GDI-based, version 3 printer drivers, the spooler sends the data in the XPS spool file format to the GDI Conversion Module for conversion to an EMF file. It then sends the data to the GDI-based printer driver for printing. For more information about these data paths, see Windows Print Path Overview. For more information about XPS, see the XML Paper Specification Overview.
Spooler and driver components are replaceable, so hardware vendors can easily add support for new hardware. For more information about print spooler and driver components, see the following sections:
Support for a new printer usually requires only creating new data files for use with one of the Microsoft-supplied printer drivers. For more information about Microsoft printer drivers, see Printer Driver Overview.
You can customize the behavior of the Microsoft Universal Printer Driver and the Microsoft Postscript Printer Driver. For more information, see Customizing Microsoft’s Printer Drivers. You can also customize the print spooler. For more information, see Customizing Print Spooler Components.
Printing (Documents and Printing)
Windows provides applications with a complete set of functions that allow printing to various devices, such as laser printers, vector plotters, raster printers, and fax machines.
Desktop App Printing
Windows programmers can select from several different technologies to print from their application.
Technology | Description |
---|---|
Print Document Package API | Provides an interface that allows an application to access and manage the print document package. This API is available with Windows 8 and later versions of Windows. |
Print Spooler API | Provides an interface to the print spooler so that applications can manage printers and print jobs. Applications use the Print Spooler API to start, stop, control, and configure print jobs managed by the print spooler whether they use the Print Document Package API or the GDI Print API to print the content. |
Print Ticket API | Provides applications with functions to manage and convert print tickets. |
GDI Print API | Provides applications with a device-independent printing interface.
The GDI Print API is suitable for applications that must run on Windows XP and earlier versions of Windows. |
The following illustration provides a high-level view of how the different printing APIs are related.
The Print Document Package APIs in this section describe the print document package and print preview interfaces that you can use with Windows 8 and later versions of Windows desktop.
For more info about printing from Windows Store apps that are written in JavaScript and HTML, see Printing (Windows Store apps using JavaScript and HTML). For more info about printing from Windows Store apps that are written in C#, Microsoft Visual Basic, or C++ and XAML, see Printing (Windows Store apps using C).
See Win32 and COM for Windows Store apps (printing and documents) for the list of the Desktop App Printing APIs that can also be used in Windows Store apps.