Topics: Archive - Deployment Scripts
Dec 23, 2014 at 11:39 AM

New to this, so this could be a really easy answer. I'm looking at deploying AutoCAD using the deployment toolkit. I've tried to use this argument

Execute-Process Install -Path "$dirFiles\IMG\Setup.exe" -Parameters '/W /qb /I Img\setup.ini' -WindowStyle Normal

but am getting the error below
[12-23-2014 12:37:57.642] [Installation] [Execute-Process] :: Function failed, setting exit code to [999].

Error Record:

Message : Exception calling "Start" with "0" argument(s): "The directory name is invalid"
InnerException : System.ComponentModel.Win32Exception (0x80004005): The directory name is invalid
                at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
                at CallSite.Target(Closure , CallSite , Object )
FullyQualifiedErrorId : Win32Exception
ScriptStackTrace : at Execute-Process<Process>, C:\Users\John.R.Taylor\Desktop\AutoCAD 2015 x64\AppDeployToolkit\AppDeployToolkitMain.ps1: line 2263
                    at <ScriptBlock>, C:\Users\John.R.Taylor\Desktop\AutoCAD 2015 x64\Deploy-Application.ps1: line 119
PositionMessage : At C:\Users\John.R.Taylor\Desktop\AutoCAD 2015 x64\AppDeployToolkit\AppDeployToolkitMain.ps1:2263 char:5
              +                 [boolean]$processStarted = $process.Start()
              +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error Inner Exception(s):

Message : The directory name is invalid
InnerException :

Just wondering if someone can point me in the correct direction?
Dec 29, 2014 at 3:39 PM
Is the application source and setup.exe located in the C:\Users\John.R.Taylor\Desktop\AutoCAD 2015 x64\Files\IMG directory?

Might be simpler to place the root of the installation source in the "Files" directory.
May 5, 2015 at 8:46 PM
Since this is around for archival purposes still, I figured I'd mention a workaround. I had the same error.

Instead of using the built in function, I replaced it with Start-Process in the Deploy-Application.ps1 script.
Remember to also replace -Arguments with -ArgumentList as that is the available parameter for Start-Process.

Also, if any admins are still reading these, a couple comments/questions:
  1. Thank you again for a such a powerful tool!
  2. There are certain functions of the forum that I much preferred in this old one, such as layout, ease of response and MOSTLY the ability to subscribe to the RSS so I would receive daily updates in Feedly.
  3. I noticed other methods of login being used on the new PSADT site, but can you also please add MS accounts as an option? It makes sense to me because PowerShell is MS, but those other accounts I don't use (Google+, Instagram, etc.)
Thanks again!