war59312 Posted September 18, 2006 Share Posted September 18, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now