Jump to content

cleanup.cmd not deleting dotnet folder


Recommended Posts

Hi,

No matter what I tried this is the only way I could remove install folders:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Windows Install Is Finally Done" /f

REG ADD %KEY%\055 /VE /D "Removing Windows Install Folder" /f
REG ADD %KEY%\055 /V 1 /D "%windir%\system32\hide.exe cmd /C RD /S /Q %systemdrive%\Install" /f

start rundll32.exe iernonce.dll,RunOnceExProcess

Add to the very end of cleanup.cmd. Right before EXIT .

I tried adding to runonce, run, runonceEx, etc. and it would never run on the next reboot.

This vbs script works fine normally but it would not run after the reboot either:

Dim Shell, SD, fso
V = Vbcrlf
on error resume next
Set Shell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
SD = Shell.ExpandEnvironmentStrings("%SystemDrive%")
fso.DeleteFolder( SD & "\Install")

This would not work either:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"RemoveInstallFolder"="C:\\install\\removeInstallFolder.vbs"

Take Care,

Will

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