Files
quality_recticel/windows_print_service/QUICK_SETUP_NATIVE.md

187 lines
4.8 KiB
Markdown

# Quality Recticel Print Service - Quick Setup Guide (Native)
Get the Windows print service running in under 3 minutes - **Zero Dependencies!**
## What You Need
✅ Windows 10/11 or Windows Server
✅ Administrator access
✅ Chrome browser
✅ Downloaded service package
## Installation Steps
### 1. Install Native Windows Service (1 minute)
```batch
# Extract service package to any folder
# Right-click install_native_service.bat
# Select "Run as administrator"
install_native_service.bat
```
**Expected Output:**
```
✅ Administrator privileges confirmed
✅ Service directory created
✅ Service files copied successfully
✅ Windows service created successfully
✅ Service started successfully
🌐 Service running on http://localhost:8765
```
### 2. Install Chrome Extension (1 minute)
```
1. Open Chrome → More Tools → Extensions
2. Enable "Developer mode" (top right)
3. Click "Load unpacked"
4. Select the chrome_extension folder
5. Extension installed ✅
```
### 3. Test Everything (30 seconds)
**Test Service:**
- Open browser: http://localhost:8765/health
- Should show: `{"status": "healthy", "service": "Quality Recticel Print Service", "platform": "Windows PowerShell"}`
**Test Printing:**
- Go to Quality Recticel web app
- Open a label for printing
- Click print - should print silently ✅
## Native Advantages
🚀 **No Python Required** - Pure PowerShell implementation
**Instant Install** - No package downloads or dependencies
🛡️ **Enterprise Ready** - Uses only Microsoft components
📦 **Tiny Footprint** - Minimal disk and memory usage
🔧 **Easy Deployment** - Single installer, works everywhere
## Troubleshooting
### ❌ Service Won't Install
```batch
# Check if already installed
sc query QualityRecticelPrintService
# If exists, uninstall first
uninstall_service.bat
# Try installation again
install_native_service.bat
```
### ❌ Service Won't Start
```powershell
# Check PowerShell execution policy
Get-ExecutionPolicy
# Should be RemoteSigned or Unrestricted
# Set if needed (as Administrator)
Set-ExecutionPolicy RemoteSigned -Force
# Check the logs
Get-Content "C:\Program Files\QualityRecticel\PrintService\print_service.log" -Tail 20
# Manual start
sc start QualityRecticelPrintService
```
### ❌ Port Already in Use
```cmd
# Check what's using port 8765
netstat -ano | findstr :8765
# Kill process if needed (find PID from above)
taskkill /PID <process_id> /F
```
### ❌ Chrome Extension Issues
1. Check extension is enabled in chrome://extensions/
2. Test service URL directly: http://localhost:8765/health
3. Check browser console (F12) for errors
4. Verify CORS headers are working
### ❌ Printing Doesn't Work
```bash
# Test printer enumeration
curl http://localhost:8765/printers
# Check Windows print spooler
sc query spooler
# Restart print spooler if needed
sc stop spooler && sc start spooler
```
## Quick Commands
**Service Management:**
```batch
sc start QualityRecticelPrintService # Start
sc stop QualityRecticelPrintService # Stop
sc query QualityRecticelPrintService # Status
sc qc QualityRecticelPrintService # Configuration
```
**Test Endpoints:**
```bash
curl http://localhost:8765/health # Health check
curl http://localhost:8765/printers # List printers
```
**Uninstall:**
```batch
uninstall_service.bat # Complete removal
```
**Log Files:**
```
C:\Program Files\QualityRecticel\PrintService\print_service.log
```
## Advanced Configuration
**Custom Port:**
Edit `print_service.ps1` and change:
```powershell
param([int]$Port = 8765) # Change to desired port
```
**Service Account:**
```batch
# Run service as specific user (optional)
sc config QualityRecticelPrintService obj="domain\username" password="password"
```
## Performance Notes
- **Startup**: ~2 seconds (vs 10+ seconds for Python)
- **Memory**: ~15MB RAM (vs 50MB+ for Python/Flask)
- **CPU**: Minimal background usage
- **Dependencies**: Zero external packages
## Need Help?
1. **Check logs first** - PowerShell errors are detailed
2. **Test step by step** - service → health → printers → printing
3. **Verify PowerShell policy** - execution policy must allow scripts
4. **Contact IT support** with specific error messages
## Success Checklist
- [ ] Installer ran without errors
- [ ] Service shows "RUNNING" status: `sc query QualityRecticelPrintService`
- [ ] Health endpoint responds: http://localhost:8765/health
- [ ] Printers endpoint lists devices: http://localhost:8765/printers
- [ ] Chrome extension loaded and enabled
- [ ] Web app can print labels silently
---
**Success**: Native service running + Extension loaded + Silent printing works
📞 **Support**: Contact Quality Recticel IT with log details if issues persist
**Advantages over Python version:**
🚀 No external dependencies | ⚡ Faster startup | 🛡️ Better security | 📦 Smaller footprint