*Reaper* Posted November 19, 2008 Posted November 19, 2008 Ok....I'm working on a addon for O&O SafeErase 3....The addon works perfectly.....I have one problem.... I create the shortcut just like the default installer does....Start/All Programs/O&O Software/O&O SafeErase....I can delete it also with no problem.....The problem comes in if you have more that 1 O&O software installed...Reason being that O&O creates shortcuts to all their software in:Start/All Programs/O&O Software/So what you could have is shortcuts like this: Start/All Programs/O&O Software/O&O SafeEraseStart/All Programs/O&O Software/O&O DefragStart/All Programs/O&O Software/O&O etc........So when my addon is uninstalled I need it to check to seeif any other shortcuts exists there.... If so ONLY deletethe O&O SafeErase part.... If not, delete the whole thing.....Hope I explained it clear enough......Right now this is the code I'm using......[Program.DelShortcut]Name =O&O SafeErase Wizard,0x00000002SubDir=O&O Software\O&O SafeErase[Program.DelShortcut1]Name =O&O SafeErase Help,0x00000002SubDir=O&O Software\O&O SafeEraseOf course this is just standard... Ok... I await the gods of addons suggestion! Quote
ricktendo Posted November 19, 2008 Posted November 19, 2008 You need not worry about deleting the other prog shortcuts...my sidebar addon puts a shortcut in the accessories subdir and when i delete the shortcut the other shortcuts are left untouched Quote
MrNxDmX Posted November 19, 2008 Posted November 19, 2008 Umm, rick you didnt understand him imo. He wants a code, that will uninstall the shorcut first, but then, if the shortcut folder is empty, will delete the folder too. The folder exists in start menu-programs dir of user. Sorry reaper, i cant think of anything right now. Will inform you if i find something usable Quote
*Reaper* Posted January 22, 2009 Author Posted January 22, 2009 Anyone have any more ideas on this???I know its a weird situation...And under most instances would not matter....Unless the user has multiple O&O programs..... Quote
Jonnyboy Posted January 22, 2009 Posted January 22, 2009 You could use a call to command prompt - calling a batch file that will perform the test and delete if necessary. rick can help with the syntax. But, I have used this in the past to create a service using vbscript. This is what I used to create the service.[Install]RunPostSetupCommands =Create.Service:1.........[Create.Service]CMD /Q /C cscript //nologo """%programfiles%\%scripts_dir%\InstallService.vbs"""Creating a batch file should be easy enough. I can help with it if you need it. 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.