Hi guys,

I've been said it's a simple issue, and I myself too think so because there are many Windows programs published daily to the marked all have that ability and a good part of that programs are based on C++ or created by Qt.
Here is the source file and I use Qt Installer Framework with this script file for making an installer:


Qt Code:
  1. function Component(){ }
  2.  
  3. Component.prototype.createOperations = function()
  4. {
  5. component.createOperations();
  6. if (installer.value("os") == "win")
  7. {
  8. var userProfile = installer.environmentVariable("USERPROFILE");
  9. installer.setValue("UserProfile", userProfile);
  10.  
  11. component.addOperation("CreateShortcut", "@TargetDir@/Spreadsheet.exe",
  12. "@UserProfile@/Desktop/Spreadsheet.lnk" ,"workingDirectory=@TargetDir@",
  13. "iconPath=@TargetDir@/Spreadsheet.ico");
  14.  
  15. component.addOperation("CreateShortcut", "@TargetDir@/QSpreadsheet.exe",
  16. "@TargetDir@/Spreadsheet.lnk" ,"workingDirectory=@TargetDir@",
  17. "iconPath=@TargetDir@/Spreadsheet.ico");
  18.  
  19. component.addOperation("CreateShortcut", "@TargetDir@/Spreadsheet.exe",
  20. "@StartMenuDir@/Spreadsheet.lnk", "workingDirectory=@TargetDir@",
  21. "iconPath=@TargetDir@/Spreadsheet.ico");
  22.  
  23. component.addOperation("RegisterFileType", "sp",
  24. "@TargetDir@\\Spreadsheet.exe \" %1\"", "Tomy Files", "application/Tomy",
  25. "@TargetDir@/Spreadsheet.ico", "ProgId=Spreadsheet.sp")
  26. }
  27. }
To copy to clipboard, switch view to plain text mode 


I've been said using that script file and Qt Installer Framework I can have the job done. But when I make the installer this way, no icon will be set on the file type of the program.
Does anybody know what the problem is please?