Page 1 of 2

Re-insert a file to the binary, .NET framework questions

Posted: Fri May 21, 2010 4:21 pm
by jdt2oo7
Hello all,

I am new to InstallAware and in the evaluation period of InstallAware. I have few questions:

1. Our products require to have .NET framework 2.0. In order to keep the binary (.exe setup file) small, installer checks if user's system have .NET framework 2.0 installed or not, if not we will download .NET then install. Can InstallAware do something similar? I know .NET can be included, then extract and be installed at runtime with InstallAware.

2. I got permission error when I try to write to HKCU location, do I need to get permission? If yes, is there instruction?

3. We have some tasks after uninstallation, I am wondering how we would do that with InstallAware? For example:
3a. At the end of uninstallation, open a web page (survey page) using default browser
3b. Delete some registry keys

4. Is it possible to re-insert a file to the binary (.exe setup file)? For example, we make some change to an xml file, we want to attach that file to an existing binary instead of repackage the binary. So that at the end of installation, new xml file will overwrite the old one.

I really appreciate your responses.

thanks!

Re: Re-insert a file to the binary, .NET framework questions

Posted: Thu May 27, 2010 5:52 pm
by MichaelNesmith
1. Yes, this is called WebAware installations/Partial Web Deployment; and is a key InstallAware benefit. Our whitepapers describe this feature in detail.
2. You can use Set Access Control to obtain permission. You may also need to set elevation settings for UAC.
3a. Call the Download File plug-in after Apply Uninstall. You could even integrate this into your setup UI - see our built-in samples for this.
3b. Call Delete Registry after Apply Uninstall.
4. How you can do this is by copying the file from $SFXPATH$ (or another suitable pre-defined variable pointing to your setup folder location) after Apply Install completes using Call DLL Function on kernel32.dll's CopyFileA.

Re: Re-insert a file to the binary, .NET framework questions

Posted: Tue Jun 08, 2010 6:10 pm
by jdt2oo7
Regarding WebAware installation with .NET framework:

Since we know a link from Microsoft providing a download for .NET framework, can we download from there then run installation? (http://go.microsoft.com/fwlink/?LinkId=51424).

I got the "Retry Extraction" error message: "Extraction of installation data downloaded from the web has failed...".

Thanks!

Re: Re-insert a file to the binary, .NET framework questions

Posted: Tue Jun 08, 2010 6:14 pm
by MichaelNesmith
You can download from any URL you like using Download File and then run it using Run Program (As).

You cannot of course use that URL as a web media block URL since you do not have the capability to upload your web media blocks to Microsoft's web servers :)

Re: Re-insert a file to the binary, .NET framework questions

Posted: Wed Jun 23, 2010 3:07 pm
by jdt2oo7
Thanks Michael,

I am editing the setupnet20 according to my need:

Set Variable SUCCESS to
Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 2.0

Download File http://go.microsoft.com/fwlink/?LinkId=51424 into $TEMPDIR$ (get result into variable SUCCESS)

Run Program under UAC $TEMP$\dotnetfx.exe (WAIT, get result into variable SUCCESS)

Apply Install (get result into variable DOTNET20)

-------

I checked TEMPDIR location, but doesn't see the file get download, what do I do wrong here?

Thanks!

Re: Re-insert a file to the binary, .NET framework questions

Posted: Wed Jun 23, 2010 5:49 pm
by MichaelNesmith
Take a look at the file that's been downloaded - is it the actual file?

Also, you are using $TEMPDIR$ and $TEMP$ - are they both pointing at the same place?

Re: Re-insert a file to the binary, .NET framework questions

Posted: Wed Jun 23, 2010 5:56 pm
by jdt2oo7
Yes, it should be "dotnetfx.exe" file.

Yes, I noticed that after I posted and already both to $TEMPDIR$

Thanks!

Re: Re-insert a file to the binary, .NET framework questions

Posted: Wed Jun 23, 2010 8:36 pm
by MichaelNesmith
So where is dotnetfx.exe? Is it not in place after the call to Download File? That's what you first need to establish.

Re: Re-insert a file to the binary, .NET framework questions

Posted: Thu Jun 24, 2010 10:16 am
by jdt2oo7
Yes, that's what I am trying to verify and that's why I want to make sure this command is correct:

Download File http://go.microsoft.com/fwlink/?LinkId=51424 into $TEMPDIR$ (get result into variable SUCCESS)

I added a messagebox after this command to pause the installation, then to go temp location but I didn't see the download file.

thanks!

Re: Re-insert a file to the binary, .NET framework questions

Posted: Thu Jun 24, 2010 6:33 pm
by MichaelNesmith
So what is the result of the Download File call, then?

Re: Re-insert a file to the binary, .NET framework questions

Posted: Fri Jul 16, 2010 5:40 pm
by jdt2oo7
The value of the result of the Download File call is SUCCESS (attached screenshot).

Thanks!

Re: Re-insert a file to the binary, .NET framework questions

Posted: Mon Jul 19, 2010 2:58 pm
by mills
What is the value of $TEMPDIR$?

Recommend messagebox text:

Downloaded into:
$TEMPDIR$

$RESULT$

Re: Re-insert a file to the binary, .NET framework questions

Posted: Mon Jul 19, 2010 4:23 pm
by jdt2oo7
$TEMPDIR$: C:DOCUME~1\XPMUser\LOCALS~1\Temp
I actually see a blank message when display result of download command now.

======
Set Variable RESULT to

Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 2.0

Download File http://go.microsoft.com/fwlink/?LinkId=51424 into $TEMPDIR$ (get result into variable $RESULT$)
MessageBox: Download into:, $TEMPDIR$

MessageBox: Download result, $RESULT$

Re: Re-insert a file to the binary, .NET framework questions

Posted: Mon Jul 19, 2010 10:32 pm
by mills
I think it's a bug, but I noticed that adding an extra slash throws things off...

Try $TEMPDIR$filename instead of $TEMPDIR$\filename

As you can see from your screenshot, the last slash is being included int he $TEMPDIR$:
C:\...\Local~\temp
so if you add a slash yourself it will read:

C:\...\Local~\temp\\filename

which isn't a proper filepath...

This worked for me:

Code: Select all

Display Dialog: progress, use as progress dialog (non-modal)
 
Download File http://go.microsoft.com/fwlink/?LinkId=51424 into $TEMPDIR$dn2.exe (get result into variable myResult)
 
Run Program under UAC $TEMPDIR$dn2.exe , startup in folder $TEMPDIR$ (WAIT)
 
Hide Dialog
Note, adding the progress dialog gives the user indication that some work is being done, too.

Re: Re-insert a file to the binary, .NET framework questions

Posted: Wed Jul 21, 2010 5:28 pm
by jdt2oo7
Thanks Andy.

I can see the downloaded file now, but I am seeing installation error of the .NET package. Please see attached image for error message.

I notice that download was quite fast, could it be that file is not downloaded completely? or corrupted?

Thanks!