Deploy Printer Driver through KACE
Hello!
I'm trying to deploy a printer driver through our k1000 system v7.2.101 . I have a batch script that works locally on the computer, but not thorugh scripting deployment in the KACE. Code below
[script]
if not exist "\\files\deptpublic\itshare\software\epson\fx890II\Driver\WINX64\EBSD120B.INF" goto NoShareExist
if exist "C:\Windows\System32\DriverStore\FileRepository\ebsd120b*" goto Success
SET KProgramFiles=%ProgramFiles(x86)%
IF NOT EXIST "%KProgramFiles%" goto Installx86
:Installx64
call pnputil -i -a \\files\deptpublic\itshare\software\epson\fx890II\Driver\WINX64\EBSD120B.INF
@echo %COMPUTERNAME% %USERNAME% %DATE% %TIME%>>"\\files\deptpublic\itshare\software\epson\fx890II\Test.txt"
if exist "C:\Windows\System32\DriverStore\FileRepository\ebsd120b*" goto Success
:Installx86
call pnputil -i -a \\files\deptpublic\itshare\software\epson\fx890II\Driver\WINX86\EBSD120B.INF
@echo %COMPUTERNAME% %USERNAME% %DATE% %TIME%>>"\\files\deptpublic\itshare\software\epson\fx890II\Test.txt"
if exist "C:\Windows\System32\DriverStore\FileRepository\ebsd120b*" goto Success
:NoShareExist
@echo The shared folder no longer exists
@echo Driver --not-- installed
exit /B
:Success
@echo Driver installed correctly
[/script]
I have tried running as local system and logged-in user, since I don't think local system has access to our share drives.Any help is much appreciated. If more information is needed please let me know.
Thanks
EDIT: Sorry I don't know the html tags
4 Comments
[ + ] Show comments
Answers (0)
Please log in to answer
Be the first to answer this question
I'm not sure how the KACE runs scripts. If it copies my script to the local machine and then tries to run it, I'm not sure how to check if it's being copied over.
I setup the script to prompt a message before running, and that pops up.
The way I have it setup is the script writes to a text file while installing. This text file never gets written to. - thedavejohnson 6 years ago
Try:
C:\ProgramData\Dell\KACE\scripts
Or
C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots
They should be stored there. Ours go to the kbots folder and are saved in numbered folders. - wwashington 6 years ago
So it is being copied over correctly. - thedavejohnson 6 years ago
And you said the call pnputil works outside of the KACE environment? Like, if you run it locally, it works.
So, cut down on your scripting. Cut away everything except:
call pnputil -i -a \\files\deptpublic\itshare\software\epson\fx890II\Driver\WINX86\EBSD120B.INF
And then pass that from KACE to the machine and see what happens. If it works, then you know it's your syntax and not KACE. - wwashington 6 years ago
Try that, too, if my above doesn't work. Just do an xcopy to copy this file:
\\files\deptpublic\itshare\software\epson\fx890II\Driver\WINX86\EBSD120B.INF
To the C: of the machine in question then try to execute your call pnputil against c:\whatever instead of the network share. - wwashington 6 years ago
robocopy \\files\deptpublic\itshare\software\Epson C:\EpsonCopy /E
call pnputil -i -a C:\epsoncopy\fx890II\Driver\WINX64\EBSD120B.INF
The files and directories successfully copy but still cannot find driver in C:\system32\driverstore\filerepository\
Is the KACE support the pnputil command? - thedavejohnson 6 years ago
We have a zip file with the inf files in it and a batch on the kace unit that looks like this. We run it as system.
cscript c:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs
-a -r IP_192.168.1.100 -h 192.168.1.100
"%windir%\System32\rundll32.exe" printui.dll,PrintUIEntry /if /b "Copier Name" /r "IP_192.168.22.100" /m "Dell MFP H815dw PS" /f ".\Dell H815dw\DLPGYAL.inf" - khoelle 6 years ago
It also will not be connected via USB when this script is run. I want windows to find the driver in the filerepository when the printer is connected - thedavejohnson 6 years ago
Here is our batch that runs during post install.
echo off&color a && Title [ MULTI .INF INSTALLER ]
::= Multi-PnP.Installer.cmd =
:: Put all Pnf, Infs, Cat, and Sys files etc. in directories inside this one!
:: Run Batch from current directory
cd %~dp0
:: Scan and Echo .inf files duing install
for /f "tokens=* delims=" %%a in ('dir /b /s /o:gen *.inf') do (
echo == Installing PnP Drivers == "%%a"
:: Delay
ping -n 4 localhost 1>nul
:: Windows Plug-n-Play Installer
start "" pnputil -i -a %%a
)
echo * DONE *
exit - khoelle 6 years ago