Page 3 of 3
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Fri Oct 08, 2010 7:58 am
by rasmusw
Will you file a bug report internally, then?
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Fri Oct 08, 2010 5:38 pm
by mills
Unfortunately, I don't have enough information about what's causing the problem at this time to escalate the issue.
Today, I ran some more tests, 5 specifically. I'm testing in a virtual machine. Here's how I worked it. I first installed .Net 4 on XP SP3, then I saved a snapshot and used that as a test base, just to make sure .Net 4 was properly installed. I tested each of the 4 test projects I created yesterday. This time, they each installed the services as expected. Even the first project that was posted here by
adi also worked. I made sure neither of the provided, test services were appearing in services.msc before running a given installer.
So, at this point, it's starting to look like the problem may have to be with .Net or the version installed... It's very possible that for the trials that didn't work yesterday, it was the case that I didn't properly install .Net 4...
I'll have to ask everyone reporting this to
report what version of .Net you have installed. Instructions. A screenshot would be the preferred evidence.
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Mon Oct 11, 2010 4:54 am
by adi
Hello,
In my case the .NET 4.0 has nothing to do with the problem. I am using 3.5 SP1 only (always with the most recent patches).
Running the installutil.exe directly works all the time so the problem must be somewhere inside the IA.
Best regards,
adi
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Mon Oct 11, 2010 10:50 pm
by mills
Could not reproduce on Win2k8R2. It worked fine with the basic 2.0 installed. I started over, installed .Net 3.5, copied the services to C:\, ran the .Net Installer test and both the test services appeared in the service list afterward.
Notice the MyServer:

- Server2k8R2service.jpg (127.72 KiB) Viewed 10862 times
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Tue Oct 12, 2010 2:44 am
by rasmusw
Here is the output from my two test PC's (the 2008 R2 is a VM).

- Windows 7 pc with problem
- dotnetwin7pc.png (3.4 KiB) Viewed 10862 times

- Windows 2008 R2 with problem
- dotnetwin2008r2.png (2.35 KiB) Viewed 10862 times
The problem is not that the installer can't locate the service it should install, but the ".NET Install Class" function gets the incorrect path to installutil.exe. Here is the relevant line from the process monitor log I attached with my sample project earlier in this thread:

- incorrect path to installutil
- installutil path incorrect.png (10.29 KiB) Viewed 10862 times
As you can see from the above, the installer fails when executing installutil because it has retrieved an incorrect path to it. The path includes my user profile folder for some reason. I doubt this has to do with anything the script does, or whether the ".NET Install Class" function is located before or after "Apply Install".
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Sat Feb 01, 2014 1:18 am
by etedali
Hello,
I want to encrypt my app.config with Installer class (write with c#) but I don't know why it’s not working,can anyone help me?
Re: Run .Net Installer Class not working on Windows 2008 R2
Posted: Mon Feb 03, 2014 11:37 am
by FrancescoT
Dear User,
If I haven't missed your question ... you need to create an EXE in C# that does it and then, to call it from your installer.
Regards