UAC prompt electron when installing app in admin and non-admin user - windows

below are our electron and builder versions,
"electron": "13.1.7"
"electron-builder": "22.11.9"
in electron-builder file, our configuration have
"win": {
"requestedExecutionLevel": "requireAdministrator"
}
and nsis configuration as below,
"nsis": {
"warningsAsErrors": false,
"installerIcon": "assets/icon.ico",
"runAfterFinish": true,
"oneClick": true,
"perMachine": false,
"installerHeader": "assets/installerHeader.bmp",
"installerSidebar": "build/installerSidebar.bmp",
"createDesktopShortcut": true,
"include": "build/installer-qa2.nsh",
"artifactName": "${productName}.${ext}"
}
as per above config, we have supported our application for both admin and non-admin user
we are facing 2 issues :-
at time of installing app in admin user -> asking UAC prompt only with Yes and No option,
and every time running application, asking same prompt
at time of installing app in non-admin user -> not asking UAC prompt with admin credentials, app gets installed properly,
but every time we run application after exit it, its asking UAC prompt every time
What we want to achieve -
in 1st point mentioned above, running app every time it should not ask for UAC prompt with Yes and No buttons
in 2nd point mentioned above, it should ask UAC prompt with admin credentials only at time of install/uninstall application,
it should not ask for UAC prompt every time we run the application
Can anyone please help us out to achieve as per above mentioned points?

Related

Task scheduler runs console app task only for the first time

