Solved

InstallShield Question

Posted on 2000-05-05
3
481 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
  • 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 50 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

831 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