*Reaper* Posted December 19, 2009 Posted December 19, 2009 (edited) Ok.... Ive got a addon that im working on...During the uninstall I need the inf to set a folder for deletion after reboot.So 1st question is How do you set a folder for deletion after a reboot, and 2nd is how do you get the inf to ask if you if you would like to reboot?The folder is in Program Files....Reason I have to do it this was is because i have a dll file that is lockedby explorer.exe until after reboot, so you cant delete the folder until then...And Ive tried everything... Unregistering.dll etc.... You can use unlockerto unlock it and then delete the folder but thats not a great alternative...Any help would be appreciated... Edited December 19, 2009 by *Reaper* Quote
Guest Posted December 19, 2009 Posted December 19, 2009 (edited) well you can make the inf reboot using SmartReboot=N Never rebootAS Always reboot without askingIS Reboot without prompting if neededA Always ask user to rebootI Ask user to reboot if neededbut i didn't try it a lotand about setting the inf to remove folder you can use Runonce commands in the registry to call the inf to delete the files Edited December 19, 2009 by DaRk MaDnEsS Quote
ricktendo Posted December 19, 2009 Posted December 19, 2009 To delete the folder you add a RunOnce/Ex entry to the registry to deal with the folder, in your DelFiles section of the INF add ,,,1 flag to force delete[Uninstall]DelFiles=SectionNameAddReg=RunOnceSmartReboot=A[SectionName]Example.exeExample.dll,,,1 ; queue up delayed delete[RunOnce]HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce,"PostUninstall",,"rundll32 advpack.dll,DelNodeRunDLL32 ""%16422%\%SubDir%"",1"DelNodeRunDLL321 // delete the directory only if it's empty2 // don't delete any sub-dirs; delete only the files4 // don't delete the dir itself8 // delete UNC [network] paths Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.