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.

Few Start Menu Items not affected in cleanup...

Featured Replies

So in my cleanup.cmd i have the following lines that arent working...

set AUStart=%AllUsersProfile%\Start Menu\Programs
set UserStart=%UserProfile%\Start Menu\Programs

MOVE /Y "%UserStart%\Internet Explorer.lnk" "%AUStart%\Internet"
MOVE /Y "%UserStart%\Outlook Express.lnk" "%AUStart%\Internet"

RD /S /Q "%AUStart%\Administrative Tools"

its not the variables because I have a ton of other shortcuts that are also being moved and folder that are being deleted. It seems as though its specific to these couple shortcuts and admin tools folder...

Any ideas?

Thanks!

That code wrks form me Via WPI cant see anything wrong

closing CODE tags or QUOTE tags :P pick 1 lol

set AUStart=%AllUsersProfile%\Start Menu\Programs
set UserStart=%UserProfile%\Start Menu\Programs

maybe try

set AUStart="%AllUsersProfile%\Start Menu\Programs"
set UserStart="%UserProfile%\Start Menu\Programs"

Those shortcuts are not created until you logon to desktop.

  • Author
maybe try

set AUStart="%AllUsersProfile%\Start Menu\Programs"
set UserStart="%UserProfile%\Start Menu\Programs"

That doesnt work as you end up with the quotes in your variable and again, Ive got a ton of other shortcuts and folders that are being effected using these variables without issue.

Those shortcuts are not created until you logon to desktop.

Thats probably it... anyone have a good way to clean these up, short of manually doing it after logging on?

Self-deleting batch file in all users startup folder

Why not prevent them being created, in the first place using the winnt.sif components section, then just add the shortcuts to your install source for copying over

@MHz Sort of off-topic, but boy-oh-boy-oh-boy, I'd give my left pinky for a good, reliable, self-deleting batch file. Do you have something in the form of a template that you could share here?

  • Author
@MHz Sort of off-topic, but boy-oh-boy-oh-boy, I'd give my left pinky for a good, reliable, self-deleting batch file. Do you have something in the form of a template that you could share here?

Um... how about...

del filename.cmd

at the end of your batch file...

@durex

Maybe the solution is far simpler:

1. If the "%AUStart%\Internet" folder is not created before moving files into it, how will the command work? :P

2. The "Administrative Tools" in start menu is actually a folder. It is enabled/disabled from registry.

filename.cmd in All Users Startup folder

@echo off
set AUStart=%AllUsersProfile%\Start Menu\Programs
set UserStart=%UserProfile%\Start Menu\Programs

MD "%AUStart%\Internet"
MOVE /Y "%UserStart%\Internet Explorer.lnk" "%AUStart%\Internet"
MOVE /Y "%UserStart%\Outlook Express.lnk" "%AUStart%\Internet"
Attrib -r "%AUStart%\startup\filename.cmd"
ShutDown.exe -s -t 10 -c "System shutdown required now. Thankyou for your patience."
Del "%AUStart%\startup\filename.cmd"

Take note of the Attrib command, the file tends to turn into read-only, when copied over during text setup.

  • Author

@prathapml

Ive got many other shortcuts that are being moved to the Internet folder without issue, so I know that isnt it

@MHz

Thanks for writing that up specific to my example!

Thanks for the suggestions guys... always appreciated.

  • 2 weeks later...

After having these kinds of issues for the last ytear and a half. I was recently going through my scripts and it finally hit me what was going on.

In my case I was ceating my user accounts before I was running my cleanup.cmd. Well after tht it is to late the new users account has already been created from the default account. By the time the cleanup.cmd is running your only cleaning up the default account and the all users account and your new user has already been made from the default account before your cleaned the default account up.

So you need to reorder the way things are done. Do your cleanup and copying files and such. In my case I also do all my program installes from here so that the settings get applied to the default account also. Then as the last thing you do create your user account.

For my I'm also not using the winnt.sif. All this can be done easily from cmdlines.txt. One other thing if you do this from anything but cmdlines.txt it will be to late since the accounts will already be created. This is not so bad but it will mena that you will have more accounts to clean up.

  • Author

@ web

While your setup may differ from mine, my method should effect the %userprofile% (my created account, not the default) because my cleanup.cmd is run from RunOnceEx and my accounts are created prior to RunOnceEx even running.

So my cmdlines.txt creates my accounts, runs the runonceex script (which keep in mind at the time cmdlines.txt executes it, is ONLY adding the necessary RunOnce reg entries). Assuming runonceex is the last item in cmdlines.txt your pc then reboots.

Upon the 1st reboot after running cmdlines.txt it automatically logs in using the account I created in cmdlines, before runonceex.cmd was executed, THEN starts the RunOnce install, at the end of which runs cleanup.cmd.

So you see, at this point, when cleanup.cmd runs, youve already logged in using the account you created, so the shortcuts are created under your profile (or all users), not the default.

The reason why these few shortcuts werent getting removed when my cleanup.cmd ran, is because they are actually added pretty much at the same time the desktop is drawn for the 1st time.. after the cleanup.cmd ran. So they arent effected.

Hope this clears things up!

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.