Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

enableStatic() errors out with NETCFG_E_NO_WRITE_LOCK on Win2008 core

Featured Replies

Hi,

I am trying to programmatically set static IPs in a multi NIC multi IP setup (using C++) - 64bit Win2008 Standard Core installation.

I am deploying WMI to do the same. However, the behaviour of enableStatic() is un-deterministic. I see that it successfully sets the IPs at times and fails to do the same in few other retry attempts; it fails with error 0x8004A024 = NETCFG_E_NO_WRITE_LOCK, which means some other application is holding the lock on the nic.

I got to know of this as a known issue as listed in the KB article: KB950134.

As suggested here I tried installing the hotfixes; but the only effect was frequency of this error coming up has reduced, but it is still erroring out. I also tried patching it to SP2 (note that this hotfix has gone into SP2), but even that did not help and am again getting the enableStatic failure with 0x8004A024.

I even tried using INetCfg to find the status of Write lock when enableStatic() has failed using WMI and then releasing it, but this doesnt work either (I used INetCfgLock::IsWriteLocked() and then INetCfgLock::ReleaseWriteLock() but this does not seem to work. It is returning success but not able to release the lock).

Does anyone have any suggestions on how to get over it?

Is there any other way to handle the NETCFG_E_NO_WRITE_LOCK error caused by enableStatic?

Any suggestions and pointers will be greatly appreciated.

Thanks,

~GK

Edited by gauravkr

  • 2 weeks later...

  • Author

Does anybody have any suggesttions?

Any pointers on this is greatly appreciated.

Thanks,

~GK

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.