Because AutoCAD uses absolute paths in the registry and does not rely on environment variables in some places, it is necessary to replace USERNAME in those paths before launching the app when using our recommended Temporary User profiles.  The reason for this is a user may be RemoteUser1 in one session and RemoteUser2 in a different session.




Here is an example of a script for AutoCAD 2018:

$GCF = "$env:LOCALAPPDATA\Autodesk\AutoCAD 2018\R22.0\enu\GraphicsCache\"
$LRF = "$env:LOCALAPPDATA\Autodesk\AutoCAD 2018\R22.0\enu\"
$RRF = "$env:APPDATA\Autodesk\AutoCAD 2018\R22.0\enu\"
$SUP = "$env:APPDATA\Autodesk\AutoCAD 2018\R22.0\enu\support\acad"
$RegKey = "HKCU:\Software\Autodesk\AutoCAD\R22.0\ACAD-1001:409"
$RegKey2 = "HKCU:\Software\Autodesk\AutoCAD\R22.0\ACAD-1001:409\Profiles\<<Unnamed Profile>>\General Configuration"


Set-ItemProperty -Path $RegKey -Name "GraphicsCacheFolder" -Value $GCF -ErrorAction SilentlyContinue
Set-ItemProperty -Path $RegKey -Name "LocalRootFolder" -Value $LRF -ErrorAction SilentlyContinue
Set-ItemProperty -Path $RegKey -Name "RoamableRootFolder" -Value $RRF -ErrorAction SilentlyContinue
Set-ItemProperty -Path $RegKey2 -Name "MenuFile" -Value $SUP -ErrorAction SilentlyContinue


Start-Process -FilePath "C:\Program Files\Autodesk\AutoCAD 2018\acad.exe" -ArgumentList "/product ACAD /language ""en-US""" -WorkingDirectory "C:\Program Files\Autodesk\AutoCAD 2018\UserDataCache\"


By setting a !LAUNCHER_PS1 PowerTag on the app, AutoCAD will start after the script is run.  For any of the versions below, you can simply copy and paste from the gray box to the PowerTag field on the app page and click Set.


Here is the !LAUNCHER_PS1 PowerTag for AutoCAD 2020:

!LAUNCHER_PS1=$GCF = "$env:APPDATA\Autodesk\AutoCAD 2020\R23.1\enu\GraphicsCache\"^|$LRF = "$env:APPDATA\Autodesk\AutoCAD 2020\R23.1\enu\"^|$RRF = "$env:APPDATA\Autodesk\AutoCAD 2020\R23.1\enu\"^|$SUP = "$env:APPDATA\Autodesk\AutoCAD 2020\R23.1\enu\support\acad"^|$RegKey = "HKCU:\Software\Autodesk\AutoCAD\R23.1\ACAD-3001:409"^|Set-ItemProperty -Path $RegKey -Name "GraphicsCacheFolder" -Value $GCF -ErrorAction SilentlyContinue^|Set-ItemProperty -Path $RegKey -Name "LocalRootFolder" -Value $LRF -ErrorAction SilentlyContinue^|Set-ItemProperty -Path $RegKey -Name "RoamableRootFolder" -Value $RRF -ErrorAction SilentlyContinue^|Start-Process "$env:CAMEYO_CMD" -ArgumentList "$env:CAMEYO_ARGS"


AutoCAD 2022:

!LAUNCHER_PS1=$GCF = "$env:APPDATA\Autodesk\AutoCAD 2022\R24.1\enu\GraphicsCache\"^|$LRF = "$env:APPDATA\Autodesk\AutoCAD 2022\R24.1\enu\"^|$RRF = "$env:APPDATA\Autodesk\AutoCAD 2022\R24.1\enu\"^|$SUP = "$env:APPDATA\Autodesk\AutoCAD 2022\R24.1\enu\support\acad"^|$RegKey = "HKCU:\Software\Autodesk\AutoCAD\R24.1\ACAD-5101:409"^|Set-ItemProperty -Path $RegKey -Name "GraphicsCacheFolder" -Value $GCF -ErrorAction SilentlyContinue^|Set-ItemProperty -Path $RegKey -Name "LocalRootFolder" -Value $LRF -ErrorAction SilentlyContinue^|Set-ItemProperty -Path $RegKey -Name "RoamableRootFolder" -Value $RRF -ErrorAction SilentlyContinue^|Start-Process "$env:CAMEYO_CMD" -ArgumentList "$env:CAMEYO_ARGS"


AutoCAD 2023:

!LAUNCHER_PS1=$GCF = "$env:LOCALAPPDATA\Autodesk\AutoCAD 2023\R24.2\enu\GraphicsCache\"^|$LRF = "$env:LOCALAPPDATA\Autodesk\AutoCAD 2023\R24.2\enu\"^|$RRF = "$env:APPDATA\Autodesk\AutoCAD 2023\R24.2\enu\"^|$SUP = "$env:APPDATA\Autodesk\AutoCAD 2023\R24.2\enu\support\acad"^|$RegKey = "HKCU:\Software\Autodesk\AutoCAD\R24.2\ACAD-6101:409"^|Set-ItemProperty -Path $RegKey -Name "GraphicsCacheFolder" -Value $GCF -ErrorAction SilentlyContinue^|Set-ItemProperty -Path $RegKey -Name "LocalRootFolder" -Value $LRF -ErrorAction SilentlyContinue^|Set-ItemProperty -Path $RegKey -Name "RoamableRootFolder" -Value $RRF -ErrorAction SilentlyContinue^|Start-Process "$env:CAMEYO_CMD" -ArgumentList "$env:CAMEYO_ARGS"