"The environment is incorrect." error when trying to run an executable


  1. Posts : 55
    Windows 10 Pro
       #1

    "The environment is incorrect." error when trying to run an executable


    I have a desktop computer that was upgraded from Windows 7 to Windows 10 Pro. When I try to run CMD as Administrator, I receive "The environment is incorrect." error message. I get the same error if I try to run other Windows applications (in Windows\System32).
    Update: It looks like I have bigger problems. I am in the Administrators group but cannot run any application requiring elevated privileges. When I try to run the CMD (Admin) using Power Users menu, I receive "This file does not have a program associate with it ..." (image attached). I can't run SFC or DISM to repair my installation either because it tells me I need to be an Administrator. Should my query be moved to Installation sub-forum?
    Thanks.
    "The environment is incorrect." error when trying to run an executable-cmd-failure.jpg
    Last edited by rmk9785e; 02 Nov 2016 at 23:49. Reason: Additional info - Please move this to the appropriate sub-forum.
      My Computer


  2. Posts : 42,984
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, if you don't have disk images previously created which you could use to restore your PC to a previously working state (we strongly and repeatedly recommend the use of disk imaging to protect your PC, your data and your sanity) e.g. Macrium reflect (free) + its boot medium + external storage - or an appropriate system restore point, then I would suggest you might try an in-place upgrade repair install.

    Precede it with this in case sthg has happened to your file system:

    (As you can't use admin mode you would need to run chkdsk offline - e.g. from a command prompt outside windows)
    chkdsk x: /F
    - where x is the appropriate drive letter (not necessarily C)
    Make sure the result is clear or fixed- else do not proceed.
    Post back the result

    An In-place upgrade repair install will fix many things, but not those where the settings are not changed by the procedure.

    For this you need an installation medium with the same base build as you have installed, and x64 if you have a 64 bits OS, else x86 (32 bits).

    Recommendation:
    Before you perform the following major repair procedure, do create a disk image (see below).

    Repair Install Windows 10 with an In-place Upgrade - Windows 10 Forums
    - this includes a link from which you can obtain Windows 10 iso file (" download a Windows 10 ISO"), or create a bootable medium.

    I would recommend creating the bootable medium, as this can be used
    - for any future in-place upgrade repair install
    - to boot from and use its recovery options should Windows become unbootable.
    - to clean install Windows

    This will refresh Windows, after the manner of a Windows installation.
    - all/most associations will be unchanged
    - all your programs will be left installed
    - no personal data should be affected
    - you will lose any custom fonts
    - you will lose any customised system icons
    - you may need to re-establish your Wi-Fi connection
    - you will need to redo Windows updates subsequent to the build you have used for the repair install
    - Windows.old will be created
    - system restore will be turned off- you should turn it on again and I recommend you manually schedule a daily restore point.
    - you will need to redo any language downloads including the display language if you changed that)
    - inactive title bar colouring (if used) will be reset to default
    - if Qttabbar is installed, you need to re-enable it in explorer (Options, check Qttabbar)
    This is one of the better features of Win10: as each major build comes out, that's your updated reference build, and as updates are mostly cumulative, there will be few to do.


    Please consider using disk imaging regularly. It's a brilliant way to
    - preserve your system (and your sanity)
    - back up your data
    - restore your system to a previously working state in a relatively short time

    Recommended: Macrium Reflect (free/commercial) + boot disk/device + large enough external storage medium.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:34.
Find Us




Windows 10 Forums