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!
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
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.
http://cl.ly/image/3Z1l1A2K1J0u/Scre...2014.44.01.png
Any tips?
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
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
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