/build/static/layout/Breadcrumb_cap_w.png

AutoCAD LT 2008 Activation

Hi all,

I am trying to repackage AutoCAD LT 2008 and am running into some problems with the post-install activation that Autodesk requires.

I have used their Deployment Package wizard to create a network install of the application and I ran through their "multi seat" activation bit.

If I install the software with their shortcut which is a setup.exe "my deploy package.ini" it will run through just fine and activate through the Internet without any user interaction.

However, I am attempting to create a Novell ZEN object to deploy to users which wants me to use the standard .msi / .mst format.

I see that there is an .mst file in the network install directories but installing with that does not enable to auto-activation stuff.

Has anyone else run into this, or knows a bit more about the Autodesk stuff?

Thanks for any help.

0 Comments   [ + ] Show comments

Answers (3)

Posted by: jmcfadyen 16 years ago
5th Degree Black Belt
0
in order for that to work you will need to change the serial number for each computer you install to.

With AutoCAD's previous versions if it is not a network install nor a corporate license you need to have a different serial for each computer you install to.

This is because the Serial Number is used to partially generate the request code you need to supply to autocad to get the unlock code. Each serial can only be used twice unless its corporate.

In order to get around this with a single MSI in the past I have done the following.

Create an XML file similar to this

<Environment>
<Machine Name="xxx" Serial="ABCD-ABCD-ABCD-ABCD" />
<Machine Name="xyz" Serial="DCBA-ABCD-ABCD-ABCD" />
<Machine Name="yyy" Serial="5678-ABCD-ABCD-ABCD" />
<Machine Name="zzz" Serial="1234-ABCD-ABCD-ABCD" />
</Environment>

Then create a custom action which runs and reads the XML matches the machine name of the target platform to a name in the list then replaces the Serial with the serial in the XML lookup file.

If you want more detail let me know.

John
Posted by: SpriteAM 16 years ago
Senior Yellow Belt
0
Hey, thanks for the info!

A couple questions though. I am still learning the packaging/repackaging game here and don't really know anything about Custom Actions. My experiences so far have either been straightforward Novell ZENworks snapshots or Wise Package Studio MSI building/transforms. Nothing too deep however.

How would I go about creating a CA to read and process the .xml file?

And looking at the example you gave, would it be possible to replace the "Machine Name" env variable with a username? Just to avoid any problems in case a user's PC dies and we need to replace it we wouldn't have to worry about re-writing the .xml.

Of course, looking back at your comments about the serial numbers and activations I suppose it wouldn't matter much as by the 2nd time a PC croaked the user would be out of activations.
Posted by: jmcfadyen 16 years ago
5th Degree Black Belt
0
CustomActions can be very complex if you do not understand the InstallationSequences

http://itninja.com/question/how-do-you-roll-out-new-machines?7024

This diagram will give you an rough idea of how the sequences work. Does need some explanation however.

Depending on the tool depends how you add CA's.

In this case a vbs custom is the simplest method to achieve this.

I dont have the actual scripts with me, but this script shows how you can access and manipulate XML with VBS.


' Name : GetActions.vbs
' :
' Description : The script runs executes a series of actions
' :
' Usage : cscript.exe Multi-Install.vbs (to install)
' :
' Log Location : C:\Build\[publisher] [appname] [version] [cr].log
' MSI Logs : C:\Build\[publisher] [appname] [version] [cr] MSI.log
'
' Modifications
' Date Version User Description
' ****************************************************************************
' V1.0 John McFadyen Generated Initial script
' Installpac Pty Ltd
' ****************************************************************************

Option Explicit

Set sobjShell = CreateObject("Wscript.Shell")
Set sobjFSO = CreateObject("Scripting.FileSystemObject")
Set sobjXML = CreateObject("MSXML.DOMDocument")

sobjXML.async = false

