Reboot after .Net Framework 4

Got a problem you cannot solve? Try here.

Reboot after .Net Framework 4

Postby QooScho » Mon Oct 10, 2011 5:17 am

Hello,

I use IA 11.
In my setup script I check if .NET Framework 4 is installed. If not it will be installed with
setupnet4aip_x64 or _x86

My problem is:
After starting the wizard, the .NET Framework 4 will be installed but then, after installing the wizard starts with the normal installation of my files.
But first I need a reboot of the computer.

How can I enforce a reboot after .NET installation before the wizard goes to the normal setup?

------------------------------------------------------------------------------

if Variable DOTNET40_X64 Equals FALSE
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 4.0 (x64)
Set Variable DOTNET40_FILEBAG_X64 to
Set Variable DOTNET40_RESULT_X64 to
Set Variable DOTNET40_ERROR_X64 to
Get Common Folder Location Special->Boot Path into DOTNET40_BOOTPATH_X64
Define File Bag : #IADIR#\runtimes\netfx_extended_x64\*.*, include files recursively, get runtime location of files into variable DOTNET40_FILEBAG_X64
Install/Remove MSI Package $DOTNET40_FILEBAG_X64$\netfx_extended_x64.msi[VSEXTUI=1 TRANSFORMS=netfx4_aip.mst] (get result into variable DOTNET40_RESULT_X64)
if Variable DOTNET40_RESULT_X64 Equals REBOOT
MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
if Variable REBOOTNOW Equals OK
Reboot Computer and Resume Setup
else
Terminate Installation
end
end
if Variable DOTNET40_RESULT_X64 Equals ERROR
MessageBox: $TITLE$ Setup, Microsoft .NET Framework 4.0 (x64) could not be installed. $DOTNET40_ERROR_X64$$NEWLINE$$NEWLINE$Please use Windows Update to manually install this update on your system.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
Terminate Installation
end
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end


regards
Hansjoerg
QooScho
 
Posts: 127
Joined: Fri Apr 15, 2011 1:02 am

Re: Reboot after .Net Framework 4

Postby giaviv » Mon Oct 10, 2011 1:19 pm

Hi,

We have been having some issues with the Reboot Computer and Resume Setup command - please try writing the RunOnce key manually to the registry:
http://msdn.microsoft.com/en-us/library ... 77(v=VS.85).aspx
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
giaviv
 
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Reboot after .Net Framework 4

Postby QooScho » Tue Oct 11, 2011 12:02 am

Dear Aviv,

your link does not work!

can you please give me the correct one and what exact I have to do?

What do you mean with "RunOnce" , on with PC?
Only on the pc where IA 11 is installed and where I create my setups?

regards
Hansjoerg
QooScho
 
Posts: 127
Joined: Fri Apr 15, 2011 1:02 am

Re: Reboot after .Net Framework 4

Postby giaviv » Tue Oct 11, 2011 10:00 am

Here is the correct link:
http://msdn.microsoft.com/en-us/library ... 77(v=VS.85).aspx

RunOnce is a registry value that you can set. Setting it with your setup will cause it to run once after a reboot.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
giaviv
 
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Reboot after .Net Framework 4

Postby QooScho » Fri Oct 14, 2011 12:06 am

Hello Aviv,

I know what "RunOnce" can do, but:

1. How can I set this value and which value I have to set? From the Installer Setup?

2. I only want that Installer Setup stops after Framework 4 was installed, Why does this not work?

Please give me a little bit more details how can I make a stop and reboot of installing after Framework 4 is isntalled

regards
Hansjoerg
QooScho
 
Posts: 127
Joined: Fri Apr 15, 2011 1:02 am

Re: Reboot after .Net Framework 4

Postby giaviv » Fri Oct 14, 2011 9:26 am

Could you please clarify what it is exactly that you're trying to do? I am a little confused.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
giaviv
 
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Reboot after .Net Framework 4

Postby QooScho » Tue Oct 18, 2011 1:15 am

