Installation & Licensing
Welcome to Autodesk’s Installation and Licensing Forums. Share your knowledge, ask questions, and explore popular Download, Installation, and Licensing topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

deploying adsklicensingsupporttool via SCCM

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
elwyn.williams
1870 Views, 11 Replies

deploying adsklicensingsupporttool via SCCM

Hi, we're switching to User licensing and wish to automate the configuration for our users.

Has anyone tried deploying the adsklicensingsupporttool via SCCM and willing to share how?

11 REPLIES 11
Message 2 of 12

I use PSADT to deploy this to computers via SCCM, important parts of script below, Place the Tools .zip file in Files folder

[CmdletBinding()]
Param (
[Parameter(Mandatory=$false)]
[ValidateSet('Install')]
[string]$DeploymentType = 'Install',
[Parameter(Mandatory=$false)]
[ValidateSet('Interactive','Silent','NonInteractive')]
[string]$DeployMode = 'Silent',
[Parameter(Mandatory=$false)]
[switch]$AllowRebootPassThru = $false,
[Parameter(Mandatory=$false)]
[switch]$TerminalServerMode = $false,
[Parameter(Mandatory=$false)]
[switch]$DisableLogging = $true,
[Parameter(Mandatory=$false)]
[switch]$InstallLang = $false,
[Parameter(Mandatory=$false)]
[ValidateSet('USER','NETWORK','STANDALONE','NONE')]
[string]$Mode = 'USER'
)


If ($deploymentType -ieq 'Install') {

if(!(test-path $dirFiles\AdskLicensingSupportTool)){
Expand-Archive "$dirFiles\AdskLicensingSupportTool-1.1.0.116-win.zip" -DestinationPath "$dirFiles" -Force
}

$Util = "$dirFiles\AdskLicensingSupportTool\AdskLicensingSupportTool.exe"


switch ($mode)
{
'USER' {Execute-Process -Path $Util -Parameters '-r ALL:USER';Set-Env ;break}
'NETWORK' {Execute-Process -Path $Util -Parameters '-r ALL:NETWORK';Set-Env add;break}
'STANDALONE' {Execute-Process -Path $Util -Parameters '-r ALL:STANDALONE';Set-Env ;break}
'NONE' {Execute-Process -Path $Util -Parameters '-r ALL:NONE';Set-Env ;break}
Default {Execute-Process -Path $Util -Parameters '-r ALL:NONE';Set-Env}
}

Exit-Script -ExitCode $mainExitCode
}
}
Catch {
[int32]$mainExitCode = 60001
[string]$mainErrorMessage = "$(Resolve-Error)"
Write-Log -Message $mainErrorMessage -Severity 3 -Source $deployAppScriptFriendlyName
Show-DialogBox -Text $mainErrorMessage -Icon 'Stop'
Exit-Script -ExitCode $mainExitCode
}

 

I deploy this under package model - Deploy Application.ps1 is saved as ACAD_LicSwitch.ps1

Program:
Deploy-Application.exe ACAD_LicSwitch.ps1 -Mode USER


Message 3 of 12

Sorry, missed out the bit to set Network Licence.... and unable to edit original post!!!!

I use PSADT to deploy this to computers via SCCM, important parts of script below, Place the Tools .zip file in Files folder

[CmdletBinding()]
Param (
[Parameter(Mandatory=$false)]
[ValidateSet('Install')]
[string]$DeploymentType = 'Install',
[Parameter(Mandatory=$false)]
[ValidateSet('Interactive','Silent','NonInteractive')]
[string]$DeployMode = 'Silent',
[Parameter(Mandatory=$false)]
[switch]$AllowRebootPassThru = $false,
[Parameter(Mandatory=$false)]
[switch]$TerminalServerMode = $false,
[Parameter(Mandatory=$false)]
[switch]$DisableLogging = $true,
[Parameter(Mandatory=$false)]
[switch]$InstallLang = $false,
[Parameter(Mandatory=$false)]
[ValidateSet('USER','NETWORK','STANDALONE','NONE')]
[string]$Mode = 'USER'
)


