+ Reply to Thread
Results 1 to 4 of 4

Thread: script question about shortcut creation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2015
    Location
    CA, Unitedd States
    Posts
    130

    Question script question about shortcut creation

    Hello:

    I am making a template file for all my setups to follow a set of standards and it came to develop the shortcuts and related functionality on the dialog. I decided to do something a little different this time around and give the user a bit of control over where the short cuts go; on the desktop, on the top of the start menu/programs panel (classic start menu / default XP menu respectively). I added the check boxes dialog in the dialog visualizer and hopefully got the text entered in right for the check boxes themselves. I then assigned the value of the check boxes to be stored in $_SB_PARAM1% variable with an initial value of 10 (shortcut defaults on desktop but not on top of start). Now, let's see if I got the script statements right to create the shortcuts correctly:

    Code:
    If %_SB_PARAM1% Equals "11" Then
       ::Create Shortcut "My Cool App" in "\My Cool App"  (Always Install)
       ::Create Shortcut "My Cool App" in "Desktop\My Cool App"  (Always Install)
    ElseIf %_SB_PARAM1% Equals "10" Then
       Create Shortcut "My Cool App" in Custom\%_CSIDL_DESKTOP%\My Cool App
    End
    ElseIf %_SB_PARAM1% Equals "01" Then
    Create Shortcut "My Cool App" in Custom\%_CSIDL_STARTMENU%\My Cool App
    End
    End
    the question is "Did I get this right?" I have read the documentation, studied it and this is the first time I am trying this particular approach in my installers where as before the shortcuts would have to be un-selected as part of a custom install.

    the particular wording on my check boxes is

    Create a shortcut on my &Desktop|Create a shortcut on the &Top of the Start Menu|
    After looking over the documentation I couldn't tell if there was a space between the | and the next check box or radio button.

    Note that since this is a template, I haven't taken the time to define files to install. this is just a starting point for future so I'm not having to re-invent the wheel.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: script question about shortcut creation

    Hello,

    Instead of If/ElseIf Equals I would suggest to use Equals "1" On Position

    Does this help?

    Friedrich

  3. #3
    Join Date
    Apr 2015
    Location
    CA, Unitedd States
    Posts
    130

    Default Re: script question about shortcut creation

    Can I get a further explanation on this?

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: script question about shortcut creation

    Hello,

    There is a very good explanation in the "Learning SetupBuilder Part I" online help (see attached screenshot).

    Does this help?

    Friedrich
    Attached Images Attached Images  

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •