I have developed an application in c#.net.
Created a setup for windows 7 64 bit operating system. I have used Visual Studio 2010 to create a setup. I select the prerequisites for the application which are provided by default for 64 bit os setup namely Sql Server 2008 and .NET Framework 4.0.
The setup is installed successfully.
My problem is that **I need to run the application as administrator for first time.
Do I need to set specific properties for setup while creating the setup ?
You need to Create and Embed an Application Manifest with Your Application. Have a look at this link and i hope you may get what you want. Making Your Application UAC Aware
Related
I have an old webservice installer built on .netframework 4 which is running on Windows 2008 and when i try to install the installer on Windows Server 2016, i am getting the below error.
Error Message : "This setup requires Internet Information Server 5.1 or higher and Windows XP or higher. This setup cannot be installed on Windows 2000."
Is it possible to run this old webservice installer to the new 2016 without rebuild my solution?
LaunchCondition Table: Most likely there is an entry in the LaunchCondition table of that MSI - if it is an MSI - which prevents installation. I say most likely because it could also be a custom action - please check the launch condition table first and get back to us. Launch conditions must evaluate to true for the setup to allow itself to be installed. You can "hotfix" this by using a tool capable of writing to MSI files: How can I compare the content of two (or more) MSI files?
You are supposed to make a transform file *.mst (a database fragment) and apply it at installation time to change the original MSI installer. However, sometimes I make backups of the original installer and zap simple stuff like launch conditions if they are wrong in the first place. A transform becomes too cumbersome for ad-hoc stuff. But should be used if you intend to distribute through SCCM etc...
Compatibility: Even if you hotfix the MSI file and it installs you obviously won't see the webservice working if there are technical reasons why it won't work on that machine. Launch conditions are a sign that something must be present on the machine for the application to work. However, sometimes people are a bit trigger happy with their launch conditions and make packages that are a bit too restrictive.
Note: first check if IIS is installed on the box.
Short desc:
Same .exe when ran without administrator rights can use 32bit driver. However, when ran with admin rights it's incapable to use it/find it.
My environment :
Windows 7 64bit
Visual Studio 2013 Professional
.Net 4.5
Computer NOT in domain
Background story:
I have a WCF service hosted in consoleApplication and I'm connecting to it by WCF over net.Tcp (locally).
WCF uses for it's work VFPOLEDB.1 provider which is only 32bit. Everything works fine until I do some admin work inside application. It logicaly requires "Run As Administrator" to do it, so either Visual Studio 2013 (which hosts consoleApp) or Debug\xxx.exe must be run in "Run As Administrator" mode.
Caught exception says "VFPOLEDB.1 is not registered" (so main problem: application is 64bit and looking for 64bit drivers) ONLY when I use run as Administrator, I tried AnyCPU setting to x86 and project setting to x86 and none had effect.
Here is my question:
How can I run .exe/visual Studio 2013 in admin mode but force it to use 32bit drivers.
Thank you!
I got that problem for a MySQL DataSource, that's because your DataSource is registered only for your current user, not Machine-wide. When the application is ran as an administrator, the program is looking in the machine wide data sources
To register your DataSource System-Wide, open your Configuration Panel, in the search bar type ODBC.
Click on "configure ODBC Data Sources (32bit)"
There are two tabs that shoul interest you :
"User Data Sources" <= You should find your DataSource in there
"System Data Sources" <= You should register your DataSource here
If your program is compiled in 32bit and is run as administrator it will still use the 32 bit database drivers.
If i misunderstood something please tell so that i can adapt my answer
I have created a windows forms application using C#.net 4.0 on Visual studio 2012.
App works great on windows 8 and windows 7 but when I try to run the same app on Windows XP I get following error message.
Following are the prerequisites for my app:
1. .net Framework 4.0
2. Windows Installer 4.5
3. ReportViewer 2010
4. MYSQL DB 5.6
5. Visual Basic PowerPack 10
I have installed all these pre-requistes on Windows XP. My 1 click setup installs the application correctly but on application Start up I am receiving error.
I also tried upgrading visual studio 2012 and then rebuilding and publishing the app but still the same error persists.
Following is the screen shot from the Application Event logger
Screenshot from Project's configuration manager
Screenshot from Project Properties
Can anyone suggest me what could be the issue.
If your program icon (or possibly any icons used by your program) has any images that are larger than 64x64 pixels, you can get this error on XP (in System.Drawing).
Check all your icon files and ensure that none contain images larger than 64x64
You Need Service pack 3 for XP and check the EXE build whether it might build for X64 and also check your XP machine is having .Netframework 4.0 change that into AnyCpu and once again build
the EXE and check with XP. and change your framework as .NetFramework 4.0
Are you targeting Mixed Platforms/Any CPU/x86? Can you try different build configurations?
Are you referencing any third party DLL's?
Can you catch and log details of the exception, or does the program fail to execute entirely?
I've had strange issues before when compiling for Mixed/Any CPU, and x86 machines throw a wobbler if the program isn't specifically targetted to x86.
I have a Winforms C# application that uses .Net framework 3.5. The application currently makes use of Crystal Reports for various reporting functions. This application is typically being installed as a networked application; in other words, the application is installed on a server and then launched from the various workstations via a shortcut. To run correctly though, the Crystal Reports runtime needs to be installed on every workstation and this is a dependency that I would like to eliminate. My goal is to be able to install the application on the server and then as long as .Net framework 3.5 is installed on the client, the application, including reporting, will launch and execute correctly.
So does anyone know if it is possible to compile Crystal Reports into the executable so that the dependency on the runtime is eliminated, or, failing that, know of an alternative to Crystal Reports that can does not depend on a runtime being installed on the client?
UPDATE:
I am currently looking at using a Visual Studio 2008 ReportViewer control as an alternative to Crystal Reports. I have never used this control before (or 'Reporting Services' for that matter), but from what I have read it is possible to setup this control to run using a built-in reporting engine (a so-called 'local mode'). If this is indeed the case, then I should be able to define the reports in Visual Studio 2008 and compile them into the application executable so that neither Reporting Services on the server nor a reporting runtime on the client need be installed.
Crystal Reports does always need to install standalone, I've been dealing with that for a while now, mine is a ClickOnce Application, actually I'm making some Reports using Report Viewer but I should warn you IT NEEDS TO INSTALL TOO on client machines so you will need Admin Privilegies on new installs.
What I 'm doin now is changing to a pure dll generation reporting solution as Telerik or DevExpress, right now I'm using DevExpress one.
Disclaimer: I do NOT work for either company.
Regards,
I am developing a Microsoft Surface 2.0 application using Visual C# 2010 Express Edition. I have already installed the Surface 2.0 SDK and Runtime Environment on a Windows 7 (32 bit).
From the installed templates, I choose a new Surface WPF application and press F5. I get an InvalidOperationException with the following message -
Cannot load Counter Name data because an invalid index 'Terminal
Services' was read from the registry.
The project is empty. I haven't added a single line of code yet. The same blank application works perfectly well on another desktop running Visual Studio 2010 Ultimate.
I would try here first: PerformanceCounters on .NET 4.0 & Windows 7
Most likely the performance counters are not loading in the registry, or at least not loaded properly. I know the question is different, but the symptoms are the same.
Run lodctr.exe /r it will repair registry entries related to the perfmon counters.