Jump to content

Recommended Posts

Posted

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


Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...