0

I have written a simple Fortran code as follows:

!call system ('dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart')
call execute_command_line ('dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart')
end

When I run it using Intel(R) Visual Fortran compiler with Visual Studio, I am getting following error message:

Error: 740

Elevated permissions are required to run DISM.
Use an elevated command prompt to complete these tasks.

Any suggestion please to overcome this.

Thank you very much in advance for your time and help in this matter,

Bakbergen

  • 3
    You need to run that command with elevated privileges - as admin. I do not think you can elevate privileges for a command called from Intel Fortran. You will have to run your program as admin. – Vladimir F Героям слава Apr 27 '22 at 05:51
  • 2
    If you google you error message, my first suggestion whenever you have any problem, you get quite a few relevant hits, most of which agree with Vladimir's suggestion - see for example https://answers.microsoft.com/en-us/windows/forum/all/command-prompt-error-740/72ee2cf0-7818-49a0-9f80-0cd1020b9fd2 – Ian Bush Apr 27 '22 at 08:41

1 Answers1

0

I have this trouble when run PowerShell with user roots. Try to run PowrShell as Administer. In my case it was helped me

Viktor
  • 1