Auto-commit: 2025-10-31 08:58:35
This commit is contained in:
30
Printers-install-network/Install.bat
Normal file
30
Printers-install-network/Install.bat
Normal file
@@ -0,0 +1,30 @@
|
||||
REM nom du fichier INF
|
||||
Set FichierINFx64=CNLB0FA64.INF
|
||||
Set FichierINFx86=CNLB0F.INF
|
||||
|
||||
REM nom du drivers <20> utiliser==>faire un copier coller du nom depuis le fichier inf
|
||||
Set NomDrivers=Canon iR1133 UFRII LT
|
||||
|
||||
REM adresse IP de l'imprimante
|
||||
Set AdresseIP=192.168.0.112
|
||||
|
||||
Rem Nom de l'imprimante qui devra etre affiche
|
||||
Set NomImprimante=COPIEUR BE
|
||||
|
||||
|
||||
|
||||
if EXIST c:\Windows\syswow64 goto archix64
|
||||
|
||||
:Archix86
|
||||
cscript %windir%\system32\Printing_Admin_Scripts\fr-fr\prnport.vbs -a -r IP_%AdresseIP% -h %AdresseIP% -o raw -n 9100
|
||||
rundll32 %windir%\system32\printui.dll,PrintUIEntry /if /f "%~dp0x86\%FichierINFx86%" /r "IP_%AdresseIP%" /m "%NomDrivers%" /z /b "%NomImprimante%"
|
||||
goto fin
|
||||
|
||||
:archix64
|
||||
cscript %windir%\system32\Printing_Admin_Scripts\fr-fr\prnport.vbs -a -r IP_%AdresseIP% -h %AdresseIP% -o raw -n 9100
|
||||
rundll32 %windir%\system32\printui.dll,PrintUIEntry /if /f "%~dp0x64\%FichierINFx64%" /r "IP_%AdresseIP%" /m "%NomDrivers%" /z /b "%NomImprimante%"
|
||||
Goto fin
|
||||
|
||||
:fin
|
||||
timeout 10
|
||||
|
||||
35
Printers-install-network/readme.md
Normal file
35
Printers-install-network/readme.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# 🖨️ Automated Printer Installation Script
|
||||
|
||||
## 🔧 What it does
|
||||
This script automates the installation of a **network printer**:
|
||||
- Detects if the system is **x86 or x64**.
|
||||
- Creates a **TCP/IP printer port** with the provided IP address.
|
||||
- Installs the correct **printer driver** (from `.INF` file).
|
||||
- Installs the printer with the specified **friendly name**.
|
||||
|
||||
---
|
||||
|
||||
## ✅ Parameters to edit in the script
|
||||
- `FichierINFx64` → Driver `.INF` file for **64-bit** systems.
|
||||
- `FichierINFx86` → Driver `.INF` file for **32-bit** systems.
|
||||
- `NomDrivers` → Exact driver name (copy/paste from inside the `.INF` file).
|
||||
- `AdresseIP` → Printer IP address.
|
||||
- `NomImprimante` → Friendly name displayed in **Printers & Scanners**.
|
||||
|
||||
Example:
|
||||
```batch
|
||||
Set FichierINFx64=CNLB0FA64.INF
|
||||
Set FichierINFx86=CNLB0F.INF
|
||||
Set NomDrivers=Canon iR1133 UFRII LT
|
||||
Set AdresseIP=192.168.0.112
|
||||
Set NomImprimante=COPIEUR BE
|
||||
```
|
||||
|
||||
## ⚠️ Notes
|
||||
|
||||
- The `.INF` driver files must be stored in:
|
||||
- `.\x64\` → for 64-bit
|
||||
- `.\x86\` → for 32-bit
|
||||
- The driver name must **exactly match** the one inside the `.INF` file, otherwise installation will fail.
|
||||
- Requires **administrator rights**.
|
||||
- After installation, the script waits **10 seconds** before exiting.
|
||||
1827
Printers-install-network/x64/CNLB0FA64.INF
Normal file
1827
Printers-install-network/x64/CNLB0FA64.INF
Normal file
File diff suppressed because it is too large
Load Diff
1438
Printers-install-network/x64/Lisezmoi.hta
Normal file
1438
Printers-install-network/x64/Lisezmoi.hta
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Printers-install-network/x64/cnlb0F.cat
Normal file
BIN
Printers-install-network/x64/cnlb0F.cat
Normal file
Binary file not shown.
BIN
Printers-install-network/x64/ufrii.cab
Normal file
BIN
Printers-install-network/x64/ufrii.cab
Normal file
Binary file not shown.
1877
Printers-install-network/x86/CNLB0F.INF
Normal file
1877
Printers-install-network/x86/CNLB0F.INF
Normal file
File diff suppressed because it is too large
Load Diff
1438
Printers-install-network/x86/Lisezmoi.hta
Normal file
1438
Printers-install-network/x86/Lisezmoi.hta
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Printers-install-network/x86/cnlb0F.cat
Normal file
BIN
Printers-install-network/x86/cnlb0F.cat
Normal file
Binary file not shown.
BIN
Printers-install-network/x86/ufrii.cab
Normal file
BIN
Printers-install-network/x86/ufrii.cab
Normal file
Binary file not shown.
Reference in New Issue
Block a user