Jump to content

Delete shortcut depending?


*Reaper*

Recommended Posts

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 SafeErase

Start/All Programs/O&O Software/O&O Defrag

Start/All Programs/O&O Software/O&O etc........

So when my addon is uninstalled I need it to check to see

if any other shortcuts exists there.... If so ONLY delete

the 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,0x00000002
SubDir=O&O Software\O&O SafeErase

[Program.DelShortcut1]
Name =O&O SafeErase Help,0x00000002
SubDir=O&O Software\O&O SafeErase

Of course this is just standard...

Ok... I await the gods of addons suggestion! :D

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...