Jump to content

Remove Directories?


Recommended Posts

OK. I've gotten my Unattended XP Distro pretty much how I want it. But how do I go about removing certain directories? i.e., I've removed movie maker, but it still creates a directory under Program Files. Where would I go to keep that from happening in the source files? Any Ideas? Thanx in advance!

Link to comment
Share on other sites


Here is one way:

Find out exact name of the folders you want to delete and then add the exact path after %systemdrive%.Add the line in your CLEANUP.cmd or make your self another cmd file.

RD /S /Q %systemdrive%\

Hope it helps.

Link to comment
Share on other sites

Here is one way:

Find out exact name of the folders you want to delete and then add the exact path after %systemdrive%.Add the line in your CLEANUP.cmd or make your self another cmd file.

RD /S /Q %systemdrive%\

Hope it helps.

To a point it does. But I haven't gone the route of making $OEM$ directory, and I don't want to make one now. What I'm asking for, is in the source, I just need to know where. No sense in adding stuff to remove stuff, when I could just remove it from the source. Thanx Anyways. :)

Link to comment
Share on other sites

you have to disable "hide known file extensions" otherwise when you save a file as "cleanup.cmd" from notepad it will name it "cleanup.cmd.txt" i believe...

I don't think you can disable the creation of the empty directories, just use a delete command:

RD /S /Q "%programfiles%\MovieMaker"
RD /S /Q "%userprofile%\Start Menu\Print Me Internet Printing"

please note you have to have the "" around the folder name you want to delete as the %programfiles% variable has spaces in it's name

Link to comment
Share on other sites

how do I make a CMD file?

Do I just copy and paste into notepad and save as clean.cmd ?

Do I then put this into the runonce gui?

Yes that is about it. You can find more information about this if you google for bat commandos.

Here is a code I used for a unattended installation:

@echo off
ECHO cleaning up
if exist %systemdrive%\install echo removes folder
if exist %systemdrive%\install rd /S /Q %systemdrive%\install
ECHO connects to share
net use x: \\ris\office mrsdata /USER:ris /PERSISTENT:NO
ECHO Installs Office
x:\PROPLUS.MSI TRANSFORMS=unattend.MST /qr
echo shutting down
shutdown -r -t 30 -c "Var god vänta. Startar om för sista gången."
echo All Done!

This script removes the C:\install folder created by $eom$ later it connects to a network share and installs office from it. Finally it reboots the computer.

You just as you wrote put it into a textfiles and saves it as a .cmd run it from GuiRunOnce or whereever you find it suitable.

Link to comment
Share on other sites

be aware that some folders in program files directory are protected by sfc and will eventually come back after u delete them. :) heh annoying? I know I hate the xerox folder, I so much wonder what it does :rolleyes:

hmm I've a folder in there; just discovered its called nwwia ???

Link to comment
Share on other sites

Crusher,Jun 15 2004, 08:18 PM] if you disable system file protection, will the directories still come back?

If you disable SFC, the folders do not come back.

However Im not convinced I want SFC gone. I like knowing my windows files are protected.

As for those stupid ""Program Files" folders...

I used hexedit on C:\WINDOWS\system32\sfcfiles.ddl to "blank out" the offending entries.

eg. MSN Gaming Zone, Xerox etc..

PS: What posible snag: the filenames are Unicode.

Link to comment
Share on other sites

ahah i have that xerox folder too. i guess i'll use the RD command to get rid of it. I (used to) spend like 10minutes removing all the things in windows that were stupid and made my hard drive looked s***ty. Xerox is one of them.. and i dont know what it is there for either:-/

Link to comment
Share on other sites

Yeah I think I just ZEROED them extrememac, I used hexworkshop.

I am going to try find a way to script it, and will post a result here.

I need a tool that scripts patches, im sure the warez guys have little utils like that.

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...