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!

matt.luthi@gmail.com
Posts: 44
Joined: Thu Jun 20, 2013 4:42 am

Custom action run attached file (exe) creds popup on XP

Hi there,

I have a custom action that is run on un-install which is run before "Searches" Execution Stage. I run it as and attached file.
On XP x64, I am getting an OS credentials pop-up. This prevents the updater from completing an upgrade. Any thoughts?
.aip file is attached.

Thanks,
Matt
Last edited by matt.luthi@gmail.com on Thu Jul 04, 2013 1:43 am, edited 1 time in total.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom action run attached file (exe) creds popup on XP

Hello Matt,

I'm afraid I don't fully understand what is your behavior? Can you please give us more details about this (maybe exemplify)?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matt.luthi@gmail.com
Posts: 44
Joined: Thu Jun 20, 2013 4:42 am

Re: Custom action run attached file (exe) creds popup on XP

Hmm..

1. You have the .aip file so you will be able to retrace what I am writing here...
2. A custom action. Launch Attached File. Executable (*.exe). I named it KomodiaReportUninstall
3. Execution stage: just before "Searches", only for un-install.
4. Installation works fine.
5. When I un-install the program, Windows XP x64, I get a "Run As" (screen shot uploaded with this post) dialog pop-up
6. When I click "OK", the un-install completes fine.
7. But when your "Upgrader" downloads a new version, it first un-installs the program and then installs the new version. So this "Run As" will come up every time.
8. Because we need to run our "Updater" in silent mode, no user interaction desired, the auto update fails.

So my question is - how can I stop that "Run As" popup from showing up?
Attachments
RunAsDialog.png
RunAsDialog.png (24.17 KiB) Viewed 11269 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom action run attached file (exe) creds popup on XP

Hello Matt,

Can you please move the related custom action after "Install Execution Stage -> Preparing" action group and schedule it to run as deferred with no impersonation and see if the behavior still persist?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matt.luthi@gmail.com
Posts: 44
Joined: Thu Jun 20, 2013 4:42 am

Re: Custom action run attached file (exe) creds popup on XP

Have done so, nothing changed.

This happened when running "Run File". I changed it to "Run Installed File" and those dialogs went away.

Now - how can I launch a .bat file without having the popup appear? Unfortunately I have to register a dll that refuses to work with your com register function - even though I run Advanced Installer as admin.

Also - Is there a way to pass variables into a inline VB Script?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom action run attached file (exe) creds popup on XP

Hello Matt,
Now - how can I launch a .bat file without having the popup appear? Unfortunately I have to register a dll that refuses to work with your com register function - even though I run Advanced Installer as admin.
In order to achieve this you can try to implement the steps described in our "Hide command window" article.
Also - Is there a way to pass variables into a inline VB Script?
I'm afraid I don't fully understand what you mean. Can you please give us more details about your scenario (maybe exemplify)? If you want to get or set installer properties within your VBScript then you can use the Session.Property property.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matt.luthi@gmail.com
Posts: 44
Joined: Thu Jun 20, 2013 4:42 am

Re: Custom action run attached file (exe) creds popup on XP

In order to achieve this you can try to implement the steps described in our "Hide command window" article.
Well, I tried this from your article: createobject("WScript.Shell").run "MyBAT.bat", false

But... how can I pass the path to "MyBat.bat" file into the vbs custom action? I was unable to get the session.property to work. Would you be able to provide an example where you use the session.property to pass a file path variable into the script?

Thanks,
Matt
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom action run attached file (exe) creds popup on XP

Hello Matt,

For this you can add your BAT file as a temporary file to your project. Then, in order to pass the path of added temporary file to your custom action you can use its associated property. Go to "Files and Folders" page, select the BAT temporary file and from its context menu choose "Properties...". You can use the associated property from "Edit Temporary File" dialog. For example, you can use the following line of code in a .VBS custom action:

Code: Select all

createobject("WScript.Shell").run Session.Property("BAT_PROP"), false
If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dhermanconsulting
Posts: 2
Joined: Sat Sep 27, 2014 6:45 pm

Re: Custom action run attached file (exe) creds popup on XP

I appreciate this is an old thread, so apologies but I had the same issue (Windows XP invoking a "Run As" prompt during install) and this thread didn't really help me as I needed to use the "Run File" action. The issue was the the "Run As Administrator" check box under the custom action. For me this was redundant because I had the entire installer configured to run as admin, anyway.

Unchecking it for the Custom Action (But leaving it checked for the installer) cures the issue and the installer works fine on XP and Win 7.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom action run attached file (exe) creds popup on XP

Hello,

Thank you for posting your solution. I'm sure this will help future users facing with the same situation.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”