This commit is contained in:
Audrey Aaliyah Jensen 2024-06-06 12:44:32 -05:00
commit a90cb26288
No known key found for this signature in database
430 changed files with 7967 additions and 0 deletions

5
Deploy/Deploy.ps1 Normal file
View File

@ -0,0 +1,5 @@
[CmdletBinding()]
param (
[string]$printer = "SALES"
)
Add-Printer -ConnectionName "\\PS\$printer"

View File

@ -0,0 +1,45 @@
Function Get-CurrentUser {
<#
.SYNOPSIS
Gets the current user
.DESCRIPTION
Gets current logged-on user regardless of context
.EXAMPLE
Get-CurrentUser
.INPUTS
None
.OUTPUTS
System.Object
#>
[CmdletBinding()]
Param()
Begin {}
Process {
Try {
# Get the username of the currently logged in user
$objCS = Get-WmiObject -Class Win32_ComputerSystem
$username = $objCS.UserName
# Check if a user is logged in
if ($username -eq $null) {
Write-Output "No user currently logged in."
}
else {
# Get the SID for the user
$objUser = New-Object System.Security.Principal.NTAccount("$username")
$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
$result = [PSCustomObject]@{
Username = $username
SID = $strSID
}
return $result
}
}
Catch {
Write-Error -Message $PsItem.Exception
return $null
}
}
}

5
Deploy/Remove.ps1 Normal file
View File

@ -0,0 +1,5 @@
[CmdletBinding()]
param (
[string]$printer = "SALES"
)
Remove-Printer -name "\\PS\$printer"

24
Deploy/readme.md Normal file
View File

@ -0,0 +1,24 @@
Deploy scripts for printers
Each script calls Add-Printer & remove-Printer, respectively. Incredibly simple.
## Adding a new printer to Intune
I assume you've uploaded the drivers separately? Good.
Simply add this scripts as a new Win32 app. Call them using the codeblock below. You probably aren't deploying the SALES printer, so replace that with the name of the printer.
Do **NOT** feed the servername, only the printer name. Otherwise Intune will try to deploy \\\PS\\\\\\PS\\Printer
`%SystemRoot%\SysNative\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass .\Deploy.ps1 -printer SALES`
### **Install behavior:** This ***MUST** be set to *User* otherwise the mapping will fail!
**App Category:** Make sure this is set to 'Printing' so users can easily find what they need.
**App Logo:** This repository contains some images that will help identify the printer installs. Also, they look nice.
### Detection Rules
Set **Rules format** to *manually configure detection rules.*
Add a rule of type *Registry* with the following properties:
**Key path:** *HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts*
**Value name:** *\\\PS\[PRINTERNAME]*
**Detection method:** *Value exists*
**Associated with a 32-bit app on 64-bit clients:** *No*
### Dependencies
Add the *SHARP Drivers* app as a dependency so the necessary drivers are installed.
If you're not installing a Sharp printer, then set this to whatever app installs the drivers.

19
Drivers/Detect.ps1 Normal file
View File

@ -0,0 +1,19 @@
$drivers =
"SHARP UD3 PCL6";
foreach($driver in $drivers)
{
$isInstalled = Test-Path -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-3\$driver"
if($isInstalled)
{
continue
}
else {
Write-Output "Failed to detect $driver"
Exit 1
}
}
#No error were thrown, so we assume all is well
Write-Output "Success"
Exit 0

3
Drivers/Install.ps1 Normal file
View File

