Solved

File Removal At Restart

Posted on 2008-06-11
6
262 Views
Last Modified: 2010-03-05
Does Microsoft provide functionality to perform an action before the next time Windows restarts?

I had written some installation programs quite some time ago, and I believe there was an INI file that could be used to write file deletion instructions for files currently locked by another process or the OS.  I believe this functionality was implemented in NT 4, and may have been removed.  

I believe that this functionality may have been exploited by the Dark Side, and removed from Windows.
0
Comment
Question by:mjs082969
6 Comments
 
LVL 5

Accepted Solution

by:
DanoliSolutions earned 45 total points
ID: 21763998
Have you tried using the autoexec.bat file? This executes before the GUI.
0
 
LVL 3

Assisted Solution

by:gs121
gs121 earned 41 total points
ID: 21764090
Autoexec.bat is probably the best way.

If the computer is in an AD Domain.....
I have used, if your using AD, the computer logon script, group policy.
The computer logon script runs everytime the computer boots up.
If you are in a AD policy and want to run it on computers in the domain,then I would do that.

http://support.microsoft.com/kb/198642
Scripts (Startup/Shutdown): Use this extension to specify the scripts that run when you start and shut down the computer. To configure the computer startup and shutdown scripts, start the Group Policy snap-in, expand Computer Configuration, expand Windows Settings, click Scripts (Startup/Shutdown), and then in the right pane, double-click the script that you want to configure. These scripts run on the Local System account.
0
 
LVL 3

Assisted Solution

by:andyms56
andyms56 earned 41 total points
ID: 21764192
hi m8 ther is a free program that will do this http://www.softpedia.com/get/System/Boot-Manager-Disk/MoveOnBoot.shtml
MoveOnBoot description
Allows you to copy, moves or delete files on the next system boot
MoveOnBoot allows you to copy, moves or delete files on the next system boot. This comes in very handy, if you need to replace or delete files which are locked by other applications, loaded into memory or cannot be changed until next system boot.
You could manually enter a line to the wininit files, but using MoveOnBoot is much simpler, since the program can be integrated into shell - it creates the "Copy/Move/Delete on boot" context menu item.
andy
0
The problems with reply email signatures

Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

 
LVL 32

Assisted Solution

by:r-k
r-k earned 41 total points
ID: 21766503
One of the better ways is to put the file deletion and other commands in a *.bat file and schedule it to start "At System Startup". Scheduled tasks are run before anything else on startup, and your deletions are sure to be successful.
0
 
LVL 2

Assisted Solution

by:KevinNo
KevinNo earned 41 total points
ID: 21767295
GS121 is spot on. You have 2 options, domain policy or local policy. For 1 machine, type gpedit.msc in the run command. If you want to do this domain wide, use the group policy management console on a DC. Follow GS121's instructions. Be warned tho, domain wide policies can be dangerous if implimented without planning and testing.
0
 
LVL 7

Assisted Solution

by:Dauhee
Dauhee earned 41 total points
ID: 21767704
do you really want to reboot? Can run the following command to find the offending application/service that has the a dll loaded in memory (where xxxxx is the dll you are trying to replace):

tasklist /m xxxxx

You can optionally use a autoruns procexp.exe to search what running programs have the file (can be anything, not just dll) loaded in memory
0

Featured Post

Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Cookie issue 7 41
Show hidden user account 7 29
PCAnywhere 2 58
ADMT Intra Forest migration questions 7 74
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now