Solved

File Removal At Restart

Posted on 2008-06-11
6
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Folder Redirection GPO 8 50
Application timeout 4 39
Cannot to SCCM site - Windows 10 5 17
Desktop loading is delayed 38 42
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

740 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