I am a bit of a scripting newbie in Immy and have been trying to figure out how to silently deploy the Autodesk Design Review application in Immy but have been having a difficult time. First, I found that the document from Autodesk on how to deploy the application silently didn’t have the correct Arguments for the latest version. I was able to find the updated information in their community forum and wrote a script which works on my local computer but when I import the ZIP file with the installer into Immy and attempt to deploy it it fails.
I think my main issue is a lack of understanding where Immy sends and extracts the package to? The last version of the script I tried used the path the ZIP file was listed at in the Immy logs but I’m guessing that isn’t correct:
Define the path to the installer file
$InstallerFile = “C:\Windows\Temp\ImmyBot\6c785c38-8c65-2427-487e-8a7cd1dc8b54.zip”
Define the arguments for the installation command
$Arguments = “–silent --noupdate /language en-us”
Execute the installation command using Start-Process
Start-Process -FilePath $InstallerFile -ArgumentList $Arguments -Wait
Any help would be super appreciated. Thanks in advance.
To clarify, are you declaring $InstallerFile in your code in the script or are you letting the scripting engine take care of that?
Hi,
I was declaring it in my script as I thought Immy needed to know where to run the installer from. The file is a ZIP folder which, if I am understanding the immy documentation correctly, is downloaded to the PC and then extracted automatically so you needed to define the location the ZIP was extracted to for it to work. Guessing that isn’t the correct process but I haven’t been able to find and documentation on the correct process so here I am.
All good - it is outlined here as one of the variables to avoid declaring yourself, because it will simply do it for you:
Scripting Guide | immy.bot
So omitting your first line there might give you better luck (although I can’t tell exactly what your error was).
If you’re wondering where it actually declares it, I’m pretty sure its at the software version creation stage when you upload a zip file:
Here’s what we use and it works. Upload the EXE as a new Package. Create this as a new script and attach to the installation portion of the package. This will also create an icon on the desktop.
$arguments = “/W /q /I setup.ini”
Start-process $installerfile -ArgumentList $arguments
Write-host “Waiting 30 Seconds for software install”
start-sleep -seconds 30
Write-host “Creating Desktop Icon”
Define the Destination
$SourceFilePath = “C:\Program Files (x86)\Autodesk\Autodesk Design Review\DesignReview.exe”
Define the shortcut file location and name
$ShortcutPath = “C:\Users\Public\Desktop\Autodesk Design Review.lnk”
Define the path to the custom icon file (replace with your own icon file)
#$IconPath = “C:\Path\To\Your\CustomIcon.ico”
Create a new WScript.Shell object
$WScriptObj = New-Object -ComObject “WScript.Shell”
Create the shortcut using the specified path
$shortcut = $WScriptObj.CreateShortcut($ShortcutPath)
Set the target path for the shortcut
$shortcut.TargetPath = $SourceFilePath
Set the icon path for the shortcut
#$shortcut.IconLocation = $IconPath
Save the shortcut
$shortcut.Save()