I'm making an Windows Form application using C# 4.0 and Ubuntu PC will a host for ClickOnce Deployment. The users' Windows accounts are not admin accounts. Is there any way for the users to update the application without typing admin password If there are updates?
EDIT : Or is there anyway, when the application is installed on the user's machine initially, i register my application on Windows system saying that any updates from this application can be done without admin privilege?
Well it depends if the application requires any Elevated privileges. If the updates do not involve any registry changes or any system level DLL changes, There should not be any problem in updating the application.
if it requires elevated privileges then An administrator can advertise an application on a user's computer by assigning or publishing the Windows Installer package using application deployment and Group Policy. This way when the non-administrator user can install the application.
Related
My C# desktop application when run from Windows Guest Account gives this error while accessing SQLLocalDB: "failed to update database "C:\ProgramData\myDB.mdf" because the database is read-only." (I placed the DB in ProgramData to make it accessible to all users)
When run from Windows Administrator Account there is no problem.
The Application is installed on the computer through a SETUP Installer project (NOT CLICKONCE, because Clickonce apps are only accessible on the Windows User account that installed it. I want this app to be accessible to all Windows users on the same machine).
The Installer also installs SQL Server 2016 Express LocalDB.
The application uses a single Database for all Windows users (on the same machine). This is a home business app, meant to be installed by end user without any professional help. If it is possible, how do I go about it?
EDIT: It seems to be a Windows permissions problem, because when Run as Administrator from the Guest Account, the app works. No more errors. But is there a way to set this automatically, perhaps during SETUP/install?
I have a windows installer, which is creating a database as a part of the installation process. While installing the application CREATE DATABASE process is failing because the windows installer using a wrong user. It is using NT AUTHORITY\SYSTEM instead of using the login user. NT AUTHORITY\SYSTEMuser does not have permission to create a database.
Is there any way to force the installer to use the login user?
Using Windows 10 environment with VS 2017 and MS Visual Studio 2017 Installer Projects.
The short answer is that you can't do this in a Visual Studio setup that is an InstallAllUsers setup because the all VS installer generated custom actions run as the system account. Therefore you'd need to change the custom action settings in the MSI file with an editing tool such as Orca. You'd find the custom action in the CustomAction table in the MSI file, look at the Type values (it's probably a type 3074) and then turn off the msidbCustomActionTypeNoImpersonate bit so that it runs impersonated as the installing user.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368069(v=vs.85).aspx
Note that running impersonated as the installing user has its own set of issues because it is NOT the same as running as the interactive user. The user profile is not loaded, so objects associated with the user (such as HKCU, user profile folders) are very unreliable.
Many people populate the databases with a separate programs the first time the application is launched so that it runs properly as the interactive user and can be developed and debugged as a standalone program. If the populate fails during the install you either give up the install and roll back, or you continue the install and end up with an empty database, for which you might need a program to populate it anyway.
We have a business application which requires to use windows API libraries such as user32.dll etc. to take screenshots of the user desktop. This is currently built using C#.NET / VB.NET.
The business requirement now is to find a way to be able to execute/deploy the application to user machines with least user intervention. Additionally, the user might not have admin rights on his machine.
Please share any suggestions on the options. It would have been great to move the windows application into a web application, but I can only think of options such as ActiveX or Silverlight which might be able to user low level APIs, but these are already being discontinued.
ideal would have been some approach, where the user visits a website, maybe cliska button to install, and that website installs this windows application on the user machine.
The target environment is Windows 8. So I believe we may can assume that the .net framework would be existing already, BUT we do not know if in future perhaps the application in future might require any external referenced dll which might need to be pushed to the user machine.
If you use the standard clickonce application deployment that comes with Visual Studio, you can deploy the website to a website, and users can install form the webpage, installing any prerequisites for the program.
In addition, it installs to a user's appdata, so no admin rights are required. The only time admin rights are needed is when you install/update the .Net framework.
For bonus points, the clickonce deployment will automatically update the application on the client's PC when you publish new updates.
I want to open Administrator mode automatically after installing my application.
And also i want to add Font automatically into Client's PC when installing my application.
if you need to configure your .NET application to always run in administrator mode after it has been installed, have a look at this:
Run .NET Programs as Administrator on Vista or Windows 7
this only applies to Vista and Windows 7 and Win Server 2008 because in Windows XP if current user is administrator, application already runs in admin mode.
You need to add an application manifest requesting admin priviliges.
This begs the question of why it needs admin access as this is normally indicative of an incorrectly designed application.
I develop a Windows Forms application using VS 2008. Application will be deployed in Corporate Environment: a network (VPN, LAN) is in several cities, many PC clients Windows XP; and there is a only Server Win2003, with several WCF Services, Windows Service, shared folders, and Database that use the WinForms app. Network is WORKGROUP, not domain.
The users in PC Clients has NOT admin rights. Only can install applications the only admin.
It is required automatized&easy way to install "desattended" the WinForms application for all users. I want get way to easy installations in PC Clients.
We don't want use ClickOnce. NOT use click once. Now, I have MSI (setup.exe) of WinForms App.
If if required another program, source code, scripting, etc, any sample code ??
any suggestions for my architecture network ??
Use XCOPY Deployment for more details.
Use InnoSetup and install the application to %LOCALAPPDATA%\MyApp, which is denoted as {localappdata}\MyApp in an ISS file.
Make sure your application uses Registry keys in HKEY_CURRENT_USER only. You can set these up using Root: HKLM
Set PrivilegesRequired to lowest.