?
Solved

InstallShield Question

Posted on 2000-05-05
3
Medium Priority
?
495 Views
Last Modified: 2013-11-20
I'm using InstallShield 5 Professional Edition and I have a little problem.
When installing my app. I have to delete an old folder from Start/Programs
which is created by a diffrent version of the application.
To be more specific in Start/Programs I have a group like: MyApplication which contains 2 shortcut items: Shortcut1 and Shortcut2.
From my script I have to delete the group MyApplication with those 2 shortcut items and I use DeleteProgramFolder function. But unfortunately this call deletes the shortcuts items but not the MyApplication group.
What should I do ???
10x in advance
0
Comment
Question by:nick666
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:V_Bapat
ID: 2781044
Are you installing on Win NT & the folder MyApplication is in Common folders in Program menu?
0
 
LVL 3

Expert Comment

by:V_Bapat
ID: 2781071
Can you show some code where you are trying to delete the folders?
0
 

Accepted Solution

by:
blegris earned 100 total points
ID: 2781499
You need to make sure that the folder you try to delete is not the current directory. I hope this will help you.


function RemoveOld()
LIST          listItemsID, ListFoldersID;
begin

listItemsID = ListCreate (STRINGLIST);
listFoldersID = ListCreate (STRINGLIST);

// THIS IS THE LINE THAT SHOULD HELP YOU
ChangeDirectory( "C:\\" );

// Delete here your icons
DeleteFolderIcon (svFolderName, @HELP_ICON_NAME );
if ( bWinNT ) then
// For NT delete the directory only
// if no more icons are found
DeleteDir( FOLDER_PROGRAMS ^ svFolderName, ONLYDIR );
elseif ( GetFolderNameList ( FOLDER_PROGRAMS ^ svFolderName, listItemsID, listFoldersID ) < 0 ) then
// Get the list of icons failed no more
// icons
DeleteProgramFolder( svFolderName );
endif;
if ( ListCount(listItemsID) <= 0 && ListCount(listFoldersID) <= 0  ) then
// No more icon remove the icon folder
DeleteProgramFolder( svFolderName );
endif;
endif;
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question