Skip to content

Commit

Permalink
pathdef设置Read权限
Browse files Browse the repository at this point in the history
  • Loading branch information
埃博拉酱 committed Mar 17, 2023
1 parent 31faba4 commit aa33a8f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified +MATLAB/+internal/net7.0-windows/提权操作.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion 提权操作/Program.vb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Module Program
File.WriteAllLines(MatlabRC, (From As String In File.ReadAllLines(MatlabRC) Select Where Not 行.EndsWith("%PathManager")).Append($"path(path,fileread('{ProgramData路径}'));%PathManager"))
Dim 文件信息 As New FileInfo(Path.Combine(MatlabRoot, "toolbox\local\pathdef.m"))
Dim 访问控制 = 文件信息.GetAccessControl
访问控制.SetAccessRule(New FileSystemAccessRule("Users", FileSystemRights.ReadData, AccessControlType.Allow))
访问控制.SetAccessRule(New FileSystemAccessRule("Users", FileSystemRights.Read, AccessControlType.Allow))
文件信息.SetAccessControl(访问控制)
Case 提权操作.Uninstall_Path_Manager
Dim Matlab路径 As String = 读入字符串(参数流)
Expand Down

0 comments on commit aa33a8f

Please sign in to comment.