@ -0,0 +1,3 @@
C:\Windows\system32\pnputil.exe /add-driver ".\PCL6\64bit\sv0emenu.inf" /install
Add-PrinterDriver -name "SHARP UD3 PCL6"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,215 @@
;----------------------------------------------------
;Printer Installation File
;----------------------------------------------------
[Version]
Signature="$Windows NT$"
Provider=%oem%
;LayoutFile=LAYOUT.INF
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer
Catalogfile=SV0EJENU.CAT
DriverVer=09/17/2021,03.01.00.58
[Manufacturer]
%oem%=SHARP,NTx86
[SHARP]
%Model1%=DRV,LPTENUM\SHARPUniversalPrinterDriver3_PCL6
[SHARP.NTx86]
%Model1%=DRV,LPTENUM\SHARPUniversalPrinterDriver3_PCL6
[DRV]
CopyFiles=Driver_File,Info_File
DataSection=Data_File
[Data_File]
DriverFile=SV0E2DRV.DLL
ConfigFile=SV0EU.DLL
DataFile=SV0EJ_DV.DAT
;HelpFile=SV0EDRV.CHM
[Driver_File]
;IHM Modules
SV0EGC.DLL
SV0EGCP.DLL
SV0EGCP.DAT
SV0EGCT1.DAT
SV0ETAB.EXE
SV0EGC.DAT
;Image Plugin
SV0E2CMM.DLL
SV0E2C32.DLL
SV0E2BIM.DLL
;UI Modules
SV0EU.DLL
SV0EU.DAT
SV0EUTC.DLL
SV0EUBR.DLL
SV0EUD.DLL
SV0EUN.DLL
SV0EUP.DLL
SV0EUP.EXE
SV0EUP2.DLL
SV0EUP29.DLL
SV0EUPV7.DLL
SV0EUR.DLL
SV0EURB.DLL
SV0EUPDUR.DLL
SV0ECOMM.DLL
SV0EUSR.DLL
SV0EUSR1.DLL
SV0EUSR2.DLL
SV0EUSR3.DLL
SV0EUSR4.DLL
SV0EUSR5.DLL
SV0EUSR6.DLL
SV0EUSR7.DLL
SV0EUSR8.DLL
SV0EUSR9.DLL
SV0EUSRA.DLL
SV0EUSRB.DLL
SV0EUSRC.DLL
SV0EUSRD.DLL
SV0EUSRE.DLL
SV0EUD63.MCF
SV0EJ_DV.DAT
SV0EFT61.DAT
SV0EPI61.DAT
SV0EWM61.DAT
SV0E_RLV.DAT
SV0ELM61.TBL
SV0ESSO.DLL
SV0EUPS.EXE
;Auto Config Modules
SV0EADRV.DLL
SV0ENSRV.DLL
SV0EACFM.EXE
SV0ESWMD.EXE
;Help
;SV0EDRV.CHM
;SV0EHID.DAT
;Core Modules(please specify if changed)
SV0E2DRV.DLL
SV0E2USR.DLL
SV0EUC.DLL
SV0ETA.BIN
SV0ESPDF.DAT
SV0EHLPR.EXE
;EcoDLL
SV0EECO.dll
SV0EECOS.dll
SV0EECOR.dll
SV0EECO.exe
[Info_File]
;UI Modules
SV0EUD63.MCF
[DestinationDirs]
DefaultDestDir=66000
Info_File=66002
[SourceDisksNames]
100=%CD-ROM%,,,
[SourceDisksFiles]
;IHM Modules
SV0EGC.DLL=100
SV0EGCP.DLL=100
SV0EGCP.DAT=100
SV0EGCT1.DAT=100
SV0EGC.DAT=100
SV0ETAB.EXE=100
;Image Plugin
SV0E2CMM.DLL=100
SV0E2C32.DLL=100
SV0E2BIM.DLL=100
;UI Modules
SV0EU.DLL=100
SV0EU.DAT=100
SV0EUTC.DLL=100
SV0EUBR.DLL=100
SV0EUD.DLL=100
SV0EUN.DLL=100
SV0EUP.DLL=100
SV0EUP.EXE=100
SV0EUP2.DLL=100
SV0EUP29.DLL=100
SV0EUPV7.DLL=100
SV0EUR.DLL=100
SV0EURB.DLL=100
SV0EUPDUR.DLL=100
SV0ECOMM.DLL=100
SV0EUSR.DLL=100
SV0EUSR1.DLL=100
SV0EUSR2.DLL=100
SV0EUSR3.DLL=100
SV0EUSR4.DLL=100
SV0EUSR5.DLL=100
SV0EUSR6.DLL=100
SV0EUSR7.DLL=100
SV0EUSR8.DLL=100
SV0EUSR9.DLL=100
SV0EUSRA.DLL=100
SV0EUSRB.DLL=100
SV0EUSRC.DLL=100
SV0EUSRD.DLL=100
SV0EUSRE.DLL=100
SV0EUD63.MCF=100
SV0EJ_DV.DAT=100
SV0EFT61.DAT=100
SV0EPI61.DAT=100
SV0EWM61.DAT=100
SV0E_RLV.DAT=100
SV0ELM61.TBL=100
SV0ESSO.DLL=100
SV0EUPS.EXE=100
;Auto Config Modules
SV0EADRV.DLL=100
SV0ENSRV.DLL=100
SV0EACFM.EXE=100
SV0ESWMD.EXE=100
;Help
;SV0EDRV.CHM=100
;SV0EHID.DAT=100
;Core Modules(please specify)
SV0E2DRV.DLL=100
SV0E2USR.DLL=100
SV0EUC.DLL=100
SV0ESPDF.DAT=100
SV0ETA.BIN=100
SV0EHLPR.EXE=100
;EcoDLL
SV0EECO.dll=100
SV0EECOS.dll=100
SV0EECOR.dll=100
SV0EECO.exe=100
[PrinterPackageInstallation.x86]
PackageAware=TRUE
[Strings]
oem="SHARP"
Model1="SHARP UD3 PCL6"
CD-ROM="SHARP Printer Driver CD-ROM"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,219 @@
;----------------------------------------------------
;Printer Installation File
;----------------------------------------------------
[Version]
Signature="$Windows NT$"
Provider=%oem%
;LayoutFile=LAYOUT.INF
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer
Catalogfile=SV0EMENU.CAT
DriverVer=09/17/2021,03.01.00.58
[Manufacturer]
%oem%=SHARP,NTamd64
[SHARP]
%Model1%=DRV,LPTENUM\SHARPUniversalPrinterDriver3_PCL6
[SHARP.NTamd64]
%Model1%=DRV,LPTENUM\SHARPUniversalPrinterDriver3_PCL6
[DRV]
CopyFiles=Driver_File,Info_File
DataSection=Data_File
[DRV.NTamd64]
CopyFiles=Driver_File,Info_File
DataSection=Data_File
[Data_File]
DriverFile=SV0E2DRV.DLL
ConfigFile=SV0EU.DLL
DataFile=SV0EJ_DV.DAT
;HelpFile=SV0EDRV.CHM
[Driver_File]
;IHM Modules
SV0EGC.DLL
SV0EGCP.DLL
SV0EGCP.DAT
SV0EGCT1.DAT
SV0ETAB.EXE
SV0EGC.DAT
;Image Plugin
SV0E2CMM.DLL
SV0E2C32.DLL
SV0E2BIM.DLL
;UI Modules
SV0EU.DLL
SV0EU.DAT
SV0EUTC.DLL
SV0EUBR.DLL
SV0EUD.DLL
SV0EUN.DLL
SV0EUP.DLL
SV0EUP.EXE
SV0EUP2.DLL
SV0EUP29.DLL
SV0EUPV7.DLL
SV0EUR.DLL
SV0EURB.DLL
SV0EUPDUR.DLL
SV0ECOMM.DLL
SV0EUSR.DLL
SV0EUSR1.DLL
SV0EUSR2.DLL
SV0EUSR3.DLL
SV0EUSR4.DLL
SV0EUSR5.DLL
SV0EUSR6.DLL
SV0EUSR7.DLL
SV0EUSR8.DLL
SV0EUSR9.DLL
SV0EUSRA.DLL
SV0EUSRB.DLL
SV0EUSRC.DLL
SV0EUSRD.DLL
SV0EUSRE.DLL
SV0EUD63.MCF
SV0EJ_DV.DAT
SV0EFT61.DAT
SV0EPI61.DAT
SV0EWM61.DAT
SV0E_RLV.DAT
SV0ELM61.TBL
SV0ESSO.DLL
SV0EUPS.EXE
;Auto Config Modules
SV0EADRV.DLL
SV0ENSRV.DLL
SV0EACFM.EXE
SV0ESWMD.EXE
;Help
;SV0EDRV.CHM
;SV0EHID.DAT
;Core Modules(please specify if changed)
SV0E2DRV.DLL
SV0E2USR.DLL
SV0EUC.DLL
SV0ETA.BIN
SV0ESPDF.DAT
SV0EHLPR.EXE
;EcoDLL
SV0EECO.dll
SV0EECOS.dll
SV0EECOR.dll
SV0EECO.exe
[Info_File]
;UI Modules
SV0EUD63.MCF
[DestinationDirs]
DefaultDestDir=66000
Info_File=66002
[SourceDisksNames]
100=%CD-ROM%,,,
[SourceDisksFiles]
;IHM Modules
SV0EGC.DLL=100
SV0EGCP.DLL=100
SV0EGCP.DAT=100
SV0EGCT1.DAT=100
SV0EGC.DAT=100
SV0ETAB.EXE=100
;Image Plugin
SV0E2CMM.DLL=100
SV0E2C32.DLL=100
SV0E2BIM.DLL=100
;UI Modules
SV0EU.DLL=100
SV0EU.DAT=100
SV0EUTC.DLL=100
SV0EUBR.DLL=100
SV0EUD.DLL=100
SV0EUN.DLL=100
SV0EUP.DLL=100
SV0EUP.EXE=100
SV0EUP2.DLL=100
SV0EUP29.DLL=100
SV0EUPV7.DLL=100
SV0EUR.DLL=100
SV0EURB.DLL=100
SV0EUPDUR.DLL=100
SV0ECOMM.DLL=100
SV0EUSR.DLL=100
SV0EUSR1.DLL=100
SV0EUSR2.DLL=100
SV0EUSR3.DLL=100
SV0EUSR4.DLL=100
SV0EUSR5.DLL=100
SV0EUSR6.DLL=100
SV0EUSR7.DLL=100
SV0EUSR8.DLL=100
SV0EUSR9.DLL=100
SV0EUSRA.DLL=100
SV0EUSRB.DLL=100
SV0EUSRC.DLL=100
SV0EUSRD.DLL=100
SV0EUSRE.DLL=100
SV0EUD63.MCF=100
SV0EJ_DV.DAT=100
SV0EFT61.DAT=100
SV0EPI61.DAT=100
SV0EWM61.DAT=100
SV0E_RLV.DAT=100
SV0ELM61.TBL=100
SV0ESSO.DLL=100
SV0EUPS.EXE=100
;Auto Config Modules
SV0EADRV.DLL=100
SV0ENSRV.DLL=100
SV0EACFM.EXE=100
SV0ESWMD.EXE=100
;Help
;SV0EDRV.CHM=100
;SV0EHID.DAT=100
;Core Modules(please specify)
SV0E2DRV.DLL=100
SV0E2USR.DLL=100
SV0EUC.DLL=100
SV0ESPDF.DAT=100
SV0ETA.BIN=100
SV0EHLPR.EXE=100
;EcoDLL
SV0EECO.dll=100
SV0EECOS.dll=100
SV0EECOR.dll=100
SV0EECO.exe=100
[PrinterPackageInstallation.amd64]
PackageAware=TRUE
[Strings]
oem="SHARP"
Model1="SHARP UD3 PCL6"
CD-ROM="SHARP Printer Driver CD-ROM"

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More