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.

RunOnce and dos commands

Featured Replies

I want to have a set of dos commands run when windows starts for the first time. I tried a few things but none worked and I have searched on here a lot but have not found much documentation on RunOnce in nLite.

I want to run the command below, for example, on first boot into windows after install.

del C:\"Documents and Settings"\User\Desktop\*.lnk

This works when i put it in a batch or command file within windows. I tried calling it from the RunOnce area but it failed. I am not sure where i should locate the bat or cmd file with these commands in it within the nLite created image/directory.

Can someone please help or guide me to information.

Thanks

m00ty

m00ty, if your are placing the command in the nLite RunOnce area, then the problem is that it runs at T-13. This is too early, since your account is not set up yet. There are many ways to accomplish this, but the easiest way may well be Windows Post Install (WPI, a couple forums below nLite's). It also allows you do many things such as installing programs. Enjoy, John.

I think it has got to run in "RunOnceEx", not "RunOnce".

This is NOT at T-13, it runs when the User is logged on, but before Desktop has completly loaded.

it's located under i386, the file is NLITE.CMD, cabbed into NLITE.CM_

for your command, try with

del "C:\Documents and Settings\User\Desktop\*.lnk"

Edited by mooms

Yes, that won't work as nLite's RunOnce operates before the desktop is fully loaded, you will need a command like this:

Start CMD /R " Ping -n 121 127.0.0.1 > nul && Del "%UserProfile%\Desktop\*.lnk" && Del "%AllUsersProfile%\Desktop\*.lnk" "

This will allow 2 minutes for the desktop to load (n-1 seconds, might need to increase if running GuiRunOnce commands) before scrubbing the desktop.

If that doesn't work go with:

Start CMD /R %Source%CleanUp.bat

Where CleanUp.bat is a batch file in the root directory of your install media containing:

Ping -n 121 127.0.0.1 > nul
Del "%UserProfile%\Desktop\*.lnk"
Del "%AllUsersProfile%\Desktop\*.lnk"

Edited by Kurt_Aust

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.