Jump to content

Where is nlite.cmd run from on new user startup?


Volatus

Recommended Posts

I've got a frustrating problem. I use nlite.cmd to install programs that can't be installed during Windows Setup (like .NET, Java, a few others), and perform a cleanup. I assumed this file would be deleted and never be seen again on the computer. Well, I created another user account and it hung while popping up a dialog box of "can't find file", for one of the installers that nlite.cmd runs. Duh - they were deleted and it shouldn't be running!

I could just delete nlite.cmd but I need to figure out why Windows is calling it to begin with. What triggers it to run on every new user?

Link to comment
Share on other sites


I'm not entirely certain since I don't use this particular feature of nLite, but you may want to check the following registry key for any conspicuous entries:

[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce]

Link to comment
Share on other sites

Yeah, I checked there, and all that's there is:

regsvr32 /s /n /i:U shell32

rundll32 advpack.dll,LaunchINFSectionEx nLite.inf,C,,4,N

I searched the whole registry for nlite.cmd, and couldn't find anything! I also can't find nlite.cmd in nLite.inf either, which rules that one out (I think?). nLite.inf is ridiculously huge though... I can't even begin to imagine why it needs 9/10ths of the stuff in that file, but "OK"... :P

Don't know if I can ask Nuhi either... seems to have moved on to "newer projects" like vLite... =\

Link to comment
Share on other sites

nLite.inf contains all of the tweaks you've chosen, along with the registry entries culled from each and every update you've slipstreamed with nLite--including IE7 x86 which includes well over ten thousand lines by itself. ;)

Sorry I couldn't help you further.

Link to comment
Share on other sites

Volatus, this is very interesting and I will spend some time looking into it. I logged into my Administrator account (VM) and I saw a quick command prompt window. Something was trying to run - my CD was disconnected. The nLite.cmd file is still in my System32 folder. Puzzled right now. Enjoy, John.

Link to comment
Share on other sites

Volatus, I still don't know what is going on. Have you placed commands inside the nLite.cmd file itself or just used the RunOnce exit in Unattended to run a batch file? I use Kurt_Aust's method (see here), to run installs like you mentioned. The nLite.cmd file normally gets run out of RunOnce and can be seen in the Winnt.sif file. DOSNET.INF (or .IN_) is where nLite.cmd gets copied to the Windows folder, I think. As I stated before, when I log into my Administrator account, I see a flash of a command prompt and that is all (my CD was connected). This happens only the first login. I can go to the Windows\System32 folder and run nLite.cmd and it runs. If my CD is disconnected, then I get an error, but no flash of a command prompt. I see that the nLite.inf is in the Windows\INF folder. I have 4 RunOnce entries in my Registry. I may have more than XP since I am running x64. Attached is a screen shot of one. I still don't understand how your nLite.cmd is getting started. Please let me know if you have some ideas. Enjoy, John.

EDIT: This is toward the bottom of nLite.inf:

HKU,".DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce","_nltide_3",0x00020000,"rundll32 advpack.dll,LaunchINFSectionEx nLite.inf,C,,4,N"

Perhaps this explains why this keeps getting run.

EDIT2: I managed to get a copy on the command prompt that flashes across my screen on the first login of each of my users. Here is a screen shot. John.

Edited by johnhc
Link to comment
Share on other sites

Guest watbox
john = look at his status..

He's been banned.

I'd go more for a "thanks" as I'm trying to get that little "issue" resolved at this very moment and I appreciate that someone is willing to help me out on this board... which is more than I can say for a mod noticing that an Ultimate Sponsor had suddenly turned into "Banned" for no apparent reason and not even asking themselves "why"*... Meanwhile, I guess I can contribute to this thread with this temporary account while I await resolving of my account status...

I've added a simple line to the end of my script (nLite first-run commands) that makes it delete itself. It's rather hackish, as I still can't determine what causes it to be launched in the first place. Later, I'll make an nLite disc with _only_ a first-run commands script, and see what files were changed between an original disc and the nLite result. But here's the command:

del "%~d0%~p0%0"

%~d0 is the drive portion of the script's path, %~p0 is the path, and %0 is the filename itself, so it constructs the full path and filename directly from where the script was executed from. And it works! :)

* - edit: *scratches head* Um... I never did understand that. Are software developers also mods? If not, sorry; I assumed you had the ability to see what's up with someone's account, but if you're not a mod then why am I complaining? :)

Edited by watbox
Link to comment
Share on other sites

Guest watbox
Nope we just have fancy buttons on our shirts. Not mod powers.

Oh, OK! Sorry for the assumption :) Seriously, I am 110% clueless why my (real) account is banned... =\

Link to comment
Share on other sites

watbox, hope things get resolved soon. What, Kels, I don't even have any fancy buttons!

I have run several tests and I see no way for the nLite.cmd to get run more than once. It does look like nLite.inf gets run on every user log in - I really don't understand that. I do not understand what you mean by "nLite first-run commands." Here's my standard inculcation, but I do need to see your Last Session, please attach (not paste) your Last Session.ini. Make sure to always start with a fresh copy of your CD files/folders, do all your work in one nLite session and integrate only one SP. Please report when you have a solution, so others can benefit. Enjoy, John.

Link to comment
Share on other sites

Guest watbox

Lol :D

I think I see what you're thinking of, where the misinterpretation is. It's not getting run on every login. It's getting run as part of the "new user profile" building process. That is to say, if you go to User Accounts, and create a new user account, then log in as that new user, the first time you log in ("new user startup"), it runs nLite.cmd as part of the profile setup process (you know, that "Customizations" window in the corner of the screen if you don't have the Welcome screen on, or C+A+D past it?). Running nlite.inf is part of the HKU\.default\Software\Microsoft\Windows\CurrentVersion\RunOnce key, then nlite.inf adds a few extra commands to the RunOnce list once it's executed (including a file I believe is called "nlhelper.exe"? I don't have it in front of me). That nlhelper thing may be what calls nlite.cmd, but I really haven't dug that far into it... =\

Unfortunately I don't have my last session in front of me, but I can assure you it's a very repeatable process ;)

Link to comment
Share on other sites

watbox, I will run the test you suggest - actually had considered such a scenario. I still need to see your Last Session and I would also like to see the script you are running and answers to the questions I have been asking. Sometimes it seems like pulling teeth to get a request fulfilled here. Enjoy, John.

EDIT: I just ran several tests, defining a new account, then doing a Switch User. The new account gets created and when the desktop comes up, I see the same Command Prompt I posted earlier and that is it. NLite.cmd does not try to run. When you post the information I have requested, we can proceed. John.

Edited by johnhc
Link to comment
Share on other sites

Guest watbox
... Sometimes it seems like pulling teeth to get a request fulfilled here.

... When you post the information I have requested, we can proceed. John.

/nudge It should be known that one thing I don't take well to is being looked down upon... /nudge

The new account gets created and when the desktop comes up, I see the same Command Prompt I posted earlier and that is it. NLite.cmd does not try to run.

That's pretty much exactly what I was saying. "nLite.cmd" will run in a Command Prompt window, and is what ran when you "[saw] the same Command Prompt [you] posted earlier". That's exactly what I'm discussing here. nLite.cmd is supposed to run on a new user login, to apply any commands you run to any new user, like the tweaks in nlite.inf, as I assume is its intended design. But my implementation doesn't require these commands to be run for every new user, as the commands I run are system-wide settings and installers (which are deleted at the end of the script).

But no matter how little it'll help, here's my session INI...

Geeks3.ini

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...