I created console app in .Net technology. App works fine when I trigger it by click on exe setup (console shows up for about 5-6 min and that's how it should work), so I put it into Task Scheduler(Windows Server 2022) as a Task with settings:
1.General: Administrator, Run only when user is logged on.
2.Triggers: one time at xxx after trigerred repeat every 15 min, enabled.
3.Actions: Start a program with start in optional parameter (where exe file is).
4.Conditions: none checked.
5.Settings: allow on demand, do not start a new instance.
When I run it from windows explorer task runs properly for the first time. On the next start it stops running. Nothing happens. No errors/unusual results in history. Status changes to Running for 2-3 sec and get back to Ready. if I run it again from the explorer level, task runs properly again, but only for the first time.
What I've tried:
1.Change user (system, local service, network service, administrator).
2.Run logged in and not logged in.
3.Highest priviliges on/off.
4.Every kind of trigger time option.
5.With and without optional start in.
6.Different locations(desktop, C:/, other).
7.Run as Admin in .exe properties.
8.Every checkbox on/off in settings.
Anyone faced this issue? Thanks in advance.

Slack stuck on Sign-In page

I am having an issue correctly opening / creating workspaces from the Slack Electron desktop app. When I open my app, here is the screen that is displayed :
I then proceed to signing in, get redirected to my browser, successfully sign-in and click on the xdg-open link to get redirected to my desktop app. At this point, the initial slack window with the sign in button doesn't change.
What I have tried
Initial installation made with snap
Deleted ~/.config/Slack directory
Uninstalled snap package and installed from AUR using Yay
Launched slack from terminal for more debug logs
Tried to launch slack manually from the magic-link that was logged
The logs during the login process do not report any errors, here is a snippet of them :
[02/02/22, 09:56:42:641] info: Store: UPDATE_SETTINGS {
"mainWindowSettings": {
"fullScreen": false,
"maximized": false,
"bounds": {
"x": 351,
"y": 176,
"width": 1024,
"height": 768
}
}
}
[02/02/22, 10:03:26:522] info: Store: HANDLE_DEEP_LINK {
"url": "slack://somecode/magic-login/somenumbers"
}
After this, I tried checking in for some possible Window manager errors but I could not find any
Here are my system specs :
Weird thing is, I have compared my two desktop envs, using the same distro/WM/version of slack and nothing seems different or not up to date.
Thanks for taking the time to help me out
Are you using Chrome (or Brave, Edge, Chormium et al) by chance?
Copy the url from the newly opened window and paste in Firefox, should work.
It's the kde-cli lower-casing things it should not.
As answered here the workaround is to check what command kde-cli is running and run it manually replacing the Slack workspace ID with this uppercase version.
Reproducing the solution here:
run this:
while sleep .1; do ps aux | grep slack | grep -v grep | grep magic; done
then try to signin again, when the browser tries to open slack, the command above will output something like this:
kde-open5 slack://WORKSPACE_ID/magic-login/...
/usr/lib/slack/slack --enable-crashpad slack://workspace_id/magic-login/...
So you run the command above replacing workspace_id with its uppercase version
It's definitely a KDE thing.
I have this problem as well, under KDE (on RHEL 8 and on Fedora 35).
It used to work, a few months ago.
Now, no matter what I have tried (including passing the callback URI by command-line, etc.) it simply does not process the login call.
I know there are a few interaction points between the Slack Electron client and the desktop environment (use of the keyring manager for example).
I tried very hard to debug this.
I think the next step would probably be to install older and older versions of the Slack app until I find the point at which it stopped working.
I'm not sure we'll get a ton of support from Slack on this, since RHEL 8 dropped official KDE support.
Using firefox worked for me though my problem is different to yours.
I was removed from the only workspace I used. Then I couln't sign-in to any other workspace. Sign-in only redirected me to the old workspace, opening from chrome didn't do anything it kept going back to sign in page as shown by OP.
In my case the following helped me:
1- Right click on slack icon.
2- Troubleshooting
3- Report Issue
Slack ask me to pass credentials. Then on the top I clicked 'Your workspace' button, it redirected me to browser and I was able to login to the app.
Tried everything commented before but nothing worked on my nex x1 9gen Kde, but installing previous insider/edge version.
sudo snap install slack --channel=insider/edge

Windows 7 Credential Provider (samples) Lock and UNlock

I've been trying out the examples provided by microsoft
SampleCredentialProvider
as a test i've compiled one of them and registered the dll. The logon screen now displays two additional tiles, "Administrator" and "Guest", Clicking on Administrator and providing a valid password allows me to login without issues,
however once I lock the screen and then do unlock, I re-enter the password but I get "Logon failure: unknown user name or bad password".
Has anyone come across such issues?
Could it be that the computers are part of domain?
Answered : I was using a beta version of the samples, always ensure you download the latest version
Changes include
• Fixing unlock. Post-Beta2, Windows Vista changed to require a KerbWorkstationUnlockLogon message type to unlock the machine and a KerbInteractiveLogon message type to log on to the machine. Previously it would accept a KerbInteractiveLogon message type for both logon and unlock. The samples have been updated accordingly. [v3.0]

Access is denied. Unable to open the service 'Tomcat5'

I'm not sure what's happening here. I have Tomcat5.5.26 installed on a Windows2008 Server. The service works fine and starts automatically. However, when I log into the system, I get a dialog box saying "Access is denied. Unable to open the service 'Tomcat5'. There are no issues with the service (afaik) and I can view it just fine through services.msc. In fact, I've verified that I can change the logon credentials of the service and its start-up type.
I've tried searching the Windows Event Logs for this error, but can't find it. Any idea why it's popping up?
The account I'm logging in as has Administrator Privileges, though interestingly when I try to run Tomcat5w.exe, unless I explicitly right-click and choose 'Run as Administrator' I'm not able to open it.
It turns out the last statement I included about permissions was the key. It's still not clear to me why I get the error on startup, since my account has sys admin privileges, but...
... to make the error go away I had to right-click on the tomcat5w.exe file (\bin\tomcat5w.exe) > properties > compatibility tab. Under sub-section 'Privilege Level' check off 'Run this program as an administrator'.

VS2005 Setup project - program asks for installation media when started for the first time by another user

I have a very simple VS2005 deployment project that aims to install for all users on a PC.
All the application files are written to %Program Files%\MyProg. A shortcut is created in the start menu and the startup folder. No registry settings or anything else are created. I have set
'InstallAllUsers' to true.
The created MSI runs fine and installs the software. It works without any problems when running under the user account from which it was installed.
When logging in as another user, the start menu and startup icons are present. It attempts to launch the application however an installation window pops up and states that 'the feature you are trying to use is on a network resource that is unavailable.' The installer will only proceed if pointed to the original MSI file.
Why does this happen? I want my application to be installed completely for all users when it is installed by a single user.
edit: Solution
I was getting similar event log messages as shown on this page. In my case it turned out to be as simple as ensuring that the User's Program Menu had its 'AlwaysCreate' attribute turned to false. If it was true, windows would try and recreate the folder when a new user logged in. This somehow required the invocation of the installer and thus resulted in the 'please insert the installation media' prompts.
It is actually kind of hard to say without some more information. I would recommend checking on the rights in the installed folder (seeing if only the one who installed it has rights) and also checking the file list for the directory (to make sure VS didn't automatically place some files in the user profile). Let me know what comes out from those two steps and we can try to keep digging if that didn't shed any light on it.
Keep in mind chances are this is most def not specific to Visual Studio, look at this MS support article here where the same message is coming back for office.
I know this is an old post but I thought I'd add another cause and solution in case the above didn't work for you.
There is a bug in VS Setup and Deployment Projects which results in registry values being entered into HKCU instead of HKLM irrespective of the InstallAllUsers property being set to true.
You must use Orca msi editor to change the registry root for "DesktopFolder" and "ProgramMenuFolder" from either 1 or 2 to -1. The issue cannot be resolved via VS.
http://www.qa.downappz.com/questions/vs-2010-deploys-per-user-features-during-install-which-require-access-to-install-media.html

Resources