I'm writing a deployment application that should install all required components before load main module. But I has an issue with dotnet 3.5 SP1 installation on Windows 7. Windows 7 incorporate the dotnet 3.5 SP1, but some times that component disabled by user/manufacturer/...
User can enable it from the Control Panel, but I can't ask him to do that.
How can I enable it from my software, I should exclude a all manual configuration from the deployment process.
I found a way by myself, through ocsetup.exe.
The final command is:
%systemroot%\system32\ocsetup.exe NetFx3
Update:
ocsetup is not available at Winodws 8+, you should use dism to achive the same result.
For Winodws 8+ you have to use the following command:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
Being a Win7 user that has had unending problems with .NET 3.5 and would prefer it just stay disabled because it's corrupt, doesn't work right anyway, and once in this state is unfixable in Win7 without a whole new, fresh install of Windows, I wish programmers would just NOT require it be installed. .NET 4.1+ are 3.5.1 backwards compatible and if you write your code properly so that you are looking for 3.5 functionality rather than 3.5 itself, it works and if you coded it right in the first place, you could just install 4.2 instead of 3.5 and it would work, but I have a small handful of programs, including all of MS's own email applications (like outlook) that just insist on using .NET 3.5 and you know what? None of them work on my system.
I would also like to add that if I did install some piece of software that turned on or off windows features on my system without asking for permission first, you'd be getting hate mail from me and that software would be off my system as quickly as I could uninstall it and delete it's folders.
Related
I want to run an application in client machine without installing it in the client machine. the application file should be in my usb pen drive and when I go to customer pen is plug in client machine and run the application. The system is developed by c#. Please send any ideas.
Build it in .Net framework 2. Then you can run it in almost all the windows machine except windows 8. .Net framework 2 is disabled by default in windows 8. You can enable it and run your app. Framework 2 will be available when installing windows and can run by double clicking the exe
If you are just interested in running the C# program, there are various online C# compiler available. For eg:
http://www.compileonline.com/compile_csharp_online.php
http://ideone.com/
If it is an application in .exe, you should be able to run it in windows without installing anything, as Windows already contains a version of .Net by default.
If you just have the dlls, scripts etc, you are in deep trouble.
It sounds as if you're after a linker/merger/virtualizer. I don't have any experience with these tools but they are cited quite often:
Xenocode
Thinstall
ILmerge
Salamander
SkaterPro
Spoon Studio
I have C# windows cs project. The application enables opening word documents and pictures as well and storing them in MS Access database. I made a setup and it installs well on computers where Visual Studio 2008 is installed, but when I install it on a computer with no VS installed, it installs and after that it doesn't starts to run.
I can not run it.
Some other C# projects I made can be installed and run without problems on the same computers on which this application doesn't start.
Can anybody help me please what could be my problem?
Thank you in advance
Possible lacks some of the .net framework components on computer with no Vs installed,because when you installing VS,all the necessary components are also installed
Most likely it seems that the computer with no VS installed does not have .NET framework installed.
And where you are testing on computers with VS installed it obviously works as .NET frameworkis already installed.
I think there is an option in setup where you can specify Prerequisites before installing your application, google out more info on this.
This link might help.
If other Applications do run then it's possible that you may miss some dependencies.
Check if all dll's are installed properly. Which framework do you use ? Are the other C# projects also programmed in that framework ?
We are building an application on .net, And it is an Image Viewer application uses .net 3.5.
And this application will be on a CD along with other images.
My Question is, is it possible to Auto Run this application when you insert a CD on a machine which DOESN'T Contain .NET Frame Work.
Or any other ways of building the application which runs from the CD.
Autorun is a feature of Windows. It does not have anything to do with .NET really. You can use it by placing apropriate files in the root of your CD.
See: http://en.wikipedia.org/wiki/AutoRun
In order to execute a .NET app WITHOUT .NET framework installed, point the Autorun.inf to an installer of you application, which would be deployed on the CD as well.
The application will fail to run directly when it cannot find the libraries it need.
What you can do is to create a non-.NET dependent bootstrapper, include the framework installer.
So when the CD auto run, run the bootstrapper, the bootstrapper will run the installer. Once installed, run the application.
No, you can't run .NET applications on a computer without the .NET Framework installed. That's a hard rule, and a pretty intuitive one, it seems to me. Somehow, this question still gets asked a lot.
But Auto Run has nothing to do with the .NET Framework. It's a feature provided by the Windows operating system designed to run your setup/installation program directly from the inserted installation medium without requiring any kind of user interaction.
So what you should be doing is creating a setup program for your .NET application. You can do this from within Visual Studio: just create a Setup Project instead of a Windows Forms Application. The setup program will take care of detecting whether or not the computer has the appropriate version of the .NET Framework installed, and installing it if necessary along with the application. The setup bootstrapper will be able to run without the .NET Framework installed, so you can create an autorun.inf file that simply specifies setup.exe as the application to be launched automatically.
I've used mono to do this a few times, not with the static linking as mentioned in the other answer, but by including the mono distribution on the cd (or a subset of it). Mono doesn't seem to do much in the way of modifying registry, system32, etc. So you can do an xcopy deployment of if, or CD deployment in this case. You'll end up running mono.exe
I think Mono supports some form of static linking that doesn't require installation. But I never tried it myself.
My client's PC runs Windows 7 Ultimate with .netframework 4 client profile. I am unable to install my application developed in VS2008. I tried uninstalling .NET Framework 4 From his PC and running the Clean up tool provided by Microsoft. But still I am unable to install it successfully. It provides Error 1001.
I tried running the program as administrator. I also tried to Turn on .net 3.5 feature from add or remove program.
Thanks in advance. :)
Edit:
The error what i get is shown here.
Furthermore,
I have confirmed that it is a 32bit processor and i run x86 release version of setup
The application is developed in a Windows 7 OS with .NET Framework 3.5
I have installed this application in 7 PCs which have .NET 3.5 installed in them and having OS Windows XP,Vista and Windows 7; and all are working fine.
In clients PC, when I try to install .NET 3.5 again, the installer starts but then it disappears suddenly without doing anything
I have tried turning on .NET 3.5 framework feature from control panel> Program and Features.
I have tried running the program as Administrator
I have tried setting the application setup in Windows XP and Vista compatible mode.
But still the issue persists.
Thanks :)
#Niraj.. hope you recognize me.. :)
Well, I think the issue is with your installer. Something in your package settings is conflicting with the environment at your client's computer. With the error message that you posted, it looks like there is some dependency on some assembly which isnt available to the installer, and hence its failing. This might include version number mismatches too.
You should also look at this question, which talks about an issue similar to yours.
or try using FusLogvw.exe to check which assemblies fail to load at runtime.
As you said you have only .net framework 4 client profile which is a subset of the .NET Framework 4 and is optimized for client applications. Please make sure that everything needed for your new application is included in client profile version. Also it is possible that your application installer requires .NET Frw 3.5 as a dependency. Anyway as already said by Henk no need to do anything with .NET Frw 4 just install 3.5.
There is an exception raised during the installation, and you should as it wished to collect MSI debug log and other necessary information to troubleshoot.
I don't think .NET 4 is the root cause. Otherwise, you should already install this app after uninstallation of .NET 4.
in my opinion
be sure that you not run X64 application in X86 based computer
trying to run them in compatibility mode for OS depend on which OS you used in client system
check the prerequested component are installed or not in client system.
you show the problem 1001 in snapshot so you can Read the log for more information about the setup you trying to install on client side.
your setup forced client system to load a specific type during the installation and type not exactly load as setup want so they give you a exception called "LoaderException"
for more information start googling may be it solved your problem
http://www.google.co.in/search?sourceid=chrome&ie=UTF-8&q=loaderexception+in+.net&qscrl=1
I got it finally...nothing was stopping my application but Crystal Reports.
We forgot to include Crystal Reports Basic as a prerequisite.
Thank you guys for the efforts taken. :)
Niraj
I want to make an advanced installer for my C# application. |I want my application continue its installation after the pre-requisites been installed.
My scenario is:
myApplication requires .net Framework 2
it redirects the user to the Microsoft website.
the user installs the framework.
the installation requires to restart the PC.
STOPPED INSTALLATION
After this step (after restarting) I want myApplication to continue the installation (go to the last stage of the installation)
Any suggestion on how I do this ?!?!
I would suggest taking a look at the nullsoft install system. Use the Modern UI theme and the DotNET macro (http://nsis.sourceforge.net/DotNET). That's everything that you are looking for prebuilt, for free, and you can be up and running with very little effort.
I've had experience releasing applications with this route and it works very well.
Things like InstallShield, or one of the other installer creation tools would be able to handle the pre-requisite side of things for you. If you want to roll your own, then you could check for the framework, perform the various steps you mentioned to install it, then add you setup application to the RunOnce registry key so it starts again on startup.
Looking at something that would handle all the pre-requisites etc for you would be my choice though :-)
Install in this order:
Install the .NET framework
Install your app.
Restart if needed.
You can create an installation project in VS2005/8 to handle installing your app and any needed dependencies.
Are you aware that your compiled c# app itself will do this? The bootstrapper compiled into a .Net exe will contain a redirect to get the framework with a working link to the microsoft website.