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

25 次查看(过去 30 天)
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 个评论
mohammad ibrahim
mohammad ibrahim 2021-3-25
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 2023-5-30
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.

请先登录,再进行评论。

回答(1 个)

Sruthi Ayloo
Sruthi Ayloo 2014-7-8
编辑:Sruthi Ayloo 2014-7-8
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 个评论
Dan Dresser
Dan Dresser 2014-7-30
编辑:Dan Dresser 2014-7-30
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 2023-7-25
编辑:Thomas 2023-7-25
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.)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by