Page 2 of 3
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Thu Sep 23, 2010 3:48 am
by adi
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
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Mon Sep 27, 2010 6:51 am
by rasmusw
Hello Andy Mills.
Have you been able to reproduce the problem using the sample I posted?
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Mon Sep 27, 2010 8:56 pm
by mills
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
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Tue Sep 28, 2010 3:16 am
by rasmusw
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\...
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Wed Sep 29, 2010 2:12 pm
by figo
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.
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Wed Sep 29, 2010 4:56 pm
by mills
Is anyone using InstallAware 9 R2 (Build Moya.sp3)?
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Wed Sep 29, 2010 5:04 pm
by figo
We haven't upgraded just yet. Are there any relevant updates to R2 that address these issue?
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Wed Sep 29, 2010 8:00 pm
by rasmusw
I tried this on both R2 plain and on SP3. The problem is on both.
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Wed Sep 29, 2010 10:37 pm
by mills
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?
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Wed Sep 29, 2010 10:40 pm
by figo
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.
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Thu Sep 30, 2010 12:07 am
by rasmusw
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.
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Thu Oct 07, 2010 6:11 am
by rasmusw
No news on this issue?
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Thu Oct 07, 2010 6:07 pm
by mills
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...
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Thu Oct 07, 2010 6:28 pm
by mills
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...
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Thu Oct 07, 2010 6:53 pm
by mills
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...