How to turn off McAfee programmatically - windows-7

I am running McAfee VirusScan Enterprise 8.7i on my Windows 7 machine.
I am writing this utility to configure McAfee. Now how do I turn off McAfee programmatically (using C++ or C#)?
The only ways I can do it right now are:
Manually opening the McAfee Virusshield icon from the system tray and then selecting Exit.
Run a command prompt under SYSTEM account (using System internals tool psexec) and then issue the command "sc stop McShield"

I guess the point of virus scanners is that they CANNOT be switched off by other software (at least not easily)

Right click on the VShield icon in the system tray and choose Manage features and the VirusScan Enterprise
Double click on Access Protection to get to the properties
Un-check the option for "Prevent McAfee services from being stopped"
You should now be able to stop the McAfee services

Related

RunAs/Remote Desktop Windows Security - A Device attached to this device is not functioning correctly

Good Afternoon, never seen this one before in my years of working with Windows but im at a loss to try and find the solution to this one.
When users log on to their desktops as Non-Admin accounts, there are particular applications they need to run as different users due to the way some of the systems work. A load of system policies where updated for security at group policy level however now something strange is happening when the user initiates a RunAs by holding the shift key down or if they attempt to remote desktop to another machine, the NLA Windows Security box that prompts for credentials takes 5/10 minutes to appear.
When the user hovers over the taskbar icon, then over the window without clicking the Windows Security box displays as full screen missing the username and password box but when you click on it nothing happens and just disappears. Eventually after a few minutes the windows security box will appear and can log in as normal however the users jump into systems adhoc and cant be waiting for minutes at a time to put their credentials in which could cost a lot of user down time during the day.
I have tried looking at the security log but as you can imagine its filled with all sorts and trying to locate one specifically without knowing the issue is difficult at best. Has anyone had this issue before that can point me in any direction. I have to assume this is permission related on the devices trying to access something locally because when i log on to the devices with an account in the administrators group all these issues disappear and the windows security works as normal. Also, if they click "Run as administrator" they get the UAC credential box so i don't believe this is UAC related as its working by design just anything with "Windows Security" prompts. I should point out that whilst this is waiting - the File Explorer icon highlights under "Run As" like the explorer is waiting to do something.
OS - Windows 10 Pro
Acc - Domain Joined
Group policy enabled
Local Policy Disabled
Update: 21H2
Never seen this before but hoping one of you legends has!
Dev
Full Screen Box - Screenshot
For anyone reading this - although bizzare as it is...
It turns out it was McAfee Disk Encryption - there was a bug in the local FDE security provider causing it to hang every time it was accessed.
Update your McAfee FDE Client/Agent to the latest version

Windows printscreen not working on Software Installation

I am trying to take screenshots of the license information of the application before installing it onto my test window os.
When I click on the installer, the publisher window pops up asking me whether I want to launch the installer or not; But when I want to take screenshots or printscreen using keyboard shortcuts it doesn't work.
It seems that the keyboard shortcuts is disabled during this pop up install dialog.
All I want is to take screenshots at the publisher certificate information before installing the application.
Can anyone with experience on windows help?
UAC: If you are referring to the UAC prompt that shows up first to ask for elevation, then it happens on a secure desktop separate from your main one and hence the screen shot appears impossible. This separate desktop is a security measure. In actual fact it is perhaps the core security measure added to Windows in recent years (don't turn it off permanently).
Disable UAC Temporarily: You can disable this security measure temporarily so you can take a screenshot as described here: How to get a UAC screenshot. Here is a sample screen shot of a UAC prompt for an MSI installation: Numeric file name for msi created with Wix
Here is the essential procedure inlined:
Run gpedit.msc
Locate: Computer Configuration\Windows Settings\Security Settings\Local Policies\SecurityOptions:
Change "User Account Control: Switch to the secure desktop when prompting for elevation" to disabled
Undo this change after the screenshot or your system will be very insecure!

Audio Service Not Starting/Functioning Properly

My Audio Service refuses to function properly. I have tried so many different solutions I can't even recall all of them.
Here's how it started; I got home from work one day to see my computer has no video signal but is turned on and receiving input from my mouse/keyboard. I force restart my computer and, after it boots up, I see that the Windows Audio Service is stopped.
I first try to use the task manager to start the service (Audiosrv) and it would blink at Starting then immediately go back to Stopped. From here I went to the Services window and tried starting it from there (Windows Audio) and, after trying to start, says Access Denied (Error 0x80070005).
So after searching a solution I went into regedit and was told to add System as a permission group for AudioSrv and the AudioEndpointBreaker service. Turns out they were already there with FULL CONTROL for both.
I try to change the logon to use Local System Account (WITH INTERACT DESKTOP CHECKED!) and voila, my audio service is running! But my bad luck continues.
None of my speakers/headphones are creating sound even though the service turned on and I can see all my devices. As an attempt I tried to do test sound, and this error appears.
Keep in mind I've restarted after every one of these fixes, both the service and my computer afterwards. As a final attempt I tried to open the Command Prompt as administrator and entered sfc /scannow . After verifying, this message appears.
I honestly have no clue what could've happened while I was working, but I'd rather not have to reinstall my windows to lose all my files.
Recap of my attempts to solve
Start the Audiosrv service from Task Manager (failed to start but keep in mind the EndpointBreaker service was running)
Opened services window and tried starting the Windows Audio service (Access Denied [Error 0x80070005])
Tried adding System as permission group for AudioSrv and AudioEndpointBreaker to find out both already had Administrators, my user, and System with full Control.
Changed login to local system account with interact desktop control checked and it fixed! Supposedly. THIS WAS THE FIX FOR 99% OF PEOPLE ON THE FORUMS
After realizing my sound wasn't playing but my devices/control was showing up, tried testing sound and received an error.
Last resort I did a sfc /scannow command and was given the response shown above.
What should and what can I do to get my audio running?
SIDENOTE
When I drag the volume slider [which usually creates a tone with the volume adjusted], the speakers/headphones meter on the Sound window do NOT light up green (in other words they aren't showing sound receiving on its end)
I resolved this issue after doing a system restore.
Add the Local Service in the Local Users and Groups
Right-click This PC or My Computer, depending on which version of Windows you have, and select Manage from the dropdown menu.
To the right, you will see a System Tools section. Double click Local Users and Groups, and select Groups beneath it.
Right-click Administrators in the list in the middle of the window, and select Add to group.. from the dropdown menu.
Click Add, then Advanced, and then click Find Now. Double click Local Service, and click OK. You should see NT Authority\Local Service in the list, click OK. Close the Computer Management window and reboot your device. Your problem should be solved.
Then in services.msc change logon to LOCAL SYSTEM.
If you dont permission to run Windows Audio:
key windows + Services
search Windows Audio
right click settings
login
Local system account and allow the service to interact with the desktop
save and run Windows Audio

windows 2003 doesn't open cmd as "interact with desktop" when using scheduled tasks

i have two windows servers : windows server 2003 and windows server 2008.
in windows 2008 when i start a batch script through scheduled task,
it opens a visible CMD window with my batch on it.
in windows 2003 on the other hand when i start a batch script through scheduled task,
it doesn't open a visible CMD window (interact with desktop not available?) but i can see the process of the batch running in the background.
does anyone knows how can i activate the Desktop? so i can see the CMD open
Thanks :)
so i found the solution. there were two thing i had to do:
A- check the checkbox for "Run only if logged in" in the task itself.
B- enable "Allow service to interact with desktop" on the task scheduler service.
1.)Click Start, click Control Panel, and then double-click Administrative Tools.
2.)Click Computer Management.
3.)Expand Services and Applications, and then click Services.
4.)Right-click the Task Scheduler service, and then click Properties.
5.)On the General tab, make sure that the startup type is set to automatic, and that the service status is Started. If the service is not running, click Start.
6.)On the Log On tab, make sure that the local system account is selected, and that the Allow service to interact with desktop check box has a check mark.
7.)Click OK, and then quit Computer Management.

Why application that require administrative privileges cannot run automatically on Windows startup(windows 7)?

I have a application(which runs on windows7 and requires run as administrative) that need to run automatically when windows starts up, so i added a registry key under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" as usual, but my application won't startup automatically even the UAC dialog doesn't promtp, after search from google. I know i can use task scheduler to workaround this, but is there anyboday can tell me why the "run" registry way doesn't work? why the UAC dialog doesn't promtp? it is better if you can help to find a article from microsoft to explain this issue, many thanks in advance!
It is for making the machine usable as quick as possible after booting.
Microsoft Whitepaper: Developing Applications that Run at Logon on Windows Vista
When Windows starts, there is no user to show the UAC prompt to, so your process would have to be held up until an administrative user logs in.
The Task Scheduler is the right way to do what you want.

Resources