inDeveloperMode method

bool inDeveloperMode()

Windows 10+ has a developer mode that needs to be enabled to create symlinks without escalated prividedges. For details on enabling dev mode on windows see: https://dcli.onepub.dev/getting-started/installing-on-windows

Implementation

bool inDeveloperMode() {
  final response = regGetDWORD(
    HKEY_LOCAL_MACHINE,
    r'SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock',
    'AllowDevelopmentWithoutDevLicense',
  );

  return response == 1;
}