Creating symbolic link - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

HellBrick
Posts: 2
Joined: Fri May 27, 2011 9:24 pm

Creating symbolic link

Hi, I need help on creating symbolic link to a folder. I used InnoSetup previously, and the task was solved by launching cmd executable:

Code: Select all

[Run]
Filename: {cmd}; Parameters: "/c ""mklink /d ""{app}\Scenario\Custom\Saved games"" ""{app}\Save"" "" "
(double quotes are for escaping)

I guess the similar approach should be used in AI as well, but I can't figure out the corresponding custom action at all. I can't find an adequate way to get cmd path for both x86 and x64 system, I don't get what type of action to use and worst of all, error message and log don't really point to what's wrong. My best attempt at the moment:

Code: Select all

"[System64Folder]cmd.exe /c "mklink /d "[APPDIR]Scenario\Custom\Saved games" "[APPDIR]Save" "
(It's EXE with working directory 'full path')

If I copy generated command line from the log window and paste it into Win+R window, it works as it's supposed to. But it doesn't work in installer. Any ideas?
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: Creating symbolic link

Hi,

You can run a CMD through a Launch file or open URL predefined custom action from Custom Action Page.
In case you need a 64-bit CMD use another predefined custom action called Launch file or open URL Using a 64-bit Launcher.
Add your custom command line parameter in Command Line field from Custom Action Properties.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
HellBrick
Posts: 2
Joined: Fri May 27, 2011 9:24 pm

Re: Creating symbolic link

Thanks, switching to "Launch file or open URL" does the trick. It even solves the problem with generic path to cmd.exe, since simple "cmd /c ..." works. The last thing left is to figure out how to launch cmd in a silent mode (unfortunately, it's impossible to execute mklink directly), but that seems to be google-able.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Creating symbolic link

Hello,

Here is a thread that has a couple of scenarios on how to hide the cmd window.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”