I builded nsis script succesfully, but after installing, I can't run my application without admin privilegies. Anyone who knows what's a problem?
Thanks for answers. I found a bug in my application, you can read about it here
I would recommend that you just disable the run checkbox on the finish page. If you really need to start a app as non-admin, use the UAC plugin
You only need to add this in the beginning of your installation script:
RequestExecutionLevel admin
This allow two parameters: admin or user, with admin execution level you may be able to start your application with admin privileges.
Related
We are using Jenkins to start a C# program using parameters. The job is started manually from Jenkins. It's run from a Jenkins node on another server.
The problem is the C# program is started with the login specified on the node. I want it to run with the user who triggered the build.
I tried to use the Authorize Project plugin but with no luck. The node still uses it's own login when running the C# program.
I have seen other posts on this topic with a suggestion to make a node with the specified login. This won't help me since I want it to run with the user who triggered the build.
I found out that I needed only the user name in the C# program. So instead of starting it with the logged-in user I just passed the current Jenkin user as a parameter. To get the user name as an environment variable I installed the build user vars plugin.
The command in the Jenkins configuration was then set to:
program_name.exe %BUILD_USER%
This doesn't answer the question directly, but it solved my problem.
I have a quite simple installer created with Wix Toolset. My users complaints that they can't deploy this installer as system user. They have to do it as user. However, I have learned that installers can be deployed as system user. Could anyone tell me what I need to do in my wxs file so that they can deploy it as system user?
We typically deploy our MSIs using Microsoft SCCM as SYSTEM. We use PSEXEC to invoke a CMD prompt as SYSTEM to do our dev testing before sending it to SCCM. There are two reasons an installer would fail as SYSTEM:
1) User error: I can't tell you how many times I've seen packages put into SCCM with invalid command line arguments. One of my favorite is quotation marks get turned into Unicode quotation marks via email transmission. Another is logging to a directory that doesn't exist. Another is forgetting to tell the MSI to run silently. It just sits there and hangs. Another awesome one is typing the MSI name wrong. It's especially awesome because they almost give me an SCCM log when I ask for an MSI log. No MSI log means it's not the MSI's fault.
2) Installer design error: Have you tested your silent installs? Do you have any custom actions that make assumptions about the user context / environment? One of my old favorites (not) was InstallShield InstallScript custom actions that would fail due to a poorly designed DCOM interface for talking to the MSI session handle. It's been almost 10 years since that was fixed but I still come across installers now and then. Another example is assuming that the user will have rights to another machine or the internet (SYSTEM typically has neither in a corp environment.)
I'd start with testing as SYSTEM using PSEXEC. Log the install and see what the error is. Otherwise you haven't really given us any details to give a specific answer for.
You should get them to do a verbose log of what happens when they do the install. There are issues sometimes related to user specific locations, for example a file going to the user's personal folder, what does that mean for the system account? Or the install or a custom action may assume that a drive letter mapped for a user is system wide (they're not - they are per user) and that can cause errors. That's what Chris is saying too - the context matters. The system account does not have access to the interactive user's desktop, the network, profile locations that make no sense for a non-interactive account and so on.
I also am a SCCM user and regularly deploy apps through SCCM... This WIX installer also drived me crazy. But Christopher's reaction helped me...
1) If Wix installers get tested using PSexec, they probably work, SCCM, I don't know what it is, but installs keep failing without apparent reason. (but it fails installing as System is true)
Solution: incorporate psexec in your script in SCCM...
add your setup.exe & psexec.exe in your source folder. Use following syntax in your setup script:
copy psexec.exe to your software source location.
%~dp0PsExec.exe -accepteula \127.0.0.1 "%~dp0setup.exe" --quiet
2) #WIX dev team: also try to test with SCCM!
3) if above fails, you can also extend the suggestion with:
add following syntax in your setup script:
c:\windows\system32\net.exe user /add WixHelpInstaller PaSSW0rd
c:\windows\system32\net.exe localgroup administrators WixHelpInstaller /add
%~dp0PsExec.exe -accepteula -u .\WixHelpInstaller -p PaSSW0rd \\127.0.0.1 "%~dp0setup.exe" --quiet
c:\windows\system32\net.exe user WixHelpInstaller /delete
I downloaded the community edition of IntelliJ as ideaIC-14.0.2.exe.
I ran ideaIC-14.0.2.exe with evelated rights on a Windows 7 64 laptop with the 32 bit version of Java 6 installed.
I notice that two copies of ideaIC-14.0.2.exe appears in task explorer when none were previously present.
Both tasks go away without the setup wizard ever appearing5. I saw nothing related in the Event log.
Do you know how I might be able to overcome this issue and install this app?
Disabling the Firewall was previously suggested and tried.Usually, I run every setup program with elevated rights. I was told that I never need Admin rights to install. This time, I added myself to the Admin user group (which you would think shouldn't be possible!) and then ran setup after once again disabling my firewall. And this time, it worked! I suppose it's possible that I did not disable all of the firewall options last time, but I believe I did. If so, elevated rights must have been insufficient. I forgot to try unchecking the Unblock property on the file-that was a good suggestion, though.
I'm writing an installer for an application. Most of the installer is done and working, but I have on more step outstanding. I need some way to add a setup window to the installer, that will take user input like server address and port, etc. and write these to the relevant files for system start-up. This preferably done through a GUI of sorts inside the installer.
I've tried creating an executable file that runs after installation, but this does not always execute on different systems.
Is there a way to add a GUI to the installer itself that executes after the directory structures and files have been put into place?
Thanks in advance.
In general you should seriously consider doing this as a standalone app that runs when the app first runs and needs configuring. Then it's a program that runs in a user context and can be tested and debugged in the normal way. At least consider what the user is going to do if they want to change the server address or the port - will they need to uninstall your app and reinstall it just to change the server details or the port?
The GUI may not run correctly when started from the install for a number of reasons. It may be initiated with the system account if it's a deferred CA. It wasn't started from the interactive user shell, so it probably won't have any idea of a working directory. It's being run from an msiexec.exe process running in the system directory and maybe with a system account - that's not really the place to be doing your GUI configuration.
I assume you're using WiX, it doesn't say so in your question but it's tagged with WiX.
I would have a read of http://wix.tramontana.co.hu/tutorial/user-interface-revisited (or http://www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/ has a relatively easy to read example), you can add or edit any of the dialogue boxes in the installer, you'll need to download the source to get at the built in dialog, and it does require some "play" to get everything quite right but worth it to get a professional looking installer.
I have created a path rule in Software Restriction Policies to install my msi (C:\temp\my_msi_file.msi). I have tried to install my application in non-admin account. It opens gently and starts installation. While installing it ended with the error "You do not have sufficient privilege to complete this action". In my installer i am accessing database and registry values. I think in this point the installation is fails. Is there anyway to run my msi application without admin privilege? It will be good to set in OS level.
Note: I want to give full access permission only the applications created by me.
Right click on the file; Select properties; Navigate to security tab; You can see the file permissions. Click edit. Select system in the list. Click Apply and Ok. Now you can install the file