Announcement

Collapse
No announcement yet.

problem creating startmenu shortcut in Win7 64bit OS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem creating startmenu shortcut in Win7 64bit OS

    Hi,
    I am trying to create shortcut in the startmenu but I noticed that the icon was not showing.

    This is my code
    startMenuFolder = Shell.GetFolder(SHF_STARTMENUPROGRAMS_COMMON) .. "\\MyApp";

    Shell.CreateShortcut(startMenuFolder, "my app", SessionVar.Expand("%ProgramFilesFolder%").."\\myap p.exe, "", SessionVar.Expand("%AppFolder%"), SessionVar.Expand("%AppFolder%\\myapp.exe"), 0, SW_SHOWNORMAL, nil, ProductName);

    it seems to have problems with the icon path. When I click on the icon path, it show
    "Windows can't find the file %programfiles%\myapp.exe".


    I believe that the it is using the wrong icon path.

  • #2
    Originally posted by tybuser View Post
    I believe that the it is using the wrong icon path.
    No, you are using the wrong target path.

    Ulrich

    Comment


    • #3
      Hi,
      I tried to create a desktop shortcut by right clicking the exe on the archive tab and then go to the file properties-shortcut tab and check the desktop option.
      after the installation, I right click on the desktop icon. Choose properties-shortcut tab and then click on the change icon option. It show "Windows can't find the file %programfiles%\xxxxx".

      Comment


      • #4
        Hi Ulrich,

        change the target path but I still have the same problem. the icon is not showing.

        Shell.CreateShortcut(startMenuFolder, "my app", SessionVar.Expand("%AppFolder%").."\\myapp.exe", "", SessionVar.Expand("%AppFolder%"), SessionVar.Expand("%AppFolder%\\myapp.exe"), 0, SW_SHOWNORMAL, nil, ProductName);

        If I right click the exe from the startmenu and choose properties-shortcut tab and then click on the change icon option. It show "Windows can't find the file %programfiles%\xxxxx"

        Comment


        • #5
          When I use the code posted above, the desired icon is being shown to me, so I cannot replicate this issue.

          The second problem you mention, that the correct path to the 32-bit ProgramFiles folder is being replaced with %ProgramFiles% in the icon path when you click the Browse button, is happening to me as well. This could be worth a look by the developers, but in any case it doesn't prevent the proper display of the desired icon.

          Ulrich

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