Run .Net Installer Class not working on Windows 2008 R2

Got a problem you cannot solve? Try here.
adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby adi » Thu Sep 23, 2010 3:48 am

Hello,

I was using a fixed path to .NET Framework 2.0. Until yesterday I wasn't aware that .NET Framework 4.0 isn't just an extension to 2.0 like 3.0/3.5 were.
I have planned to write some detection code in the next version of our application (currently we support only 3.5). As a basis I will probably use the same scripts as IA is using when installing prerequisites or just check the folder existence.

Best regards,
adi

rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby rasmusw » Mon Sep 27, 2010 6:51 am

Hello Andy Mills.
Have you been able to reproduce the problem using the sample I posted?

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby mills » Mon Sep 27, 2010 8:56 pm

Does this change (line 228) make the difference for you:

Code: Select all

    Comment: Install Assembly C:\temp\installnetservice\installfile\OCSMobileStatusService.exe to $TARGETDIR$
      *becomes
    Install Files C:\Users\d\Desktop\testFiles\installnetservice\installfile\OCSMobileStatusService.exe to $TARGETDIR$

    Apply Install (get result into variable SUCCESS)
    if Variable SUCCESS not Equals ERROR
      if Variable SUCCESS not Equals CANCEL
        Run .NET Installer Class $TARGETDIR$\OCSMobileStatusService.exe
      end
    end
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby rasmusw » Tue Sep 28, 2010 3:16 am

I changed the code to:

Code: Select all

    Comment: Install Assembly C:\temp\installnetservice\installfile\OCSMobileStatusService.exe to $TARGETDIR$
    Install Files C:\temp\installnetservice\installfile\OCSMobileStatusService.exe to $TARGETDIR$
    Apply Install (get result into variable SUCCESS)
    if Variable SUCCESS not Equals ERROR
      if Variable SUCCESS not Equals CANCEL
        Run .NET Installer Class $TARGETDIR$\OCSMobileStatusService.exe
      end
    end

But I think the problem lies in the "Run .NET Installer Class" function, and not the "Install Assembly" function.
The file is copied no matter whether the script uses "Install Files" or "Install Assembly".

Process Monitor still indicates that the installer looks for installutil.exe in c:\users\rw\WINDOWS\...

figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby figo » Wed Sep 29, 2010 2:12 pm

I didn't find the solution. Instead I'm using a workaround and calling the installutil.exe directly.
I see that you have found more than I. It looks like some paths problem. I hope that IA team can now reproduce and fix the problem.


We are currently experiencing the same issue on an XP machine that ONLY has .NET 4.0 Framework installed. I suspect that it may be related to a path issue as indicated on any earlier post.

I am currently running IA 9.
--------

If all else fails, Improvise!

http://www.luiscasillas.com

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby mills » Wed Sep 29, 2010 4:56 pm

Is anyone using InstallAware 9 R2 (Build Moya.sp3)?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby figo » Wed Sep 29, 2010 5:04 pm

We haven't upgraded just yet. Are there any relevant updates to R2 that address these issue?
--------



If all else fails, Improvise!



http://www.luiscasillas.com

rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby rasmusw » Wed Sep 29, 2010 8:00 pm

I tried this on both R2 plain and on SP3. The problem is on both.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby mills » Wed Sep 29, 2010 10:37 pm

I have validated the assemblies you're using are good.

What exactly are the Expected and Actual results when you call Run .Net Installer Class?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby figo » Wed Sep 29, 2010 10:40 pm

In my case,
the .NET Install Class registers my service fine when I have a system with .NET 3.5 + .NET 4.0. The service fails to install and register my service when I attempt to install on a XP with ONLY .Net 4.0 (full) installed.

Unfortunately the function does not return an error code so I do not know exactly why this is not working for me.
--------



If all else fails, Improvise!



http://www.luiscasillas.com

rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby rasmusw » Thu Sep 30, 2010 12:07 am

In my case I expect the Windows service to be installed.
I expect the same result as when I call "installutil installnetservice.exe" to register the Windows service.
As figo writes: There is no return value from the ".Net Install Class" function, so it is not possible to check for errors.

I have reproduced this on Windows 7 and 2008 R2. Both of them have .NET 4 installed.

rasmusw
Posts: 44
Joined: Tue May 19, 2009 3:06 am

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby rasmusw » Thu Oct 07, 2010 6:11 am

No news on this issue?

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby mills » Thu Oct 07, 2010 6:07 pm

I'm including a setup that I built.

It installs both of the services that you provided and calls them using the Run .Net Installer after they have been installed to $TARGETDIR$ (after Apply Install).

Interestingly, I find both of the services listed after installation...

I wrote another setup consisting solely of:

Code: Select all

Set Variable APP_SERVER_FILE to c:\MyServer.exe
Run .NET Installer Class $APP_SERVER_FILE$
 
Comment: Set Variable APP_SERVER_FILE to c:\server\SqlInstall.dll
Set Variable APP_SERVER_FILE to c:\OCSMobileStatusService.exe
Register assembly APP_SERVER_FILE
Run .NET Installer Class $APP_SERVER_FILE$


That doesn't work (I made sure the files were located at c:\). At this point, it's not clear what the problem is...

I created a 3rd project... created a basic setup and immediately after the Apply Install, added the lines quoted above. This time it worked!
And both appeared, so it doesn't look like its necessary to register the assembly...

It almost looks like the Run .Net Installer command must appear after an Apply Install...
Attachments
RunNetInstaller.7z
(258.09 KiB) Downloaded 1046 times
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby mills » Thu Oct 07, 2010 6:28 pm

It's not the relationship between Apply Install, it's something else. If you put the Run NET Install line immediately before the Apply Install of a default basic setup, it works...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Run .Net Installer Class not working on Windows 2008 R2

Postby mills » Thu Oct 07, 2010 6:53 pm

And now, I created a new test from a blank template with only these lines:

Code: Select all

Set Variable file to C:\MyServer.exe
Run .NET Installer Class $file$
 
Set Variable file to C:\OCSMobileStatusService.exe
Run .NET Installer Class $file$


And that works!!!

Now, I'm stumped. There's no clear way to reproduce this... It's like it's hit or miss...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 76 guests