September 18, 200619 yr Hi,No matter what I tried this is the only way I could remove install folders:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Windows Install Is Finally Done" /fREG ADD %KEY%\055 /VE /D "Removing Windows Install Folder" /fREG ADD %KEY%\055 /V 1 /D "%windir%\system32\hide.exe cmd /C RD /S /Q %systemdrive%\Install" /fstart rundll32.exe iernonce.dll,RunOnceExProcessAdd 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
Create an account or sign in to comment