Software deployment - batch script return "installation failed", or find another method for installing
Answers (4)
Not in the least. Itjust means I was happy to allow defaults for that sub-product.
>custom support paths
I don't know what these are - I'm the packager not the user! :-) Your best bet is to find out where that configuration is recorded (i.e. in the registry, in a config XML/INI/whatever) and then add that to the appropriate MST or just build your own MSI/script to add the configuration.
Nope. Find the installer batch file that Autodesk give you. That performs an installation using the MSIs, for which you should create MSTs: installing using the defaults means you get, for example, automatic updates, which you *really* don't want.
Comments:
-
Are you referring to the SCCM text file that comes with it that lists individual packages to install? Directly from that file it says "The following command line will install all components of the deployment. This is the recommended method of advertising Autodesk deployments using SMS or SCCM" and then lists the line I use. Then below that it says "These command lines are recommended only when special conditions or policies prevent use of the single command line method above." lists all of the individual packages. I guess what you're saying is that with the Kace, a "special condition" exists to which the setup.exe doesn't work well?
I'll give this a shot and see if it fixes these deployments all attempting to install on top of each other! - matt1738 8 years ago
>I guess what you're saying is
Not really, no. What I'm saying is, creating transforms against the vendor's MSIs allows you to fine tune the installation and log each part of the installation separately.
Here's a heavily edited version of an Autodesk command file that I use for NavisWorks Freedom. It looks complicated but it's pretty straightforward, really. Basically, you pass a set of up to 4 parameters to the DoInstall "function": Path_to_and_Name_of_MSI, Path_to_and_name_of_MST, Path_to_and_Name_of_Logfile and optionally, Path_to_and_name_of_secondary_transform.
set logfilepath=%windir%\TEMP
:// MSXML 6.0 Parser
:// This product is installed by a separate process:// Microsoft Visual C++ 2008 SP1 Redistributable (x64)
:// This product is installed by a separate process:// Microsoft Visual C++ 2010 SP1 Redistributable (x64)
:// This product is installed by a separate process:// Microsoft Visual C++ 2012 Redistributable (x86)
:// This product is installed by a separate process:// Microsoft Visual C++ 2012 Redistributable (x64)
:// This product is installed by a separate process:// Universal C Runtime (KB3118401)
:// This product is installed by a separate process:// Microsoft Visual C++ 2015 Redistributable (x86)
:// This product is installed by a separate process:// Microsoft Visual C++ 2015 Redistributable (x64)
:// This product is installed by a separate process:// DirectX® Runtime
:// This product is installed by a separate process:// .NET Framework Runtime 4.6
:// This product is installed by a separate process:// .NET Framework Runtime 4.6 Language pack
:// This product is installed by a separate process:// Below, the log file names "proper" are prefixed with a sequence number,
:// simply so that they appear in the log file folder in the order in which they were installed:// Autodesk Material Library 2017
call :DoInstall Img\Content\ADSKMaterials\2017\CM\MaterialLibrary2017, Img\Content\ADSKMaterials\2017\CM\Autodesk_MaterialLibrary2017_15.11.3.0_x64_1.00_DE, 01Autodesk_MaterialLibrary2017_15.11.3.0_x64_1.00_DE:// Autodesk Material Library Base Resolution Image Library 2017
call :DoInstall Img\Content\ADSKMaterials\2017\ILB\BaseImageLibrary2017, Img\Content\ADSKMaterials\2017\ILB\Autodesk_BaseImageLibrary2017_15.11.3.0_x64_1.00_DE, 02Autodesk_BaseImageLibrary2017_15.11.3.0_x64_1.00_DE:// Autodesk Advanced Material Library 2017
call :DoInstall Img\Content\ADSKMaterials\2017\CM_Advanced\AdvancedMaterialLibrary2017, Img\Content\ADSKMaterials\2017\CM_Advanced\Autodesk_AdvancedMaterialLibrary2017_15.11.3.0_x64_1.00_DE, 03Autodesk_AdvancedMaterialLibrary2017_15.11.3.0_x64_1.00_DE:// Autodesk Advanced Material Library Image Library 2017
call :DoInstall Img\Content\ADSKMaterials\2017\AIL\AdvancedImageLibrary2017, Img\Content\ADSKMaterials\2017\AIL\Autodesk_AdvancedImageLibrary2017_15.11.3.0_x64_1.00_DE, 04Autodesk_AdvancedImageLibrary2017_15.11.3.0_x64_1.00_DE:// Autodesk Navisworks Freedom 2017
call :DoInstall Img\x64\NAVFREE\freedom, Img\x64\NAVFREE\Autodesk_NavisworksFreedom2017_14.0.1298.75_x64_1.00_DE, 05Autodesk_NavisworksFreedom2017_14.0.1298.75_x64_1.00_DE, Img\x64\de-de\NAVFREE\freedom:// Autodesk Navisworks Freedom 2017 - Deutsch (German) Language Pack
call :DoInstall Img\x64\de-de\NAVFREE\NAVFREE_LP, Img\x64\NAVFREE\Autodesk_NavisworksFreedom2017_14.0.1298.75_x64_1.00_DE, 06Autodesk_NavisWorksFreedom2017_GermanLanguagePack_14.0.1298.75_x64_1.00_DEif %errorlevel%==0 goto End
echo Installation failed - error %errorlevel% occured:End
exit /b %errorlevel%:// Functions
://
:// DoInstall
:DoInstall
setlocal
set MSI=%~1
set MST=%~2
set logfilename=%~3
set MST2=%~4set logfile=%LOGFILEPATH%\Install_%LOGFILENAME%.LOG
call :StrLen MST2 StringLength
if %StringLength%==0 goto SingleTransform
msiexec /i "%~dp0%MSI%.MSI" TRANSFORMS="%~dp0%MST%.MST;%~dp0%MST2%.MST" /qn /l*v "%LOGFILE%"
goto TestErrorLevel
:SingleTransform
msiexec /i "%~dp0%MSI%.MSI" TRANSFORMS="%~dp0%MST%.MST" /qn /l*v "%LOGFILE%":TestErrorLevel
if %errorlevel%==0 goto function_Success:function_Failed
echo Installation failed - error %errorlevel% occured
goto function_Done:function_Success
echo Installation was successful:function_Done
endlocalexit /b
:// DoInstall end:// StrLen
:StrLen <stringVar> <resultVar>
setlocal EnableDelayedExpansion
set "s=#!%~1!"
set "len=0"
for %%N in (4096 2048 1024 512 256 128 64 32 16 8 4 2 1) do (
if "!s:~%%N,1!" neq "" (
set /a "len+=%%N"
set "s=!s:~%%N!"
)
)
endlocal&if "%~2" neq "" (set %~2=%len%) else echo %len%
exit /b
:// StrLen end
://
:// Functions end:Done
Comments:
-
Interesting! I think I follow this script fairly well. One thing I don't see here... I see MST's for some of the MSI's, but not all of them. Is this a problem? - matt1738 8 years ago
-
We set custom support paths in this deployment. It doesn't appear that these got set when I installed this way. Do you know if that should have been installed, or if maybe I just missed something? - matt1738 8 years ago