Announcement

Collapse
No announcement yet.

CreateShortcut

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

  • CreateShortcut

    Newbie here - I am trying to create a shortcut that opens a command window in the application folder.

    My approach was to create an On Post Install action as so:

    Shell.CreateShortcut(SessionVar.Expand("%AppShortc utFolderName%"), "Command Window", _WindowsFolder.."\\system32\\cmd.exe", "", SessionVar.Expand("%AppFolder%"), "", 0, SW_SHOWNORMAL, nil, "", START_OPTION_DEFAULT);


    Setup log is attached - getting a 2300 error - could not create the folder for the shortcut. Which to me is odd since the log shows the folder being created successfully
    Create folder: C:\Users\tlillys\AppData\Roaming\Microsoft\Windows \Start Menu\Programs\MINTEQA2\

    ​and shortcuts are added to the folder and show up under Start.
    Any help is appreciated.
    Attached Files

  • #2
    %AppShortcutFolderName% does not hold the path, just the name of the shortcut folder, by default it is %ProductName%, and "MINTEQA2" is not a valid path.
    What you are looking for, I believe, I something more like this:
    Code:
    Shell.CreateShortcut(SessionVar.Expand("%StartProgramsFolder%\\%AppShortcutFolderName%"), "Command Window", _WindowsFolder.."\\system32\\cmd.exe", "", SessionVar.Expand("%AppFolder%"), "", 0, SW_SHOWNORMAL, nil, "", START_OPTION_DEFAULT);
    Ulrich

    Comment


    • #3
      Thank you, Ulrich. Appreciate the help.

      Comment

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