Solved

File Removal At Restart

Posted on 2008-06-11
6
265 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

792 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