PeterSchmitz
New Member
- Joined
- Apr 17, 2017
- Messages
- 8
- Thread Author
- #1
Hi everyone,
after doing a clean Windows 7 reinstall I was wondering if there is a way to quickly clear the Start Menu Folder
by writing a Batch file.
I only know how to delete a single entry via the "reg delete <Path>" command however this only works if you add the name of the specific Program you want to clear.
The Batch file should clear everything in the Start Menu Folder leaving only Programs that have been specified.
Thanks in advance,
Peter
after doing a clean Windows 7 reinstall I was wondering if there is a way to quickly clear the Start Menu Folder
by writing a Batch file.
I only know how to delete a single entry via the "reg delete <Path>" command however this only works if you add the name of the specific Program you want to clear.
The Batch file should clear everything in the Start Menu Folder leaving only Programs that have been specified.
Thanks in advance,
Peter
- Joined
- Jul 4, 2015
- Messages
- 8,970
PeterSchmitz
New Member
- Joined
- Apr 17, 2017
- Messages
- 8
- Thread Author
- #3
- Joined
- Jul 4, 2015
- Messages
- 8,970
You can right click on the taskbar, select propeties > 'Start Menu' and customize what you want shown on the start menu. As for removing program shortcuts it would be quick to just delete them from the two locations they are populated from.
- Press [Windows key + r]
- Type shell:start menu
- Delete whatever shortcuts in here you do not want in the start menu
- Press [Windows key + r]
- Type shell:common start menu
- Again delete what you don't want shown (this is the all users location)
PeterSchmitz
New Member
- Joined
- Apr 17, 2017
- Messages
- 8
- Thread Author
- #5
Yep, thats what I have done so far. I was just wondering if anyone knows of a way to have a batch file do the clearing for me. I would have that file lying on my Desktop and then just double click on it and the start menu is cleared.
That's nothing I need necessarily but it would be cool. I am just too inexperienced with shell programming on Windows etc.
On Linux I would be able to do this but I do not know the MS-DOS commands needed on Windows.
That's nothing I need necessarily but it would be cool. I am just too inexperienced with shell programming on Windows etc.
On Linux I would be able to do this but I do not know the MS-DOS commands needed on Windows.
- Joined
- Jul 4, 2015
- Messages
- 8,970
It would be pretty simple in powershell. Something like this.
Code:
$filePaths = @("$env:USERPROFILE\Appdata\Roaming\microsoft\windows\start menu","$env:ProgramData\microsoft\windows\start menu")
$excludeItems = @("file1tokeep","file2tokeep")
$filesToRemove = Get-ChildItem -Path $filePaths -Exclude $excludeItems -Recurse -File
foreach($file in $filesToRemove) { Remove-Item -Path $file.FullName -Force }
Similar threads
- Replies
- 11
- Views
- 128
- Article
- Replies
- 0
- Views
- 42
- Article
- Replies
- 0
- Views
- 43
- Article
- Replies
- 0
- Views
- 53
- Article
- Replies
- 0
- Views
- 66