フィルターのクリア

Does a Matlab compiled program require Admin privileges to create folders under Documents folder?

4 ビュー (過去 30 日間)
I am trying to debug a remote installation of an exe that I created using the Matlab compiler. The exe works fine on my machine and the remote system does not have Matlab, so it is difficult to figure out why the exe is not working. I will note that the exe creates a folder under the Windows Documents folder, which it then populates with data files. Is there any chance that Windows requires permissions that the exe lacks in order to modify the Documents folder? Any other general debugging tips on a remote exe installation?
  1 件のコメント
KAE
KAE 2018 年 3 月 8 日
It turned out I had incorrectly formatted a directory creation statement.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2017 年 12 月 22 日
It is unlikely that is the problem, but not impossible.
You should be writing your code with the general form
filename = fullfile(....);
[fid, msg] = fopen(filename, 'w');
if fid < 0
error('Failed to open filename "%s" because: "%s"\n', filename, msg);
end
...
fclose(fid);
If you have a permission problem then that will show up in the msg
  1 件のコメント
KAE
KAE 2017 年 12 月 22 日
編集済み: KAE 2017 年 12 月 22 日
Useful suggestion, thanks. I found this suggestion to see the error messages that the exe generates so I know where to start debugging.

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2017 年 12 月 22 日
Where EXACTLY is the "Windows Documents" folder? If it's under C:\Windows or C:\Program Files, then you cannot save things there. If it's under C:\Users\KAE\Documents, then you should be able to save files there.
  1 件のコメント
KAE
KAE 2017 年 12 月 22 日
Yes, C:\Users\KAE\Documents\ is what I was referring to, so I will need to bark up some different trees in terms of debugging.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by