As you can see in my first post, I use the "checknet" and "setupnet4aip_x64 or _x86" to install .NET Framework 4.
When I start my installer setup (IA11) and .NET Framework 4 is not on the PC, IA will install it. Thats ok.
But then the installation of the product and other parts proceeds.
After installation I get an error from my application because this product needs .NET Framwork 4. Then I first have to reboot the pc.
So the problem is that after "setupnet4aip_x64 or _x86" the installation should stopp, reboot the PC and then resume with the setup of the other parts.
In the script "setupnet4aip_x64 or _x86" I can see this:

if Variable DOTNET40_RESULT_X64 Equals REBOOT
MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
if Variable REBOOTNOW Equals OK
Reboot Computer and Resume Setup
else
Terminate Installation
end
end

But I can never see this message while installing .NET Framework 4.

Again: what I need is that installation should stop after .NET Framework 4 installation, reboot the pc and then resume with the rest of the installation.

regards
Hansjoerg
QooScho
 
Posts: 127
Joined: Fri Apr 15, 2011 1:02 am

Re: Reboot after .Net Framework 4

Postby giaviv » Tue Oct 18, 2011 9:03 am

Hi,

So basically the variable DOTNET40_RESULT_X64 never gets set to REBOOT?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
giaviv
 
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Reboot after .Net Framework 4

Postby QooScho » Wed Oct 19, 2011 1:17 am

Hi,
<<So basically the variable DOTNET40_RESULT_X64 never gets set to REBOOT?

yes, I think so, but this is why I ask here, why this happens?

regards
Hansjoerg
QooScho
 
Posts: 127
Joined: Fri Apr 15, 2011 1:02 am

Re: Reboot after .Net Framework 4

Postby giaviv » Wed Oct 19, 2011 1:07 pm

Hi,

Are you sure that a restart is indeed necessary? This value is not returned from InstallAware but rather from the installation of the binary.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
giaviv
 
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Reboot after .Net Framework 4

Postby gonpla » Thu Oct 27, 2011 10:32 am

My only asked me to reboot into Windows XP, in 7 no. The problem is that if it is not installed properly reset the Crystal Reports for. NET 4 runtime. I've solved it by putting before "if DOTNET40CLIENT_RESULT_X64 Variable Equals REBOOT" the following:
"Set Variable DOTNET40CLIENT_RESULT_X64 to REBOOT".
I do not like the idea of ​​having to reboot, because I do remote installations. Anyone have another idea?
Thank you.
gonpla
 
Posts: 40
Joined: Tue Sep 06, 2011 8:47 am

Re: Reboot after .Net Framework 4

Postby stucotts » Wed Nov 09, 2011 9:20 pm

>>Hi,

>>We have been having some issues with the Reboot Computer and Resume Setup command - please try writing the RunOnce key manually to the registry:
>>http://msdn.microsoft.com/en-us/library ... 77(v=VS.85).aspx


I'm wondering if you can elaborate on this one, I have developer (means I cant debug), I have an install of a dotnet app, installing 4.0 client. After the framework is installed, it is not going through a reboot, when my application runs at the end of the install it fails, a restart runs it correctly. The end result is I need InstallAware to do a reboot after the framework install and it is not.

I am using the wizards to create the install as I need to write code for the app, can InstallAware do the needed reboot or do I need to tell my customers to reboot
stucotts
 
Posts: 3
Joined: Sun Mar 15, 2009 4:28 pm

Re: Reboot after .Net Framework 4

Postby giaviv » Thu Nov 10, 2011 8:58 am

Please try displaying the variable that installing .NET returns - does it indeed return REBOOT or does it return SUCCESS?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
giaviv
 
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Reboot after .Net Framework 4

Postby stucotts » Thu Nov 17, 2011 11:54 pm

giaviv wrote:Please try displaying the variable that installing .NET returns - does it indeed return REBOOT or does it return SUCCESS?


Many thanks, I haven't learned the scripting lanquage yet, would you mind posting a sample as to how to display a variable

Thanks
stucotts
 
Posts: 3
Joined: Sun Mar 15, 2009 4:28 pm

Re: Reboot after .Net Framework 4

Postby giaviv » Fri Nov 18, 2011 12:37 pm

No problem - the best way to do so is to use the MessageBox command - just begin typing MessageBox at the line of MSIcode in which you wish it to be created.
Then, in the body of the MessageBox, enter the variable name surrounded by $ - for example, $VARIABLE$
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
giaviv
 
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Next

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 4 guests