PDA

View Full Version : Running downloaded EXE



NewsArchive
06-10-2010, 01:41 AM
This question is probably common.

Using 64 bit Windows 7

I download an EXE using the "Download FIle" script and place it in the
%TMPDIR% location.

I then use the RUN PROGRAM script with the "Use Shell Execute" box checked
and also check the "Run elevated...."

My first Setupbuilder EXE has Requirements -> Administrator rights selected
and is digitally digned.

The EXE I am downloading also a SetupBuilder created installer and has
"Requirements -> Administrator Rights and is digitally signed. It is also
manifested. If downloaded directly it will run. It is my typcaila dn rpven
installer EXE

After the EXE is downloaded it is not executed on 64 bit Windows 7.

Can someone please assist me ?

Thank you,

Mike

NewsArchive
06-10-2010, 01:41 AM
Top of my head without actually trying it, Mike, what I'd suggest is just
trying plain "run".

If your installer is already running elevated (requireAdministrator
manifest, not just "administrator rights" selected in SB) it's already in a
context that can run other elevated programs without ShellExecute or other
slight-of-hand.

Also... have you verified that the downloaded exe is where you expect it to
be? Friedrich uses a GUID-named folder inside of the temp folder for
tempdir.

Jane

NewsArchive
06-10-2010, 01:42 AM
Hi Jane,

Thanks for your response.

> Top of my head without actually trying it, Mike, what I'd suggest is just
> trying plain "run".

That was the first I tried.

> If your installer is already running elevated (requireAdministrator
> manifest, not just "administrator rights" selected in SB) it's already in
> a context that can run other elevated programs without ShellExecute or
> other slight-of-hand.

How do I manifest the setupbuilder created EXE to run "elevated" ?

I do it regularly for the EXE files that I am distributing but not for the
EXE that SetupBuilder creates.

> Also... have you verified that the downloaded exe is where you expect it
> to be? Friedrich uses a GUID-named folder inside of the temp folder for
> tempdir.

Yes, the downloaded EXE in proper location.

What is odd is I go through this process twice the second time it works.

Mike

NewsArchive
06-10-2010, 01:43 AM
It defaults to requireAdministrator when you create a new project (pic)

Weird that it works the second time - with the identical script line?

If you do an If File Exists then message "it's here" before running it, does
it show as present?

If so, does Get File Info /CRC or Get File Info code-signed give any
insight (possibly not completely downloaded into TMPDIR?)

Jane Fleming

NewsArchive
06-10-2010, 01:43 AM
> It defaults to requireAdministrator when you create a new project (pic)

Ok

> Weird that it works the second time - with the identical script line?

Identical!

> If you do an If File Exists then message "it's here" before running it,
> does
> it show as present?

I did a DisplayMessage and displayed the %TMPDIR%/Filename that it used for
the download.
I then navigated to that location and the file was there.


> If so, does Get File Info /CRC or Get File Info code-signed give any
> insight (possibly not completely downloaded into TMPDIR?)

Will check.

Thanks for your time !

Mike

NewsArchive
06-10-2010, 01:44 AM
Jane,

With all my combinations and permutations of thinsg I had turned that
"Require Admin" off. Ugh.

All is OK now.

Thank you!

Mike

NewsArchive
06-10-2010, 01:44 AM
Cool!

jf

NewsArchive
06-12-2010, 02:01 AM
Well I guess its not working. Have a number of reports saying that after the
download is complete the installer just vanished.

So will see what else I can do.

M

NewsArchive
06-12-2010, 02:01 AM
Argh

Mike, what are you trying to accomplish by downloading and running this way?

jf

NewsArchive
06-13-2010, 04:07 AM
Mike,

> Well I guess its not working. Have a number of reports saying that after
> the download is complete the installer just vanished.
>
> So will see what else I can do.

I have developed a SetupBuilder 7.2 demo for you.

The "main" installer downloads a "client" installer from our web site.
After that, the downloaded client installer is launched and waits until the
program has finished.

Demo installer:
http://www.lindersoft.com/projects/download_demo.exe

Demo source code projects:
http://www.lindersoft.com/projects/download_demo_src.zip

Does this help?

Friedrich

NewsArchive
06-14-2010, 01:15 AM
> Mike, what are you trying to accomplish by downloading and running this
> way?

All of my users are at variuos level of expiration f their maintenance
plans.
They all have a Product Control Code that they use to activate their
software.
That PCC contains the expiration date of their maintenance plan.

I have them paste this PCC into the installaer and based on their
maintenance expiration date the
installer downloads the appropriate installation or updating EXE.

Mike

NewsArchive
06-14-2010, 01:16 AM
Thank you very much Friedrich.

I'll check it out and compare to my coding.

Mike

NewsArchive
06-15-2010, 01:37 AM
Hi Friedrich,

I was exiting the first installer immediately after issuing the RUN command.

I changed it to use the "Wait" flag and then have the first isntaller exit
after the second installer was completed. This seems to work better.

I also was using a "Progress" dialog box instead of the "Wait" one you used.
Do you prefer either ?

Thanks again...we'll see how this goes.

Mike

NewsArchive
06-15-2010, 01:37 AM
Hi Mike,

> I also was using a "Progress" dialog box instead of the "Wait" one you
> used. Do you prefer either ?

You can use the "Progress" dialog without any problem. It displays both the
overall installation and download progress.

Friedrich