[wpkg-users] Unable to install AutoCAD 2010 via WPKG

Mark Nienberg gmane at tippingmar.com
Fri Apr 16 23:09:35 CEST 2010


On 4/15/2010 4:47 PM, phlee wrote:
>
> Hi,
>
> Has anyone been able to successfully install AutoCAD 2010 via WPKG? I've
> been wrestling with this over the past week or so but I just can't figure it
> out. I created a network deployment of AutoCAD 2010 and copied it to my
> Software share.

The setup.exe file copies material to the local hard drive and then relaunches itself 
from there.  The first instance exits and wpkg thinks the install is finished long 
before it actually is. One solution is to wait until there are no more setup.exe 
files running before you let wpkg do the checks. Here is my package id:

<package id="Acad2010" name="Autodesk AutoCAD 2010" revision="0" priority="20">
	<check type="uninstall" condition="exists" path="AutoCAD 2010 - English" />
	<install cmd="%SOFTWARE%\acad2010\install.cmd" >
		<exit code="0" />
		<exit code="259" />
	</install>	
	<install cmd='cscript %SOFTWARE%\waitfor.vbs Setup.exe' />
	<install cmd='cmd /c copy /y "%SOFTWARE%\license\autodesk\licpath.lic" 
"%PROGRAMFILES%\AutoCAD 2010\"' />
</package>


---------------------------
Here is the witfor.vs script:

' This script takes one argument, the name of a running process.
' This script will terminate when all of the processes with that name terminate.
' It is useful in WPKG deployments where a setup program calls a second copy
' of itself and then stops because it keeps WPKG from stopping too early.
' It was posted to the WPKG mailing list by  Tobias Baumgartner
' (totalbillig @ gmx dot de)

Set objDictionary = CreateObject("Scripting.Dictionary")

If WScript.Arguments.Count <> 1 Then
	WScript.Quit
End If

strProcess = WScript.Arguments.Item(0)
strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Do
    WScript.Sleep 1000
    Set colProcesses = objWMIService.ExecQuery("Select * from Win32_Process Where 
name = '" & strProcess & "'")
Loop Until  colProcesses.Count = 0


-----------------------------------
And here is the install.cmd (careful about line wraps)

@echo off
REM install AutoCAD 2010

REM Detect which achitecture is used
if not "%ProgramFiles(x86)%" == "" goto 64bit

:32bit
echo 32-bit system detected.
%SOFTWARE%\Acad2010\AdminImage\setup.exe /qb /I 
%SOFTWARE%\Acad2010\AdminImage\Acad2010_Networked_32bit.ini /language en-us
REM install SP2 also
%SOFTWARE%\RevitStruct2010\AdminImage\ServicePacks\autodesk_revit_structure_2010-x86_update_2.exe 
/q
goto finish

:64bit
echo 64-bit system detected.
%SOFTWARE%\Acad2010x64\AdminImage\setup.exe /qb /I 
%SOFTWARE%\Acad2010\AdminImage\Acad2010_Networked_64bit.ini /language en-us
REM SP2 is already built into this deployement as a patch
:finish

set EXIT_CODE=%ERRORLEVEL%
exit /B %EXIT_CODE%


-- 
Mark Nienberg
Sent from an invalid address. Please reply to the group.




More information about the wpkg-users mailing list