CrazyCanuck,Eh? Posted August 7, 2007 Share Posted August 7, 2007 During an unattended setup, i want to delete folders from the Programs menu. Not just the shortcuts but the whole folder to prevent unwanted bloat of folders I do not need such as Winzip, 7-zip and any others. This includes from all the profiles. What would i put in my cleanup.cmd to do this for each user profile? Link to comment Share on other sites More sharing options...
NOTS3W Posted August 7, 2007 Share Posted August 7, 2007 Those folders can be found in "%UserProfile%\Start Menu\Programs" or in "%AllUsersProfile%\Start Menu\Programs". From a batch file like cleanup.cmd, just delete them (rmdir or rd) with the switches /S and /Q to delete each unwanted folder and any sub-folders it may contain, and do so without prompting for confirmation.If you're not sure which profile a folder is in, you could delete it from both but you'll be unnecessarily deleting a number of folders that don't exist:RD /S /Q "%UserProfile%\Start Menu\Programs\folder_to_delete"RD /S /Q "%AllUsersProfile%\Start Menu\Programs\folder_to_delete"RD /S /Q "%UserProfile%\Start Menu\Programs\next_folder_to_delete"RD /S /Q "%AllUsersProfile%\Start Menu\Programs\next_folder_to_delete"RD /S /Q "%UserProfile%\Start Menu\Programs\another_folder_to_delete"RD /S /Q "%AllUsersProfile%\Start Menu\Programs\another_folder_to_delete"%UserProfile% is equivalent to C:\Documents and Settings\(user name)%AllUsersProfile% is the same as C:\Documents and Settings\All UsersYou can also do this to create (mkdir or md) new folders if you want to consolidate things. I create a Media Players folder on my Programs menu then put shortcuts to all of my media players there. I also make a Ripping Tools folder for things like DVD Decrypter, DVD Shrink, DVD Flick, etc.Ray Link to comment Share on other sites More sharing options...
NOTS3W Posted August 7, 2007 Share Posted August 7, 2007 BTW, deleting those folders will only delete the shortcuts they contain. The programs will still be installed on your system. Link to comment Share on other sites More sharing options...
Peteski Posted August 7, 2007 Share Posted August 7, 2007 you can take out the guess work of whether its all users or local user by viewing its location via folder properties. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now