I've been developing in VS 2005 on an XP machine for the past 3 years. We're now getting new PCs with Windows 7. What I've noticed is my setup projects require admin rights to run. This is a problem for me because no users (including me) have admin rights, only helpdesk support staff.
I'd like to run my Windows installer setup projects without admin rights- is that possible?
Also, I'd like to continue to create installer files that users without admin rights can run. Is that possible, or will all my setups now need to be installed by someone with admin rights?
I've looked into ClickOnce deployment, but I don't have a web server available for installations.
Also, I've looked into digital certificates, but I have no budget. Is there a way to get a certificate for free? All my applications are for internal use, and I understand these security issues are for web applications.
Is free deployment of internal applications no longer supported?
Thanks for your input,
-Beth
It is possible to run Windows Installer setup without admin rights. Look at Single Package Authoring article for an overview how to create a package that support that. You can also prepare a package that will run only in non-admin mode. Note however, you will not be able to write to Program Files and other system-protected areas when installer runs in non-admin mode.
You can use self-signed certificate to add digital signature to whatever you want. The only thing is that this certificate will not be trusted by default. However, it's not issue when used internally: it can be installed as trusted on machines where it's required. See makecert.exe and signcode.exe tools.
Related
I've been working with UWP/Xaml for the past couple days but am unable to answer the title question so far: Is it possible to install an .appxbundle without admin rights?
I'm developing a Unity3D/UWP/Xaml application which cant be deployed to Windows Store and thus needs to be sideloaded and am also using the default Visual Studio 2017 test certificate. Both developer and client PCs are running on Windows 10 x64 with latest build. Developer PC is in Developer Mode and Client PC is in Sideload Apps Mode.
The project generated have the following dependencies:
Microsoft.NET.CoreRuntime.1.1.appx
Microsoft.VCLibs.x64.14.00.appx
Using powershell scripts shouldnt be a problem as long as they dont need admin rights.
I've tried a few things with no success so far:
Double clicking the .appxbundle
Results in the following message: A certificate chain processed, but terminated in a root certificate which isn't trusted (0x800B0109)
Double clicking the certificate generated by visual studio and installing it to CURRENT USER (Local Machine requires admin rights), then placing certificate to either Trusted Root Certification Authorities or Trusted People and clicking again on .appxbundle
Running the powershell script
Returns the following message: Before installing this app you need to do the following: Acquire a developer license
Then it asks for admin rights
Running the powershell script after modifying the CheckIfNeedDeveloperLicense to always return $false
Returns the following message: error 0x800B0109: The root certificate of the signature in the app package or bundle must be trusted.
Somehow I have a feeling that the dependency Microsoft.VCLibs.x64.14.00.appx is triggering this. Also, I cant manually install this .appx because it gives me the following message: App installation failed with error message: The package could not be installed because resources it modifies are currently in use. (0x80073d02)
Tried a mix of powershell Set-ExecutionPolicy commands before running the visual studio generated powershell script, including:
Force
ByPass
AllSigned
Unrestricted
-Scope CurrentUser
Deploy visual studio project (which generates an .appx instead of an .appxbundle) instead of Store -> Create App Package
I have also read this thread UWP App Installation without admin rights, powershell interaction and without Windows Store?
But I couldnt figure out how to configure the powershell script to run without admin rights.
Everything points me to a faulty certificate, but I still don't get how to generate a trusted one for sideloading apps. Is it possible to do it for free?
Let me know if any more info is needed in order to solve this.
Thank you for your time!
Is it possible to install an .appxbundle without admin rights
You must have administrative access successfully before you install. The issue you met is one of the most frequent issues when sideloading an application for first time in the user machine: Trusted certificates.
According to Trusted certificates section of the document Troubleshoot installation issues with the App Installer file:
To trust the certificate, the certificate must be present in one of the following local machine certificate stores on your device: Trusted Publishers,Trusted People,Trusted Root Authorities (not recommended)
No matter which one, Installing a certificate in the Local Machine store requires administrative access. Please kindly check the Important section.
I am developing a Windows 8 app (Modern UI) and I was asking if I could get the 'executable' of the app to install and test it in other computers without submitting the app to the market.
I am using the visual studio 2012 ultimate, if it helps.
Thank you in advance.
Right-click the project and choose Store - Create App Package and deselect uploading to the store. This will create a folder with the package for your app and all dependencies. Use the powershell script, which is also located in the folder to install the app. Normally if you run it for the first time it will probably ask you to change your ExecutionPolicy, but then it will install the app.
You can sideload an application on another machine without requiring the application be in the Windows Store.
One way, mentioned by Kai in another response to this question, leverages a developer license on the targeted machine. Because this mechanism uses a developer license it's not a suitable method for distributing apps for several reasons:
The license states "You may use the developer license only for the purpose of developing, testing and evaluating apps"
A developer license has a 30 (or 90 day) limit, after which the user will be re-prompted to renew the license; that's not a suitable experience for a 'finished' app.
Acquiring the license requires an internet connection, so the app may not start if offline.
The approved mechanism for distributing applications to the end-user outside of the Windows Store is via Windows 8 Enterprise or by purchasing enterprise side-loading activation keys for devices not running Enterprise (like RT). Some information on this process can be found here and here.
I have a web application implemented in ASP.NET MVC3 and SQL Server 2008 Express. It's relatively small so I can deploy it in local computer of my clients (Windows 7 or higher).
Currently, I deploy it manually by create new web site in IIS, copy published files to the folder of website, install SQL Server 2008R2 and use Management Studio to restore database with some initial data.
It's OK with me but not with my clients. They can't do the same things. What I want is an automatic installer, my clients just need to click a few buttons to get all done.
Specifically, this automatic installer must do the following things:
Install SQL Server 2008R2 Express and restore the initial database.
Install IIS7 (if it's not enabled in Windows 7).
Create a new app pool (V4) and a new Web Site use this pool. Then copy published files to the folder of the Web Site.
The installler can run aspnet_regiis command and grant permission for NETWORK SERVICE account to TEMP folder. This is required for web site to run.
The installer can copy some fonts to Font folder of Windows.
I see many app can do this automatic installer, but after googling I can't find a thorough solution to try.
Please give me some advice on this. Thanks in advance!
If you want a free solution, WiX is what you need, but it will take you some time to learn using it if you never created a package with it.
A more easy to use, and also powerful, but payed tool, is Advanced Installer, you need Professional edition, but you can try it for free with the 30 days trial mode. It has predefined prerequisite for SQL Server Express, built-in support to install IIS entities, and set file/folder permissions. Bassically all the requirements you need.
To enable any IIS feature you can simply add a PowerShell script.
I'm not able to run visual studio 2008 by choosing 'Run as a Administrator' it says 'Application Cannot start'. Any solutions please.
OS : Windows 7 64 bit
IIS 7.5
I've just come across a similar problem myself, where an external tool won't work when VS is run as admin. On my case, the tool tries to access a mapped network folder. Turns out that the mapping applies only for the non-admin login token. Does you VS happen to access a mapped network folder?
See: Programs may be unable to access some network locations after you turn on User Account Control in Windows Vista or in Windows 7. Link includes a possible solution.
BTW, the problem here is probably not VS-specific. Since it seems to regard Windows permissions, it should probably have been asked on ServerFault.
We have been given the directive to make sure that when we develop we are running out of the administrator and poweruser groups to prevent security holes. What are the steps to take to make this possible, but still be able to debug, code, and install when needed?
We develop ASP.NET as well as VB.NET applications.
Thanks!
Brooke Jackson
I have been developing a web application in a team of 5+ developers using ASP.NET 2.0 using Visual C# 2005 and Visual Web Developer 2005 for 6+ months. It was an internal application for our client and was targeted at Internet Explorer 6.0. I have been always using a non-administrator account on my machine and have never run into any problems. Specifically, I have not experienced any problems with debugging. Right now I am switching to a Visual Studio 2008 and I hope everything will work just as it does now.
I am using a laptop for development. A the same time I am moving around and connecting to the internet in different places and I use my admin account only when necessary. I really believe that running an admin account for every day tasks is the single greatest security threat, just because it is so common.
Beware, there seems to be a lot of issues with running VS as non-admin.
Seems silly to me. Run VS as admin/power-user locally with whatever minimal rights you need on the network for publishing to the users and whatnot.
Just makes sure that the applications you CREATE with VS still work without those extra rights.
Use Vista, and take advantage or UAC, because that's UAC allows you to do. You can give VS full rights when needed, and the application/website limited rights.
I'm running VS2008 on Vista with UAC enabled. I've only had one issue worth mentioning.
I occasionally have weird file permission issues when I've run VS with elevated privileges then later run it without them. VS won't be able to delete the old build files, but if I delete them from Explorer its fine. Again, this only happens when switching between elevated and non-elevated permissions.