Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Installshield
Message
From
12/04/2000 16:08:40
 
 
To
All
General information
Forum:
Visual Basic
Category:
Third party products
Title:
Installshield
Miscellaneous
Thread ID:
00358919
Message ID:
00358919
Views:
45
I have the following function for my cleanup. The problem is it doesn't 'find' the desktop link. I have copy and pasted the name of the link into the svLinkFile assignment. I have also tried making it 8.3 compliant. I dont know why it does not work. Any suggestions?
function CleanUpInstall()
  STRING svDesktopLink, svResult, svLinkFile, svOldTargetDir;
  begin

  if (bInstallAborted) then
      return 0;
  endif;

  // The link file on the desktop
  svLinkFile = "Setup Visual Basic Runtime.lnk";
  svDesktopLink = FOLDER_DESKTOP + svLinkFile;

  // If our link file is found on the desktop...
  if ( FindFile( FOLDER_DESKTOP, svLinkFile, svResult) = 0) then
    // Convert the long path 
    LongPathToQuote(svDesktopLink,TRUE);
    // Save the old target directory since DeleteFile() uses TARGETDIR
    svOldTargetDir = TARGETDIR;
    // Set TARGETDIR to the desktop since that's where the link is
    TARGETDIR = FOLDER_DESKTOP;
    // Delete the file
    DeleteFile(svLinkFile);
    TARGETDIR = svOldTargetDir;
  endif;

  DialogShowSdFinishReboot();

  if (BATCH_INSTALL) then // ensure locked files are properly written
      CommitSharedFiles(0);
  endif;

  return 0;
 end;
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Next
Reply
Map
View

Click here to load this message in the networking platform