Help with autoexec.nt commands

  • Thread starter Thread starter justme
  • Start date Start date
J

justme

Searching the Internet I found some pages on autoexec.nt commands to
guide me in ridding the HD of unwanted files at bootup of WinXP Pro.

To example:
del /Q c:\docume~1\l[my user name]\Cookies\*.*
del /Q c:\docume~1\[my user name]\recent\*.*
del /Q c:\docume~1\[my user name]\locals~1\tempor~1\*.*

I placed the above lines at the bottom of the file after those already
present. The commands did not delete the intended files. Can someone
please tell me what I need to do to get the desired results.

Thank you.
 
1. They're all in use aren't they.
2. Your syntax is wrong. You are using NT command syntax but Autoexec.nt uses Dos 5 syntax. No such thing as /q.
Type
command /k del /?
to get Dos 5 help.

And this only works when you start a Dos program.

So wrong technique, using incorrect syntax. It worked in 9x because Windows hadn't started loading when these commands ran.

Set your options to reflect what you want. Only morons did this every boot, normal people did it occasionally by hand for housekeeping.

EG In IE you can tell it to delete it cache on closing. Internet Options - Advanced - Empty TIF When Closing Browser.
 
Well, well. haemorrhoids and David Candy both have a way of showing up
when they are least welcome. I kill-filed you after your fist rude,
arrogant reply to an inquiry of mine a few months ago. (Not
surprisingly, others did not find my inquiry as moronic as you did and
supplied the requested information without attitude.) Apparently I
forgot about you and didn't reapply those filters when I did a recent
clean install. I'll handle the oversight immediately. PLONK

BTW Davy, it is said the things you spew at others are the things you
find intolerable in yourself. Further it is not possible to set
options to do ALL the housecleaning I want done AT EVERY SINGLE
BOOTUP.

Anyone else have a more civil and helpful reply? Thank you.
 
I treat idiots as they deserve. You're doing something because you're a paranoid schizo. You're doing it wrong anyway.

If you don't know how to, then why are you doing it?

You don't have a problem, you've done no research, and seem to want to waste time. There's only so much one can do with a moron.
 
Lets see, you bought a corporate operating system, that takes thousand of hours to learn to operate. It's also used to control very advanced weapon systems. You chose NOT to buy WinME, a personal operating system.

I merely treat you as I would any systerm administrator. You act incompetent and I treat you that way.

--
----------------------------------------------------------
http://www.g2mil.com/Dec2003.htm
I treat idiots as they deserve. You're doing something because you're a paranoid schizo. You're doing it wrong anyway.

If you don't know how to, then why are you doing it?

You don't have a problem, you've done no research, and seem to want to waste time. There's only so much one can do with a moron.
 
ummm david, who are you talking to? he kill filtered you so he can't see your responses, or didn't you read up on newsgroups and how they work? using the ms web interface are we

you talk in a very condescending manner yet don't seem to understand much yourself. there are several valid reasons for wishing to remove your temp browser files every boot cycle, i.e. to prevent ANYONE else with admin priveledges to see what you're doing online for personal reasons or to keep your personal at home browsing habits away from corporate eyes when you take your laptop to work etc......

also the i.e. web browser caches files and site info in hidden folders and even if you check your magic options to remove all files guess what? they all stay in the hidden files anyway. and to add to the issue if you have messenger or outlook running and close i.e. those pages are still cached and the outlook and messenger programs when closing won't delete them even in the obvious places. and personally i love deleting the entries in the index.dat file hidden away in content.ie6 on boot as it's the only way to rid yourself of it's info (which caches where you surf to)

if you can't see why someone would want to automate a task that they wish done repeatedly, maybe..... well that's enough for now
 
But why would one attemp to clear these things only when starting Dos or Win 3.1 programs.
 
THANK YOU, the dude for your support and understanding.
I realize that DOS has a more diminished function in XP and that
perhaps the autoexec.nt file does not perform as the autoexec.bat did
under some earlier O/S - executing commands during boot-up - however
that is why I did as much research on the Internet before asking here.
So, according to what I read, what I want to do is possible and yet my
attempts to implement the commands failed. Beyond the assumption that
autoexec.nt is not the vehicle to perform these tasks automatically,
is there something within the placement, syntax, et c that is causing
this to fail. I now know (thank-you, David Candy) that /q is not a
valid switch which does throw all the other information into question.

Again, thank you for your calm and level-headed support.
 
But it is a valid switch outside of autoexec.nt.

XP has a way of doing it. But it is only practible to do only the index.dat. Using a batch file or Disk Cleanup (should search on some of my customising posts on DC) an do the others. But as you won't really know the name of all the files it could take days to set up a delete on next boot. So read below for, this is NT's equiv of wininit.ini. But it isn't as smart as 9x.

You stick it in the registry.
If the dwFlags parameter specifies MOVEFILE_DELAY_UNTIL_REBOOT, MoveFileEx stores the locations of the files to be renamed at restart in the following registry value:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations

The function fails if it cannot access the registry.

The PendingFileRenameOperations value is of type REG_MULTI_SZ. Each rename operation stores a pair of NULL-terminated strings. The system uses these registry entries to complete the operations at restart in the same order that they were issued. For example, the following code fragment creates registry entries that delete szDstFile and rename szSrcFile to be szDstFile at restart:

MoveFileEx(szDstFile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
MoveFileEx(szSrcFile, szDstFile, MOVEFILE_DELAY_UNTIL_REBOOT);
The system stores the following entries in PendingFileRenameOperations:

szDstFile\0\0
szSrcFile\0szDstFile\0\0Because the actual move and deletion operations specified with the MOVEFILE_DELAY_UNTIL_REBOOT flag take place after the calling application has ceased running, the return value cannot reflect success or failure in moving or deleting the file. Rather, it reflects success or failure in placing the appropriate entries into the registry.

The system deletes a directory tagged for deletion with the MOVEFILE_DELAY_UNTIL_REBOOT flag only if it is empty. To ensure deletion of directories, move or delete all files from the directory before attempting to delete it. Files may be in the directory at boot time, but they must be deleted or moved before the system can delete the directory.

The move and deletion operations are carried out at boot time in the same order they are specified in the calling application. To delete a directory that has files in it at boot time, first delete the files.

Windows 2000/XP: The MoveFileEx function coordinates its operation with the link tracking service, so link sources can be tracked as they are moved.

Windows 95/98/Me: The MoveFileEx function is not supported. To rename or delete a file at restart, use the following procedure.

To rename or delete a file on Windows 95/98/Me

1.. Check for the existence of the WININIT.INI file in the Windows directory.
2.. If WININIT.INI exists, open it and add new entries to the existing [rename] section. If the file does not exist, create the file and create a [rename] section.
3.. Add lines of the following format to the [rename] section:
DestinationFileName=SourceFileNameBoth DestinationFileName and SourceFileName must be short file names. To delete a file, use NUL as the value for DestinationFileName.

The system processes WININIT.INI during system boot. After WININIT.INI has been processed, the system names it WININIT.BAK.

To delete or rename a file, you must have either delete permission on the file or delete child permission in the parent directory. If you set up a directory with all access except delete and delete child and the ACLs of new files are inherited, then you should be able to create a file without being able to delete it. However, you can then create a file, and you will get all the access you request on the handle returned to you at the time you create the file. If you requested delete permission at the time you created the file, you could delete or rename the file with that handle but not with any other.
 
Back
Top