Run a remote *.cmd from PDQ-deploy
We are deploying Windows clients OS by PXE booting them and then installing the needed applications scripted by executing batch files, that we run locally on new clients - and it works flawless with a success rate of nearly 100%. We do it this way because we started the process before having access to PDQ-deploy.
Now... having PDQ, in some cases, we would like to use PDQ for installing these applikations, and rather than having two different setups, we would like to use PDQ to deploy the programs by running the relevant *.cmd's.
Problem is... while some works out of the box doing this, others fail. Like this one-liner:
"\\wds\Pakker\NAV2009R2DK\setup.exe" /quiet /config \\wds\Pakker\NAV2009R2DK\setup.xml
Works great and fully silent when run locally as a cmd file, but creating a PDQ package running the same cmd fails with error code 2.
I even tried creating package pointing at the setup itself with the same parameters (command line shows setup.exe /quiet /config \\wds\Pakker\NAV2009R2DK\setup.xml) the same happends - results in an error code 2
Another batch file works locally:
xcopy "\\wds\Pakker\Jet Report 2012-2013\fin.flf" "%programfiles%\Microsoft Dynamics NAV\60\Classic" /Y
"\\wds\Pakker\Jet Report 2012-2013\Jet Report til Office 32 Bit\Jet Essentials Setup 12.5.12353.0 (32-bit).exe" /L1030 /s /f1"\\wds\Pakker\Jet
Report 2012-2013\setup.iss" /V /qn
xcopy "\\wds\Pakker\Jet Report 2012-2013\Settings.xml" "%appdata%\Jet Reports\" /Y
xcopy "\\wds\Pakker\Jet Report 2012-2013\Data Sources.xml" "%appdata%\Jet Reports\" /Y
But running from PDQ, only the package is installed - the file copying does not take place.
So to put it short... if your have a perfectly running batchfile - how to perfectly run this in PDQ?
Regards, Lars.
Comments
If an install works when you run it interactively (when you manually run the bat file) but fails when you deploy it then the issue is often permissions and/or access to an interactive desktop.
The Run As option may need to be changed. Make sure you aren't running as Local System. Using Local System would prevent the deployment from successfully accessing network file shares once the installation begins. You will want to Run As Deploy User or Deploy User (Interactive). The Deploy User must have rights to all the referenced network locations (\\wds\Pakker\Jet
Report 2012-2013\setup.iss, \\wds\Pakker\NAV2009R2DK\setup.xml, etc)
I would recommend finding out what error code 2 means from Symantec. This could mean anything from File Not Found, to Fatal Error, etc. Finding out what their error (return) codes mean will help you in troubleshooting.
Is xcopy returning error code 4?
-Shane
Sorry for the late reply.
NAV is not Norton Antivirus, but Microsoft Navision.
It seems as I have managed this thing by this workaround:
http://support.adminarsenal.com/entries/21529507-Installer-returned-error-code-2-when-deploying-Dynamics-NAV-2009?page=1#post_23012664
Havn't been looking into the JetReport part yet.
Regards, Lars.