PDA

View Full Version : Uninstallshortcut doesn't work - Setup.exe is missing?-pls help



betty1
06-24-2004, 05:09 PM
hello,
I create an uninstall shortcut as following:
----------------------------------------
function CreateCustomUninstallshortcut()
string szProgram, szIconPath;
begin
if (!MAINTENANCE) then
szProgram =DISK1TARGET ^ "setup.exe";
szIconPath = TARGETDIR ^ "myApp.ico";
LongPathToQuote(szProgram, TRUE);
AddFolderIcon(FOLDER_PROGRAMS ^ "companyName", "Uninstall myApp",szProgram, DISK1TARGET,szIconPath,0, "", REPLACE);
Delay(1);
endif;
end;
----------------------------------------------

after I run my installer first time, I installed the application on my computer. Then I reboot my system, and try to test the uninstaller shortcut, but somehow, I got following message:

"windows is searching setup.exe, to locate the file youself, click browse."

when I click on "browse", there is no setup.exe.

after a while, i got another message:

"The item setup.exe that this shortcut refer to has beed chnged or removed, so this shortcut will no longer work properly.
....."

is everyone know what's happening? and how to fix this problem.any suggestiions?

by the way, if I don't reboot the computer, the shortcut works fine. but I have to ask user to reboot computer after installation.

Please help me with this issue. (Installscript project via Devstudio 9)
thanks a lot
betty

alatten
07-06-2004, 03:00 AM
Hi Betty,

try it in the way described in this posting (http://community.installshield.com/showthread.php?threadid=135671).

The variable UNINSTALL_STRING seems to make it much easier than I did it with coding the uninstall string myself...

HTH,
Andrees

betty1
07-06-2004, 05:06 PM
thanks for your help. it works fine.

betty

I used following code:
function CreateCustomUninstallshortcut()
string szProgramFolder, szItemName, szCommandLine, szWorkingDir, szIconPath,szShortCutKey;
NUMBER nIcon, nFlag, nResult;
begin
if (!MAINTENANCE) then

szProgramFolder = FOLDER_PROGRAMS ^ IFX_COMPANY_NAME ^ IFX_PRODUCT_NAME;
szItemName = "unInstall " + IFX_PRODUCT_NAME;
szCommandLine = UNINSTALL_STRING;
szWorkingDir = "";
szIconPath = TARGETDIR ^ "uninstall.ico";
nIcon = 0;
szShortCutKey = "";
nFlag = REPLACE;

//LongPathToQuote(szProgram, TRUE);
AddFolderIcon ( szProgramFolder, szItemName, szCommandLine, szWorkingDir, szIconPath, nIcon, szShortCutKey, nFlag );

Delay(1);

endif;
end;