This question already has an answer here:
Closed 10 years ago.
i'm trying to make an installer for an app i developed for windows ce.The problem is,if i dont deploy it via visual studio and create an installer and run it inside CE,i get "framework not installed error".Is there a way to integrate the framework components to my installer?
Regards.
Edit:i managed to get 2 seperate cab files, one for my app and one for the framework,now,is there a way to merge these two cab files??
Sure, you could "merge" the CABs. The simplest way is to just include the CF runtimes and libraries into your own CAB and not worry about getting them GACed on the target. Openn the CAB and you'll find a _setup.xml file that describes the file names you need to use for the CAB contents. Typically I'll just add the files directly to my own app's INF file (we never use the deployment package in Studio for building CABs) and have them deployed to the \Windows folder of the target.
No. You can not merge the two.
If I am wrong and someone is able to show me differently, I will gladly accept the downvote.
I've been deploying Windows Mobile cabs for about 4 years now, and I've always got to install all prerequisites as additional cabs.
Perhaps you could write a wrapper that calls the correct cabs in sequence, but Visual Studio 2008 and earlier does not come with a built in mechanism to do this.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm looking to create a virtual printer that passes data to my .NET application. I want to then create an installer that installs both the printer and the .NET application. It would we really nice to be able to write it all in C#, but I have a feeling that this will require a printer driver to be written is unmanaged code. Does anyone know of a fairly clean tutorial or example of how to do this?
Did exactly what you are asking using the Github project: Microsoft/Windows-driver-samples/print/XPSDrvSmpl
https://github.com/Microsoft/Windows-driver-samples/tree/master/print/XPSDrvSmpl
Installer: http://wixtoolset.org/
Application: Listen to internal port
Flow: Install printer and application from a single installer. User prints something with your driver while the application listens to the internal port. When data is sent the application picks it up. This is for XPS, can be converted to PDF, but the flow is similar no matter what you are printing. If you need anything else check out Microsoft/Windows-driver-samples/print/ on GitHub or other sources specific to your needs.
Update:
A lot of questions about how to get the driver working so here is a quick example:
Start by downloading Windows Driver Kit (WDK) if you do not have it installed already. When installing choose to add the extension for Visual Studio as well in the final step. In your Visual Studio 2017 Install you need to have Desktop development with C++ to have the right SDKs. If you don't have it see the anser below on how to add it.
How do I add features to Visual Studio 2017?
https://developer.microsoft.com/en-us/windows/hardware/windows-driver-kit
Then download the .zip file for Windows-driver-samples master:
https://github.com/Microsoft/Windows-driver-samples/archive/master.zip
Navigate to the folder <UnzipFolder>\print\XPSDrvSmpl and open XPSDrvSmpl.sln in Visual Studio.
Then follow Microsofts own guide on GitHub. As you can see it is for Visual Studio 2015 but I think it is the same for 2017 (not tested yet):
To build a driver solution using Windows Driver Kit (WDK) 10 and Visual Studio 2015, perform the following steps.
Open the solution file in Visual Studio 2015.
Add all non-binary files (usually located in the \install directory
of the sample) to the Package project: a. In the Solution Explorer,
right click Driver Files b. Select Add, then click Existing Item c.
Navigate to the location to which you downloaded the sample, and
select all the files in the install directory, or the equivalent set
of non-binary files such as INFs, INIs, GPD, PPD files, etc. d.
Click Add
Configure these files to be added into the driver package: a. In the
Solution Explorer, right click on the solution and choose Add > New
Project. Choose Driver Install Package under Visual C++/Windows
Driver/Package. b. In the Solution Explorer, right click the Package
project and select Properties. c. In the left pane, click
Configuration Properties > Driver Install > Package Files. d. In the
right pane, use the ellipsis button (...) to browse to the set of
files that needs to be added to the driver package. All the data
files that you added in Step 2-c, except the INF file, should be
added. This configuration is per-architecture, so this configuration
must be repeated for each architecture that will be built. e. Click
OK.
Open the INF file and edit it to match the built output. a. Open the
INF file. b. In the Version section, add a reference to a catalog
file like this: CatalogFile=XpsDrvSmpl.cat. c. In the
SourceDisksFiles section, change the location of the DLL files you
are building, to =1. This indicates that there is no architecture
specific directory in this driver. If you ship multiple
architectures simultaneously, you will need to collate the driver
INF manually.
At this point, Visual Studio 2015 will be able to build a driver package and output the files to disk. In order to configure driver signing and deployment, see Developing, Testing, and Deploying Drivers.
https://github.com/Microsoft/Windows-driver-samples/tree/master/print/XPSDrvSmpl#build-the-sample
I think you will have to do a lot of WinAPI wrapping. Start researching
on Windows Driver Development Kit to find the things you have to do.
I also found this commercial Printer Driver Resource Toolkit for .NET...
You could simply have your app expose itself like an LPD type printer or monitor port 9100. You could then install any print driver you like, and point it a your app.
Was looking for an answer for similar question, and found this link through Wikipedia - http://www.colorpilot.com/emfprinterpilot.html (allows to create Virtual Printers in different languages)
Why not consider using an alternative approach. Like using an intermediate ready made printing program, such as those freely available Print-to-PDF application. Then all you need is to decode PDF using some 3rd party library (which has free and opensource variance too) instead of cracking your head to reinvent the wheel. There are other Print-to-XXX application which you could also consider depending on the format you see fit.
I don't thing interpreting PDF approach is any good either. I don't know why you want to do what you want to do. Maybe you're trying to write a PDF printer of your own.
I think you should really give the Windows Driver Development thing a look. If you want to develop a printer driver, I think you'll have to do it in C++.
Good Luck.
If I remember correctly Microsoft does not support .NET within printer driver development. I have yet to come across a pure .NET printer driver. You will be a very brave man to do so! The website "Printer Driver Resource Toolkit" does not say that the driver has been written in .NET
I have developed a WPF application and the customer is planning to deploy the application on DVDs.
My application is really simple and doesn't require any setup process, but I need to assure that if the client doesn't have .NET 3 installed that it will be installed locally (from the DVD) before starting the WPF application.
So, what's the easiest was to add the .NET 3/3.5 package locally on my DVD and assure it'll be installed before running my application? Remeber that my application will be a standalone application.
when you use the publish option...
The Project Properties has a place to specify the dependancies that will need to be downloaded
then you simply check the boxes
there are other more complex ways to go abaout this but for .net 3.5 you don't have to go far
I would suggest using Visual Studio Setup Project for creating a setup package which would check for prerequisites and provide fundamental features like file system, registries, scripting. It is very easy to get started with. Take a look here for a brief walkthrough.
I have a standalone tool developed in C# Visual Studio Express 2010.
My problem is that this tool will fail to start on machines having no .NET installed, and asking for .NET 4 on machines has .NET under 3.5 or lower.
What I basically want to do is to install .NET 4 from my application before the main script runs. I can write a program to download it from an official webpage, also to run the installer etc. But the main problem still exists, the app won't even reach the download part as it won't run on machines...
I've googled around and found that you can include dll-s etc., but I still doubt I can proceed without a proper .NET installation. So how can run dotnetfx.exe with my .NET dependent application?
Your attention and ideas are much appreciated.
Cs.
Use ClickOnce - it takes care of dependencies when configured correctly and comes integrated/free with VS.
EDIT: So vs express editions don't support setup projects. Plan B: wix.
simple. your installer must not be a .net application. just write your own c++ version or use some existing application. here is a link to show you how to do silent installs of .net 4. just include the setup application with your program. I would be very surprised if some of the msi installer tools out there do not have .net installation support.
http://blogs.msdn.com/b/astebner/archive/2009/04/16/9553804.aspx
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
What are the specific differences between .msi and setup.exe file?
I am working on an installer for a new version of my project (C#).
Previously, I've used Inno Setup to create .exe files for installing my projects on other computers in the workplace. While reading through some tutorials, though, I came across Windows Installer XML, which uses XML files to build a .msi installer.
My project will be available on a network share that all the employees have access to so they can install the software (I'm currently working on an update checker as well)
What are the major differences between .exe and .msi installers? Why would I want to chose one over the other? Would either make more sense given my specific environment?
I found some of the information at this question, but there was not a lot of information.
I wouldn't use WiX for a new project. I'd use an 'Installer Project' in Visual Studio to build an MSI. An installer project is much, much easier to put together.
Many exe installers are actually stubs or containers that hold an MSI, btw.
I guess you've checked out http://en.wikipedia.org/wiki/Windows_Installer?
MSI's give administrators the ability to restrict installs, rebase installs, change or add custom actions, automate installs/reinstalls/uninstalls, standard logging and switches. It just really integrates into a corporate IT environment ( http://technet.microsoft.com/en-us/library/bb742606.aspx ).
A custom installer may have many of those features, but that would depend on the installer package.
Most EXE installers available today are simply stubs to verify that the target machine has just enough support to launch an MSI stored within the EXE. They do basic windows version checking and Windows Installer version checking, then essentially invoke msiexec and let Windows Installer handle the rest.
For a very basic installation, the Installer Project in Visual Studio can get you by, but for just about any kind of real customization or tweaking you'll need a real MSI editor. We use WiX and love it - but it's a bear to learn. If you've got the cash you can invest in InstallShield - but that has it's own set of quirks.
MSI is configurable while EXE is not. I know this doesn't answer your question directly, but I thought I should point towards the ClickOnce technology.
MSDN: See example here.
Simply stated, a ClickOnce application
is any Windows Presentation
Foundation, Windows Forms, or console
application published using ClickOnce
technology. You can publish a
ClickOnce application in three
different ways: from a Web page, from
a network file share, or from media
such as a CD-ROM. A ClickOnce
application can be installed on an end
user's computer and run locally even
when the computer is offline, or it
can be run in an online-only mode
without permanently installing
anything on the end user's computer.
For more information, see Choosing a
ClickOnce Deployment Strategy.
IndigoRose's MSI factory is extremely powerful and much, much cheaper than InstallShield.
It uses WiX internally and allows you to modify the XML files in any way you like. The bootstrapper (.exe, if you add one) has a powerful scripting engine based on Lua to do... well anything.
I have developed a small desktop application in c#(using windows forms). For this project I need mysql, MySql.Data.dll and some property files...
I am ready with my project but I need to burn it on a disk(with Autorun express).
when I run that cd
It should ask me to check whether the system has mysql installed in it or not,if not installed already then it should install now in the specified location
run some database scripts to generate database and relationships and constraints
and finally it should copy my .exe file on to the hard disk (specified location).
Thanks,
srini.
It sounds like you're trying to use autorun to kick off an installer. Take a look at the built-in Installer project in Visual Studio, or take a look at WiX.
"Check whether the system has mysql"
To validate whether the machine you
has MySql, you'll need to define
what you're looking for. As for most
products, you can find them in the
registry. I'm not sure where MySql
puts that info.
"Run some database scripts"
You can kick off a custom action that will
properly install the database.
"Copy my .exe file"
Specify where you want the installer to put your
executable and other binaries
(MySql.Data.dll).
NSIS is another good choice for an installer. I used that one pretty extensively, and am using WiX on my current project mostly just to try a different approach. The one included with Vistual Studio 2005 is very buggy, but I have not tried the included ones for Visual Studio 2008 and later.
NSIS and WiX follow very different approaches for creating the installer file. You may find one or the other easier for you to understand. Both seem to have pretty active communities that will help if you get stuck (or ask here of course).