+ Reply to Thread
Results 1 to 6 of 6

Thread: Create symbolic links in the Script Editor

  1. #1
    LiquidIce Guest

    Default Create symbolic links in the Script Editor

    Hey guys,

    Is there any way to make the installer create SYMBOLIC links? I tried a "Run command line mklink /D "%USERPROFILE%\Google Drive\Desktop" %USERPROFILE%\Desktop" But it does not accept environment variables %USERPROFILE% because it says that its not defined. Is there a way to solve this?

    Thank you!

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

    Default Re: Create symbolic links in the Script Editor

    Hello,

    Because the percent sign is used to signify the value of a variable, you need to use two percent signs next to each other if you want to use a percent sign in the message text of a script command. %%USERPROFILE%% should work fine.

    BTW, there is a "Get System Info" -> "Expand Environment Variable" script function to retrieve a specific Windows environment variable value (in case you need this).

    Does this help?

    Support for symbolic links (NTFS junctions) is planned for SetupBuilder 9.

    Friedrich

  3. #3

    Default Re: Create symbolic links in the Script Editor

    Hello Friedrich,

    First of all, thanks for the help. I tried running a console command doing this:
    Code:
    mklink /D "%%USERPROFILE%%\Google Drive\UZ-Desktop" %%USERPROFILE%%\Desktop
    I wasn't sure this worked or not so what I did was add an output to, this:

    Code:
    mklink /D "%%USERPROFILE%%\Google Drive\UZ-Desktop" %%USERPROFILE%%\Desktop > %%USERPROFILE%%\Desktop\output.txt
    But that did nothing. On both Run Command Line I activated Show Window, but it doesn't do anything. Here is a screenshot of where its placed in the Script Editor.


    Any tips?

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

    Default Re: Create symbolic links in the Script Editor

    Hello Alejandro,

    mklink is a subcommand of CMD.EXE. That means you have to launch the command interpreter and must be run "inside" of CMD.EXE

    Something like:

    cmd.exe /C mklink yada yada

    Does this help?

    Friedrich

  5. #5

    Default Re: Create symbolic links in the Script Editor

    Thanks Friedrich,

    That worked perfectly, it even bypassed the fact that .bat or cmd files require administrator permissions to create a symbolic link.

    I'll be having some questions in the future because we bought this software and now we're really using it a lot and I'm new to it.

    Thanks and regards

  6. #6
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Create symbolic links in the Script Editor

    Perfect! Glad it's working fine now.

    Always ask if there is any question. I am here to help

    Friedrich

+ 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
  •