Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Icons on Windows XP & FOLDER_DESKTOP


3 replies to this topic

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 02 November 2004 - 22:22

While testing a CD prior to shipping I noticed that the desktop shortcuts that are to be created on the desktop, did not get created on the desktop. The shortcuts were created in the Program Folder. This script has not changed in the last 5 years. I used an older version of our install and it does the same thing.

What setting in Windows XP SP2 could change the FOLDER_DESKTOP to point to the Program Folder?

We use script to install the icons because we ask the user if they want to install them. The install script has not changed, and older installs now do the same thing on this one PC. Anybody ever see this?

I have added the line: ProgDefGroupType ( PERSONAL );
before I add the icons, and the icons are now created on the Desktop. But I still do not understand what changed on this one PC.

Back in the Ozone again! blink.gif

Edited by Ozone, 02 November 2004 - 22:56.


Perotin

Perotin
  • Full Members
  • 407 posts

Posted 04 November 2004 - 13:28

maybe there is a security problem ...
if the user has no right to open the "all users" folder, the target dir for adding the icons may be changed by system ?!?!
does this hasspen for an admin user?
Gruß / regards
Thomas

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 04 November 2004 - 15:07

Yes, the installation checks to see if the user has admin rights. If not, the installation will not continue. This installation installs a full accounting, inventory, production, control, software package. It is typically done in a client - server environment where there is a high degree of security. That is why we check for admin rights of the logged on user. The problem has never been reported from the field. It just popped up on my PC, the one that develops the install! I will be the first one to admit that I do not fully understand the Micro$oft XP operating system and all it's little quirks. I fully expected the icons to be in either the common desktop or another users desktop. Why both icons started showing up in the program folder seems unusual. The following code was developed from an InstallShield example over 4 years ago. We used the reserved word FOLDER_DESKTOP as the destination for the icon.

CODE
// Added this line on 11-2-2004 to get the icon to addded to the desktop
ProgDefGroupType ( PERSONAL );
   
/////////////  JWS TICKETING ICON

// szProgramFolder is the Desktop on the local system.
   szProgramFolder = FOLDER_DESKTOP;
   szItemName      = "JWS Apex";

// The command line for the folder icon must be the folder path, and
// it must be enclosed in quotation marks if the path is longer than
// eight characters.
   LongPathToQuote(szCommandLine, TRUE);
   szWorkingDir  = TARGETDIR;
   szIconPath    = TARGETDIR ^ "\\Jwsmenu.exe";
   nIcon         = 0;
   szShortCutKey = "";
   nFlag         = REPLACE;  
   
   szProgram     = PROGRAM_APEX;
   szCommandLine = szFolderDir;
   LongPathToQuote (szFolderDir, TRUE);
   szParam = PARAM;
   LongPathToQuote (szParam);
   szCommandLine = szProgram + " " + szParam;
           
// Create the folder icon, and show the folder it points to.
nResult = AddFolderIcon (szProgramFolder, szItemName, szCommandLine, szWorkingDir, szIconPath, nIcon, szShortCutKey, nFlag);
   if (nResult < 0) then  
      WriteLine ( nvLOG_FileHandle , "Add Desktop Icon Failed          ====== Date: " + svDATE + "   Time: " + svTIME );
      MessageBox("Add Desktop Icon failed.", SEVERE);
   endif;


Ozone

Ozone
  • Full Members
  • 77 posts

Posted 05 November 2004 - 20:45

I have a solution!
I found that the folder C:\Documents and Settings\All Users\Desktop was missing.
What happened was that I was no longer able to run our older installations made with InstallShield 6.12. I got the Error Number: 0x80040707. Searching on this site revealed the problem to be the dreaded DosExecPgm problem. (Important for you to read that thread.)

All I did was in explorer was to create the \Desktop folder in C:\Documents and Settings\All Users\ folder.

There has to be a match between entries in the registry and a real folder. There was an entry in the registry, but the folder C:\Documents and Settings\All Users\Desktop was missing. That \Desktop subfolder did exist in the administrator, Default User, and teb (My user initials). It was missing in All Users.

Hey Micro$oft, need some quality assurance testers? blink.gif