How do I change the "Default Installation Folder" in the matlab compiler to %ProgramFiles (x86)%

29 views (last 30 days)
I am using the deploytool to make a standalone executable in Windows. In order to run correctly, I need the executable to be installed in a specific folder in "...\Program Files (x86)\..." rather than "...\Program Files\...".
I am given the options for %ProgramFiles% or %AppData% but cannot find a way to edit the default to something other than one of these two. I would appreciate any help in finding a way to change the default install location to the (x86) folder. Thanks for you help.
  2 Comments
mohammad ibrahim
mohammad ibrahim on 25 Mar 2021
Hello
Now in 2021, can we change the default installation folder ?
actually, if the deployed application copies some file , the application should be installed in a folder where no administrative rights are required. "Program Files" needs usually administrative rights to allow copying files
if we cant change the default installation folder, is there a method to overcome the "administrative rights" issue ?
thanks
Chris Plumlee
Chris Plumlee on 30 May 2023
I agree this is an annoyance. I write manufacturing test programs and install them together in C:\[company name]\[test name] where they can be maintained together with other test programs.

Sign in to comment.

Answers (1)

Sruthi Ayloo
Sruthi Ayloo on 8 Jul 2014
Edited: Sruthi Ayloo on 8 Jul 2014
From MATLAB R2013b onwards, there is no direct way to select a folder you want the executable to be installed. There is a workaround though. For the executable to be installed in Program Files (x86), select %Program Files% as the default installation folder and give the path as:
\..\Program Files (x86)\<executable folder name>\
This navigates to the folder where the Program Files is present. It then selects Program Files(x86) and then the folder where the executable has to be created. The self-extracting executable will respect these settings.
  2 Comments
Dan Dresser
Dan Dresser on 30 Jul 2014
Edited: Dan Dresser on 30 Jul 2014
What about earlier versions of Matlab then? I have 2011b and I'm trying to accomplish exactly this....
EDIT: Matlab and VS2008 are already installed....when I ask Matlab to locate installed compilers it misses VS2008 because it's looking in "...\Program Files\..." when it should be looking in "...\Program Files (x86)\..."
Thanks!
Thomas
Thomas on 25 Jul 2023
Edited: Thomas on 25 Jul 2023
Using \..\ in the deploytool 'Default Installation folder' box to go to any location appears to have stopped working some time after 2019b.
You can now use the compiler.package.installer option 'DefaultInstallationDir' to specify the path directly. (results, ,'C:\XRite\BMSolveEXE')
You can also use createDeploymentScript to convert your existing .prj to a file, and then edit packageOpts.DefaultInstallationDir in the resulting output script. Instead of using '%ProgramFiles%\..\whatever', use '%SystemDrive%\whatever'.
(I am using 2023a.)

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!