Bobbloggs89
Posts: 6
Joined: Mon Feb 07, 2022 5:01 pm

Error during install.

Mon Feb 07, 2022 5:20 pm

Hi,

I'm trying to create a package by incorporating a batch file into it but getting an issue as per attached screenshot.

The application is readily available from https://github.com/forcedotcom/dataloader.

I have attached my project, the batch file and the screenshot.

Any guidance, would be awesome.

Thank you.
Attachments
Screenshot 2022-02-07 161502.jpg
Screenshot 2022-02-07 161502.jpg (169.95KiB)Viewed 7563 times
install.txt
(5.81KiB)Downloaded 236 times
Dataloader.aip
(81.55KiB)Downloaded 232 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Error during install.

Thu Feb 10, 2022 10:21 am

Hello Bob and welcome to our forums,

From what I can see, you are adding the .BAT file in your project and then launch it through a "Launch File" custom action.

I am assuming that what is seen in the screenshot is the output of the .BAT file (please correct me if I'm wrong).

If that is the case, the error is related to the batch file and not your main project. By the look of it, I would assume that is a permissions issue.

Could you please go to "Custom Actions" page --> select the "Launch File" custom action --> check the "Run as administrator" option and let me know if that helps?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Bobbloggs89
Posts: 6
Joined: Mon Feb 07, 2022 5:01 pm

Re: Error during install.

Thu Feb 10, 2022 6:02 pm

Hi Catalin,

Thank you , good to be here. :)

Tried your suggestion unfortunately it didn't work.

Your correct the output from my previous screenshot is from the batch file.

Attached a screenshot of my Custom Actions window.

Got the same error as per my initial screenshot.

Hope it helps.
Attachments
Screenshot 2022-02-10 170145.png
Screenshot 2022-02-10 170145.png (63.07KiB)Viewed 7545 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Error during install.

Mon Feb 14, 2022 1:54 pm

Hello Bob,

This is quite strange, indeed.

It looks like this is not a permission issue, although the encountered message would suggest so.

If possible, could you please forward me a download link for the setup package by email at support at advancedinstaller dot com (the github link you provided does not seem to have the setup MSI/EXE under "Releases", or perhaps I somehow missed it)?

Additionally, does the creation of the shortcut work outside of Advanced Installer (e.g. if you simply launch your .BAT file from command line)?


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Bobbloggs89
Posts: 6
Joined: Mon Feb 07, 2022 5:01 pm

Re: Error during install.

Tue Feb 22, 2022 6:10 pm

Hi,

Apologies for the delay, just got back from hols.

Just sent a response to the support e-mail address as per above.

Thank you.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Error during install.

Fri Feb 25, 2022 2:56 pm

Hello Bob,

No worries about the reply. I hope you enjoyed your days off! :)

Thank you for the provided files!

Regarding this issue, I indeed managed to reproduce quite the same behavior, but it looks like the shortcut is still created on my machine.
ShortcutCreated.png
ShortcutCreated.png (529.84KiB)Viewed 7453 times

The "Start Menu" shortcut is also created as expected.

Now, this error, from what I know, is a System error (0x3).

On your machine, is the shortcut not created at all?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Bobbloggs89
Posts: 6
Joined: Mon Feb 07, 2022 5:01 pm

Re: Error during install.

Mon Feb 28, 2022 6:39 pm

Hi Catalin,

Any time off work is good :D

Thank you for continuing to look into this.

Apologies should of clarified, issue seems to occur when a user (without admin rights) tries to install the software - is there any way to get around this?

Thank you.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Error during install.

Wed Mar 02, 2022 5:05 pm

Hello Bob,
Any time off work is good
That's for sure! :)
Apologies should of clarified, issue seems to occur when a user (without admin rights) tries to install the software - is there any way to get around this?
Are you positive that this is the case? I am asking this because, from what I can see in your project, the "Installation Type" is set to "Per-machine only (fails if user is not administrator)".

What this means is basically when the user will try to install it, the installation location is a per-machine one and therefore admin rights will be required. If the user is indeed not an administrator, then the UAC should prompt the user to enter the credentials (username and password) of an administrator user.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Bobbloggs89
Posts: 6
Joined: Mon Feb 07, 2022 5:01 pm

Re: Error during install.

Mon Mar 21, 2022 4:32 pm

Hi Catalin,

Definitely creates no icon nor brings up any prompt.

Is there something I need to change so that any user can install without admin prompt or admin rights?

Thank you.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Error during install.

Mon Mar 21, 2022 6:50 pm

Hello Bob,

To avoid the UAC prompt, some things are required:

- first of all, you need to set the "Installation Type" to "Per-user only" in the "Install Parameters" page

The above will ensure that your files from "Files and Folders" page --> "Application folder" will be installed in a per-user location (e.g. %appdata%)

- besides that, you need to make sure that no other files are installed in a per-machine location (such as the Program Files & Program Files (x86) folders)

- the same as above goes for registry entries as well (i.e. your setup should not try to write in a per-machine location such as the HKEY_LOCAL_MACHINE)

- additionally, your custom actions should also not require administrator privileges. For instance, if a shortcut is created (like in your case), you need to make sure the shortcut is created for the user that performs the installation, not on the Public Desktop (available for all users)

This should pretty much be all.

Hope it helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Bobbloggs89
Posts: 6
Joined: Mon Feb 07, 2022 5:01 pm

Re: Error during install.

Wed Aug 24, 2022 11:25 am

Thanks for this Catalin.

Can you please advise on how I use Advanced Installer to set the app to:

Make sure the shortcut is created for the user that performs the installation, not on the Public Desktop (available for all users)

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Error during install.

Fri Aug 26, 2022 11:12 am

Hello,

You are always welcome!
Can you please advise on how I use Advanced Installer to set the app to:

Make sure the shortcut is created for the user that performs the installation, not on the Public Desktop (available for all users)
Regarding the above, this is achieved by:

- setting the installation type to "Per-user only" in "Install Parameters" page

- creating the shortcut on the Desktop, as usual

After installation, you can check this by opening the following location:

Code: Select all

C:\Users\Catalin\Desktop
and seeing if the shortcut is there.

The per-machine location for the above would be:

Code: Select all

C:\Users\Public\Desktop
Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”