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.

Using both RunOnceEx & nLite

Featured Replies

I wanted to import HKCU & HKLM via "RunOnceEx.cmd" in (cmdlines.txt) and to follow that with those changes that nLite makes:

[Commands]

"RunOnceEx.cmd"

"rundll32 advpack.dll,LaunchINFSection nLite.inf,nLiteReg"

Since RunOnce & RunOnceEx run at the same time, there will be interference between them.

Especially since I’m importing my whole HKCU key (admin to admin) and my whole HKCU/Software key.

Is there a way to control the sequence of events?

Is there a way to get nLite to use RunOnceEx or to convert nLite’s nLite.inf RunOnce entries to RunOnceEx?

Thanks


  • Author

OK, I tried this and it seems to work.

If anyone knows a better way, please feel free to suggest.

Removed the line

“rundll32 advpack.dll,LaunchINFSection nLite.inf,nLiteReg”

from cmdlines.txt and then

as the last entry in RunOnceEx.cmd have a bat file (nLiteinf.bat) that then runs

“rundll32 advpack.dll,LaunchINFSection nLite.inf,nLiteReg”

Does this strategy allow nLite to do all it needs to do?

Or is there be a better way?

---------

File Examples:

---------

cmdlines.txt would be:

[Commands]

"RunOnceEx.cmd"

---------

RunOnceEx.cmd would be:

@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Replacements & Imports" /f

REG ADD %KEY%\003 /VE /D "Replacing Notepad & MAKECAB" /f

REG ADD %KEY%\003 /V 1 /D "E:\UA01\$OEM$\Notepad.bat" /f

REG ADD %KEY%\020 /VE /D "Deleting & Importing HKLM-TWEAKS.REG" /f

REG ADD %KEY%\020 /V 1 /D "REGEDIT /S E:\UA01\$OEM$\HKLM-TWEAKS.REG" /f

REG ADD %KEY%\099 /VE /D "Doing nLite.inf" /f

REG ADD %KEY%\099 /V 1 /D "E:\UA01\$OEM$\nLiteinf.bat" /f

(SEE Post #6 below)

shutdown -r -f -t 30 -c "Rebooting In 30 Seconds"

---------

“nLiteinf.bat" would be:

@echo off

rundll32 advpack.dll,LaunchINFSection nLite.inf,nLiteReg

Edited by ccc

  • Author

ARRRG... Still getting conflicts...

I now think the conflicts I’m getting are with what I’m trying to import via my reg files.

Edited by ccc

The answer is fairly simple, and obvious.

Take the stuff you put in the RunOnceGUI section of nLite out.

Add them back in to your RunOnceEx.

Conflict eliminated.

  • Author

Thanks chapmani,

But the nLite.inf runonce entries I’m talking about are those in I386/nLite.in_ which becomes C:\windows\inf\nLite.inf. And as far as I can tell, these entries are a part of nLite's activity regardless of “the stuff you put in the RunOnceGUI section of nLite”.

I thought a separate reboot would help, but that wasn’t possible with the last entry I was trying to place in RunOnceEx – those must be run and then cleared; rather than dumped to memory. Anyway, went back to running "rundll32 advpack.dll,LaunchINFSection nLite.inf,nLiteReg" from the last RunOnceEx (as reflected in edit to second post above), but still getting conflicts.

I now think the conflicts I’m getting are with what I’m trying to import via my reg files.

Edited by ccc

  • Author

Actually, one can just enter the inf command directly into RunOnceEx instead of the bat / cmd file that runs it.

So you would have:

REG ADD %KEY%\099 /VE /D "Doing nLite.inf" /f

REG ADD %KEY%\099 /V 1 /D "rundll32 advpack.dll,LaunchINFSection nLite.inf,nLiteReg" /f

Instead of:

REG ADD %KEY%\099 /VE /D "Doing nLite.inf" /f

REG ADD %KEY%\099 /V 1 /D "E:\UA01\$OEM$\nLiteinf.bat" /f

and thus with no nLiteinf.bat file needed.

I have experenced many issues with importing reg entries late in the game (once your logged in). Now I have a multi teared reg entry procedure that works great. First reg entry which is universal to pc is at cmdlines. If you do an entry then it will almost always work unless its corrupt. Second is right after first logon but I kill explorer & runonce runs then and third is once finally logged in. Try that and it should make it all work.

  • Author

Thanks Madhits45,

>>> First reg entry which is universal to PC

I’m guessing that one is very generic with no software settings?

>>> Second is right after first logon but I kill explorer & runonce runs then

Could you give examples of these commands?

And if you use nLite, how do you deal with the nLite.inf command?

Thanks

Edited by ccc

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.