If ($deploymentType -ieq 'Install') {

if(!(test-path $dirFiles\AdskLicensingSupportTool)){
Expand-Archive "$dirFiles\AdskLicensingSupportTool-1.1.0.116-win.zip" -DestinationPath "$dirFiles" -Force
}

$Util = "$dirFiles\AdskLicensingSupportTool\AdskLicensingSupportTool.exe"

 

function Set-Env ($action)
{
if($action -eq 'add'){
$LicServer = $envCOMPUTERNAME.Substring(0,2)

 

### ** first 2 letters of host name



### ****** HostName of existing FlexNet servers
switch ($LicServer) {
** {$LicServer = "*******";break}
** {$LicServer = "*******";break}
default {$LicServer = "*********"}
}

[scriptblock]$HKCURegistrySettings = {
remove-RegistryKey -Key 'HKCU\Software\FLEXlm License Manager' -Name 'ADSKFLEX_LICENSE_FILE' -SID $UserProfile.SID
}
Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings

[System.Environment]::SetEnvironmentVariable("ADSKFLEX_LICENSE_FILE","@$LicServer",[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('FLEXLM_TIMEOUT',10000000,[System.EnvironmentVariableTarget]::Machine)
} else {
[System.Environment]::SetEnvironmentVariable('ADSKFLEX_LICENSE_FILE',$null,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('FLEXLM_TIMEOUT',$null,[System.EnvironmentVariableTarget]::Machine)
}
}

 

 


switch ($mode)
{
'USER' {Execute-Process -Path $Util -Parameters '-r ALL:USER';Set-Env ;break}
'NETWORK' {Execute-Process -Path $Util -Parameters '-r ALL:NETWORK';Set-Env add;break}
'STANDALONE' {Execute-Process -Path $Util -Parameters '-r ALL:STANDALONE';Set-Env ;break}
'NONE' {Execute-Process -Path $Util -Parameters '-r ALL:NONE';Set-Env ;break}
Default {Execute-Process -Path $Util -Parameters '-r ALL:NONE';Set-Env}
}

Exit-Script -ExitCode $mainExitCode
}
}
Catch {
[int32]$mainExitCode = 60001
[string]$mainErrorMessage = "$(Resolve-Error)"
Write-Log -Message $mainErrorMessage -Severity 3 -Source $deployAppScriptFriendlyName
Show-DialogBox -Text $mainErrorMessage -Icon 'Stop'
Exit-Script -ExitCode $mainExitCode
}

 

I deploy this under package model - Deploy Application.ps1 is saved as ACAD_LicSwitch.ps1

Program:
Deploy-Application.exe ACAD_LicSwitch.ps1 -Mode USER

Message 4 of 12

Thankyou so much Andy, I've only just taken on app deployment duties due to budget constraints so this'll help me so much. I have only a month till our license model changes

Message 5 of 12

worked brilliantly. thankyou so much!

Message 6 of 12

Great code. Would this run as a .BAT file on cmd.exe?
Message 7 of 12

Andy was a completelife saver for this - I did add "Set-ItemProperty -Path "HKLM:\Software\Autodesk" -Name "Userlicence" -Value 1" so that SCCM had something to check it was installed.

the deploy line in SCCM was "Deploy-Application.exe ACAD_LicSwitch.ps1 -Mode USER" and the folder for content deployment like \\server \Applications\Autodesk_LicensingSupportToolkit\Production\AppDeployToolkit\

Message 8 of 12

Hi, you could call the PSADT from a batch file, but if you are using a batch file it would probably be easier to just run the cmd if you are limited to using Batch.
Configure your named user license | Account Management | Autodesk Knowledge Network


So Basically if you have the tool downloaded and extracted, then just run in your Batch File
AdskLicensingSupportTool.exe -r ALL:USER

I assume all products are going to User Licensing mode hence the switch "-r ALL:USER"
Depends on your goal, and the amount of Users and methods you have to deploy this

Message 9 of 12

had a couple of post rollout issues, not sure if you've seen them, a few users now getting a timeout issue a minute after starting AutoCAD. For one, I just restarted the licence service and it's gone away. Others i may need to update/install the certificate installer or update the licence service. haven't had time yet to do testing.

 

And had to manually change licence on the Vehicle Tracking module

Message 10 of 12

🙂

Message 11 of 12

.

Message 12 of 12

Using PSADT
I have the tools zipped "AdskLicensingSupportTool-1.1.0.116-win.zip" under the files folder
The script below unzips before doing the actual work, you could have these tools already unzipped and remove the following, your choice 
if(!(test-path $dirFiles\AdskLicensingSupportTool)){
Expand-Archive "$dirFiles\AdskLicensingSupportTool-1.1.0.116-win.zip" -DestinationPath "$dirFiles" -Force



You will need to wrap this up into an intunewin file after you have tested, before  deploying with intune

Install command would be one of the following, depending on your goal
Deploy-Application.exe -Mode User
Deploy-Application.exe -Mode Network
Deploy-Application.exe -Mode Standalone
Deploy-Application.exe -Mode None

Deploy-Application.ps1 content below

[CmdletBinding()]
Param (
[Parameter(Mandatory=$false)]
[ValidateSet('Install')]
[string]$DeploymentType = 'Install',
[Parameter(Mandatory=$false)]
[ValidateSet('Interactive','Silent','NonInteractive')]
[string]$DeployMode = 'Interactive',
[Parameter(Mandatory=$false)]
[switch]$AllowRebootPassThru = $false,
[Parameter(Mandatory=$false)]
[switch]$TerminalServerMode = $false,
[Parameter(Mandatory=$false)]
[switch]$DisableLogging = $true,
[Parameter(Mandatory=$false)]
[switch]$InstallLang = $false,
[Parameter(Mandatory=$false)]
[ValidateSet('USER','NETWORK','STANDALONE','NONE')]
[string]$Mode = 'USER'
)

Try {
## Set the script execution policy for this process
Try { Set-ExecutionPolicy -ExecutionPolicy 'ByPass' -Scope 'Process' -Force -ErrorAction 'Stop' } Catch {}

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Autodesk'
[string]$appName = 'License Mode Switch'
[string]$appVersion = ''
[string]$appArch = ''
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '29/10/2020'
[string]$appScriptAuthor = 'Beats'
##*===============================================
## Variables: Install Titles (Only set here to override defaults set by the toolkit)
[string]$installName = ''
[string]$installTitle = ''

##* Do not modify section below
#region DoNotModify

## Variables: Exit Code
[int32]$mainExitCode = 0

## Variables: Script
[string]$deployAppScriptFriendlyName = 'Deploy Application'
[version]$deployAppScriptVersion = [version]'3.7.0'
[string]$deployAppScriptDate = '02/13/2018'
[hashtable]$deployAppScriptParameters = $psBoundParameters

## Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent

## Dot source the required App Deploy Toolkit Functions
Try {
[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
}
Catch {
If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: `n$($_.Exception.Message)`n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
## Exit the script, returning the exit code to SCCM
If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
}

#endregion
##* Do not modify section above
##*===============================================
##* END VARIABLE DECLARATION
##*===============================================

If ($deploymentType -ieq 'Install') {

if(!(test-path $dirFiles\AdskLicensingSupportTool)){
Expand-Archive "$dirFiles\AdskLicensingSupportTool-1.1.0.116-win.zip" -DestinationPath "$dirFiles" -Force
}

$Util = "$dirFiles\AdskLicensingSupportTool\AdskLicensingSupportTool.exe"


switch ($mode)
{
'USER' {Execute-Process -Path $Util -Parameters '-r ALL:USER';Set-Env ;break}
'NETWORK' {Execute-Process -Path $Util -Parameters '-r ALL:NETWORK';Set-Env add;break}
'STANDALONE' {Execute-Process -Path $Util -Parameters '-r ALL:STANDALONE';Set-Env ;break}
'NONE' {Execute-Process -Path $Util -Parameters '-r ALL:NONE';Set-Env ;break}
Default {Execute-Process -Path $Util -Parameters '-r ALL:NONE';Set-Env}
}

Exit-Script -ExitCode $mainExitCode
}
}
Catch {
[int32]$mainExitCode = 60001
[string]$mainErrorMessage = "$(Resolve-Error)"
Write-Log -Message $mainErrorMessage -Severity 3 -Source $deployAppScriptFriendlyName
Show-DialogBox -Text $mainErrorMessage -Icon 'Stop'
Exit-Script -ExitCode $mainExitCode
}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Administrator Productivity


Autodesk Design & Make Report