Prerequisites Elevated - Advanced Installer Community
pgonline
Posts: 3
Joined: Fri Dec 23, 2016 4:36 pm

Prerequisites Elevated

Hello,

I'm getting some issues with an msi that I made that have some prerequisites that do not run on windows 10.
for instance one of them is a bat file to make a symbolic link:
mklink /D "c:\program files\test\test1" "c:\program files (x86)\test\test1"

I think this is related to UAC.

I tested to add other msi files as prerequisites and none is installed.

Can you help with that, but without make an exe?

Best regards,
PG
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Prerequisites Elevated

Hi PG and welcome to Advanced Installer forums,
I'm getting some issues with an msi that I made that have some prerequisites that do not run on windows 10.
[...]
without make an exe?
If you want the package type as an .MSI, you can add the related prerequisites as feature-based prerequisites. Note that the Pre-Install prerequisites are handled by our EXE bootstrapper.
Please take a look on our Frequently Asked Questions about prerequisites article which may be useful to you.

To create a Symbolic Link during installation you can use the predefined Launch File custom action to call cmd.exe with the corresponding parameters. You can use the below image for your reference.
Create Symbolic Link using CA.png
Create Symbolic Link using CA.png (43.24 KiB) Viewed 3560 times
Please note that you have hard coded paths, which is not recommended. Note that the Command Line field is of Formatted Type and thus it can include references to files, folders and properties.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pgonline
Posts: 3
Joined: Fri Dec 23, 2016 4:36 pm

Re: Prerequisites Elevated

Hello,

I do exactly what you have in the picture and that doesn’t work.
That open a cmd window empty, and stay forever, if you close it they give an error on the installer, if you type exit they continue with the install but doesn’t do the mklink.

Any clue what is wrong?

PG
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Prerequisites Elevated

Hi PG,

Can you please tell me if you are able to successfully run this statement in the CMD:

Code: Select all

mklink /D "c:\program files\test\test1" "c:\program files (x86)\test\test1"
Does it create the Symbolic Link?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pgonline
Posts: 3
Joined: Fri Dec 23, 2016 4:36 pm

Re: Prerequisites Elevated

Hello Dan,

If I run the cmd as administrator it create the link.

~PG
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Prerequisites Elevated

Hello,

Can you please try to enable the Run as administrator option and disable the Run under the LocalSystem account with full privileges (no impersonation) from the custom action properties and see if the behaviour still persists?

Let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”