sstrPath = Left(Wscript.ScriptFullName,InStrRev(Wscript.ScriptFullName,"\"))
sstrXMLFile = sstrPath & "\Multi-Install.xml"
sstrMSIEXEC = "msiexec.exe"
sstrMSILogpath = "c:\build\"


'-- Check for uninstall argument in the command string
If (Wscript.Arguments.Count = 1) Then
If (UCase(Wscript.Arguments(0)) = "/U") Then
sstrInstType = "Uninstall"
Else
sstrInstType = "Install"
End If
Else
sstrInstType = "Install"
End If

'-- Read the actions XML file
sobjXML.load sstrXMLFile

Set sobjPackage = sobjXML.selectSingleNode("//Package")
sstrPackageName = sobjPackage.GetAttribute("Name")
sstrPackageVendor = sobjPackage.GetAttribute("Vendor")
sstrPackageVersion = sobjPackage.GetAttribute("Version")
sstrPackageCR = sobjPackage.GetAttribute("Cr")
sstrPackageSW = sobjPackage.GetAttribute("Sw")

sstrLogFile = "C:\Build\" & sstrPackageVendor & " " & sstrPackageName & " " &_
sstrPackageVersion & " - " & sstrPackageCR & " " & sstrInstType & ".log"


Set sobjActions = sobjXML.selectSingleNode("//Actions")
For each sobjNode in sobjActions.childNodes
sstrActionName = sobjNode.selectSingleNode("Name").text
sstrActionInstall = sobjNode.selectSingleNode("Install").text
sstrActionTransform = sobjNode.selectSingleNode("Transform").text
sstrActionUninstall = sobjNode.selectSingleNode("Uninstall").text
sstrActionOptions = sobjNode.selectSingleNode("Options").text
sstrActionType = sobjNode.selectSingleNode("Type").text
if sstrInstType = "Install" then
select case ucase(sstrActionType)
case "MSI"
Call RunMSI(sstrActionInstall, "", sstrActionOptions)
case "MST"
Call RunMSI(sstrActionInstall, sstrActionTransform, sstrActionOptions)
case "MSP"
Call RunMSP(sstrActionInstall)
case "EXE"
Call RunEXE(sstrActionInstall, sstrActionUninstall)
end select
else
select case ucase(sstrActionType)
case "MSI"
Call RemoveMSI(sstrActionInstall, "", sstrActionOptions)
case "MST"
Call RemoveMSI(sstrActionInstall, sstrActionTransform, sstrActionOptions)
case "MSP"
Call RemoveMSP(sstrActionInstall)
case "EXE"
Call RunEXE(sstrActionUnistall, sstrActionUninstall)
end select
End If
Next

LogInfo "All actions have been processed, execution complete."

sobjShell.RegWrite sstrRootKey & "Status", sstrInstType & "ed"
WScript.Quit 0

' ------------------------------------------------------------------------------
' Sub: LogInfo
' Inputs: msg
'
' Purpose: Writes %msg% to log
' ------------------------------------------------------------------------------

Sub LogInfo(msg)
Const ForAppending = 8
WScript.Echo msg
Set sobjLogFile = sobjFSO.OpenTextFile(sstrLogFile, ForAppending, True)
sobjLogFile.WriteLine msg
sobjLogFile.Close
Set sobjLogFile = Nothing
End Sub

' ------------------------------------------------------------------------------
' Function: RunMSI
' Inputs: strMSI - Name of MSI can contain spaces
' strMST - Name of MST can contain spaces (optional)
' strOptions - MSI options (usually at least /qb)
'
' Purpose: Executes an MSI / MST with MSI based parameters
' Returns: String with return code interpretation
' ------------------------------------------------------------------------------

function runMSI(strMSI, strMST, strOptions)
on error resume next
err.clear
dim strMSIlog, strCommand, strExecute, strFilename, intRet

strFilename = right((strMSI),len(strMSI) - instrrev((strMSI),"\",-1,1))
strMSIlog = left(strFilename,len(strFilename)-4)
strMSIlog = sstrMSIlogpath & trim(strMSIlog) & ".log"
if strMST = "" then
strCommand = " /l*v " & chr(34) & strMSIlog & chr(34)
else
strCommand = " TRANSFORMS=" & chr(34) & strMST & chr(34) & " /l*v " & chr(34) & strMSIlog & chr(34)
end if

if NOT strOptions = "" then strCommand = strCommand & " " & strOptions
strExecute = "/i " & Chr(34) & strMSI & Chr(34) & strCommand

intRet = sobjShell.Run(sstrMSIEXEC & " " & strExecute ,1,1)
if intRet <> "0" OR intRet <> "3010" then runMSI = SetReturnText(intRet)
LogInfo ("MSIEXEC: " & strExecute & vbcrlf _
& ", result=" & RunMSI)
strOptions = null
end function

' ------------------------------------------------------------------------------
' Function: RemoveMSI
' Inputs: strMSI - Name of MSI can contain spaces
' strOptions - MSI options (usually at least /qb)
' strMST - Name of MST can contain spaces (optional)
'
' Purpose: Executes an MSI / MST with MSI based parameters
' Returns: String with return code interpretation
' ------------------------------------------------------------------------------

function RemoveMSI(strMSI, strMST, strOptions)
on error resume next
err.clear
dim strMSIlog, strCommand, strExecute, strFilename, intRet

strFilename = right((strMSI),len(strMSI) - instrrev((strMSI),"\",-1,1))
strMSIlog = left(strFilename,len(strFilename)-4)
strMSIlog = sstrMSIlogpath & trim(strMSIlog) & "_uninstall.log"
if strMST = "" then
strCommand = " /l*v " & chr(34) & strMSIlog & chr(34)
else
strCommand = " TRANSFORMS=" & chr(34) & strMST & chr(34) & " /l*v " & chr(34) & strMSIlog & chr(34)
end if

if NOT strOptions = "" then strCommand = strCommand & " " & strOptions
strExecute = "/x " & Chr(34) & strMSI & Chr(34) & strCommand

intRet = sobjShell.Run(sstrMSIEXEC & " " & strExecute ,1,1)
if intRet <> "0" OR intRet <> "3010" then removeMSI = SetReturnText(intRet)
LogInfo ("MSIEXEC: " & strExecute & vbcrlf _
& ", result=" & removeMSI)
strOptions = null

end function

' ------------------------------------------------------------------------------
' Function: RunMSP
' Inputs: strMSP - Name of MSP can contain spaces
'
' Purpose: Executes an MSP
' Returns: String with return code interpretation
' ------------------------------------------------------------------------------

function RunMSP(sMSP)
on error resume next
err.clear
dim sMSPlog, strCommand, strExecute, strFilename, intRet

strFilename = right((sMSP),len(sMSP) - instrrev((sMSP),"\",-1,1))
sMSPlog = left(strFilename,len(strFilename)-4)
sMSPlog = strMSIlogpatch & "\" & trim(sMSPlog) & ".log"
strCommand = " ALLUSERS=1 /l*v " & chr(34) & sMSPlog & chr(34) & " /qb- REINSTALL=ALL REINSTALLMODE=omus"
strExecute = "/p " & Chr(34) & sMSP & Chr(34) & strCommand

intRet = sobjShell.Run(sstrMSIEXEC & " " & strExecute ,1,1)
if intRet <> "0" OR intRet <> "3010" then runMSP = SetReturnText(intRet)
LogInfo ("MSIEXEC: " & strExecute & vbcrlf _
& ", result=" & RunMSI)

end function

' ------------------------------------------------------------------------------
' Sub: RunEXE
' Inputs: strEXE - Name of EXE can contain spaces
'
' Purpose: Executes an EXE with associated arguments / options
' ------------------------------------------------------------------------------

sub RunEXE(strEXE, strAction)

if strAction = "" then
intRet = sobjShell.Run(strExe)
else
intRet = sobjShell.Run(strExe & " " & strAction)
end if
if intRet = 0 then
Loginfo("EXEC: " & strExe & ", result=" & intRet)
else
Loginfo("EXEC: " & strExe & ", result=failed")
end if
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