I am trying to install aprinter using a batch file.
I have created an application with source files, the source folder contains an install.cmd file and a Driver folder
I am testing the deployment but th eprinter doesn't install, the app returns an exit code 0
If i go to ccmcache, and run install.cmd manually, the printer installs correctly
The script:
@ECHO OFF
REM Create Port
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\Prnport.vbs" -a -r IP_10.138.150.201 -h 10.138.150.201 -o raw -n 9100
REM Install Driver
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\Prndrvr.vbs" -a -m "FX DocuCentre-V C2263 PCL 6" -i "%cd%\Drivers\FX6MBAL.inf"
REM Create Printer
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -a -p "FX DocuCentre-V C2263" -m "FX DocuCentre-V C2263 PCL 6" -r IP_10.138.150.201
EXIT
The logs:
+++ Starting Install enforcement for App DT "DocuCentre-V C2263 KL" ApplicationDeliveryType - ScopeId_9AF1E361-B7E7-4EBC-A34A-D39075D479DF/DeploymentType_4b115bbe-29e9-4028-ae5a-05c363203d70, Revision - 3, ContentPath - C:\windows\ccmcache\b,
Execution Context - System
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
Performing detection of app deployment type DocuCentre-V C2263 KL(ScopeId_9AF1E361-B7E7-4EBC-A34A-D39075D479DF/DeploymentType_4b115bbe-29e9-4028-ae5a-05c363203d70, revision 3) for system.
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
+++ Application not discovered. [AppDT Id: ScopeId_9AF1E361-B7E7-4EBC-A34A-D39075D479DF/DeploymentType_4b115bbe-29e9-4028-ae5a-05c363203d70, Revision: 3]
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
App enforcement environment:
Context: Machine
Command line: "install.cmd"
Allow user interaction: No
UI mode: 0
User token: null
Session Id: 1
Content path: C:\windows\ccmcache\b
Working directory:
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
Prepared working directory: C:\windows\ccmcache\b
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
Prepared command line: "C:\windows\ccmcache\b\install.cmd"
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
Executing Command line: "C:\windows\ccmcache\b\install.cmd" with user context
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
Working directory C:\windows\ccmcache\b
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
Post install behavior is BasedOnExitCode
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
Waiting for process 27308 to finish. Timeout = 120 minutes.
AppEnforce
9/19/2018 12:54:03 PM
11688 (0x2DA8)
Process 27308 terminated with exitcode: 0
AppEnforce
9/19/2018 12:54:05 PM
11688 (0x2DA8)
Looking for exit code 0 in exit codes table...
AppEnforce
9/19/2018 12:54:05 PM
11688 (0x2DA8)
Matched exit code 0 to a Success entry in exit codes table.
AppEnforce
9/19/2018 12:54:05 PM
11688 (0x2DA8)
Performing detection of app deployment type DocuCentre-V C2263 KL(ScopeId_9AF1E361-B7E7-4EBC-A34A-D39075D479DF/DeploymentType_4b115bbe-29e9-4028-ae5a-05c363203d70, revision 3) for system.
AppEnforce
9/19/2018 12:54:05 PM
11688 (0x2DA8)
+++ Application not discovered. [AppDT Id: ScopeId_9AF1E361-B7E7-4EBC-A34A-D39075D479DF/DeploymentType_4b115bbe-29e9-4028-ae5a-05c363203d70, Revision: 3]
AppEnforce
9/19/2018 12:54:05 PM
11688 (0x2DA8)
++++++ App enforcement completed (1 seconds) for App DT "DocuCentre-V C2263 KL" [ScopeId_9AF1E361-B7E7-4EBC-A34A-D39075D479DF/DeploymentType_4b115bbe-29e9-4028-ae5a-05c363203d70], Revision: 3, User SID: ] ++++++
AppEnforce
9/19/2018 12:54:05 PM
11688 (0x2DA8)