My executable file in the visual studio code is being deleted by McAfee automatically saying it detected a virus in it - c

Till yesterday my Visual studio was working properly with all C programs running perfectly. But today i got one error saying
Program 'a.exe' failed to run: The system cannot find the file specifiedAt line:1 char:1* .
+ ./a.exe
+ ~~~~~~~.
At line:1 char:1
+ ./a.exe
+ ~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
This executable file was getting deleted by my McAfee automatically saying it detected a virus in it.
Please someone help me with this.

I was facing the same problem but what I do is turn off real time scanning for the time I am using vs code and then programs run. Though this is not permanent solution but this works temporarily for me.

You can exclude your project folder or where your a.exe is generated. Go through the steps given below:
Open your McAfee security software.
Click PC Security (on Windows).
Click Real-Time scanning.
Click Excluded Files.
Click Add files.
Browse to, and select the files, which you want to be excluded from the virus scan.
In this way, you can tell your virus scanner that these are known safe files not a trojan or malware.

There is no any fault of visual studio code or your Mingw Compiler. There is some issues with McAfee virus protector. I also had same problem. But I have change my virus protector and now my problem is solved.So you can try it.

Related

Vs code shows an error when I use scanf function

I am learning C, but whenever I run a program I get this error:
a.exe failed to run: Access is denied
+CategoryInfo: Resources Unavailable:(:) [], Application failed exception
+ Fully qualified error is : nativecommandfailed
This error is because of McAfee (real-time scanning) but I don't know how to stop it.
I think it's asking me to put input when I use the scanf() function but it shows an error.
I think your antivirus software, McAfee, is preventing the execution of the .exe file for security purposes. Could you try disabling this feature? Additionally, please ensure that you have installed the C compiler for running your code in Visual Studio.

Visual Studio Code extensions stopped working suddenly

I'm having problem with my Visual Studio Code. Yesterday I had my pc shut down with VS Code open, and when I turned pc on again, all VS Code extensions stopped working. I'm using React and Typescript in my project and I really need those extensions. My eslint and prettier configurations also stopped working.
If somebody had the same problem please answer.
I had this problem too. You can fix with the following:
Open the command palette (Ctrl + Shift + P)
Run Disable All Installed Extensions
Then run Enable All Extensions.
Restart Visual Studio Code
You can make sure again that the extensions are enabled.
i too had a similar issue, and found (thru trial and error and multiple stackoverflow searches)
fix
toggle Developer Tools once you have vs code open
select the console tab
scroll thru the log, paying close attention to the red errors/
- if it's extension errors, open file explorer and go
$drive:\Users\Yourname.vscode\extensions
delete any problem extensions
Restart VSCode and all should be well (at least for me it was)
cheers and happy coding :)
I had that problem on WSL (Windows Subsystem for Linux). The error was like this:
/mnt/c/Users/Admin/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.13/scripts/wslCode.sh: 69: /home/raul/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin/code: not found
The solution was to go to Windows PowerShell and open Visual Studio Code, then go to the extensions and restart the Remote - WSL extension, and go back to WSL. It then started working immediately.
in my case removing "Todo Tree" plugin which is one of the VS Code plugins solved the problem,
https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree
if it is installed uninstall it and the problem will be solved
It's weird. when I use WSL2 terminal opening Visual Studio Code, an exception occurs, expressing that wslCode.sh: 69.
But when I open Visual Studio Code in Windows, then type code . in WSL2 terminal, it works without an exception.
Please check if you are able to turn on your settings sync. I had an issue like this and I couldn't even access the account option on vs code (the second last icon on the right horizontal panel.
If not (it's a long shot) try uninstalling vs code and reinstalling VS Code completely. I used these commands to do so (works for mac)
This happened to me in the portable version (1.73.3). I deleted the extensions folder {vscode root}/data/extensions. Re-installing all extensions afterwards worked for me

Apex replay debugger is throwing Java 8 is required to run

I am following this trail and I have completed all the steps correctly. Even I able to download the debug logs.
But Problem occurs when I am trying to run the following command
> SFDX: Launch Apex Replay Debugger with Current File
It shows the below error.
But, the thing is, I have jdk-12.0.1 installed on my PC. After that, I have installed the Java 8 also and thus jdk-1.8.0_181 is also installed.
My Java Home setting in VS code is following
I have also restarted my PC, But no luck. It is throwing the same error.
How to solve this ?
You have to set the path as 'C://Program Files//Java//jdk1.8.0_181' and then restart the vs code
In case any Mac users needed help:
I installed Java 11 and then ran this code:
/usr/libexec/java_home -v 11 to find the exact directory and then pasted it in the user settings you have marked with a red rectangle. Then I restarted VS code and it worked.
Edit: Looked at your screenshots...
You did this: C:\Program Files\Java\jdk1.8.0_181
You wanted this: C:/Program Files/Java/jdk1.8.0_181
From the Trailhead unit you linked:

Unable to load adalsql.dll error when calling `Invoke-sqlcmd`

I have VS2015 with SSDT installed, along with SSMS and the SqlServer PowerShell module (which includes the invoke-sqlcmd comand), and yet If I try to execute a query against an Azure SQL Data Warehouse like so:
invoke-sqlcmd -Query "Select top 5 * from customer" -ConnectionString "Server=tcp:my.database.windows.net,1433;Database=Customer; Authentication=Active Directory Integrated; Encrypt=True; "
I get the following error:
invoke-sqlcmd : Unable to load adalsql.dll (Authentication=ActiveDirectoryIntegrated). Error code: 0x2. For more information, see
http://go.microsoft.com/fwlink/?LinkID=513072
At line:1 char:1
+ invoke-sqlcmd -Query "Select top 5 * from vwOffer" -ConnectionStrin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-Sqlcmd], SqlException
+ FullyQualifiedErrorId : SqlExectionError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand
invoke-sqlcmd :
At line:1 char:1
+ invoke-sqlcmd -Query "Select top 5 * from vwOffer" -ConnectionStrin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ParserError: (:) [Invoke-Sqlcmd], ParserException
+ FullyQualifiedErrorId : ExecutionFailureException,Microsoft.SqlServer.Management.PowerShell.GetScriptComman
If I try and install adalsql.dll directly, I get a message stating that A higher version already exists and I can see the both versions of the dll can be found here:
C:\Windows\SysWOW64\adalsql.dll
C:\Windows\System32\adalsql.dll
and yet, invoke-sqlcmd cant find it. Any idea how to either (A) register the existing dll so invoke-sqlcmd can find it or (B) uninstall it so that it can be re-installed?
Incidentally, I am able to use Active Directory Authenticatoin with the 32-bit SQLCMD.exe, so I know the 32 bit dll is working fine. It's just the 64 bit dll that isn't loading properly...
So, this problem vexed me as well. I'm unclear as to how it happened, but maybe it's just coincidence that it happened when I installed the latest version of SSMS. My fix was to:
Navigate to Add or Remove Programs
In the little search window type sql, or just go find: "Active Directory Authentication Library for SQL Server".
Note: This will not be in Windows' installed programs list if you have installed Visual Studio 2019. You can run the same installer by invoking MsiExec.exe /I{6BF11ECE-3CE8-4FBA-991A-1F55AA6BE5BF} from a command prompt.
Uninstall that little guy
Navigate here and download the latest ADAL library (pick x64):
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48742
Just for kicks, reboot
Your stuff should now properly load adalsql.dll!
Update #3, 2020-07-13: Installing the older version works, but is vulnerable to being clobbered by the SSMS and VS2019 installers. The reason the new version of ADAL doesn't work is because its installer fails to add a registry entry pointing to the 64-bit version of adal.dll. I added an answer below which includes the missing registry value, which you can add yourself. Once that's done, you should never need to do this dance again. - #Tullo_x86
The bewilderingly simple solution to this annoying problem
Ensure you actually have ADAL installed (the existence of C:\Windows\system32\adal.dll is plenty)
Paste this into a .reg file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSADALSQL]
"TargetDir"="C:\\Windows\\System32\\adal.dll"
Double-click the .reg file to install that value
You're done. Go celebrate!
Explain WTF is going on. Why this is necessary?
This error happens because the .NET adapter for SQL Server can't find adal.dll. But why is this? It's installed, right?
Well, the installer for the latest version of ADAL (packaged with VS 2019 and the latest version of SQL Server Management Studio) adds a registry entry for the 32-bit version of the DLL (at C:\Windows\SysWOW64\adal.dll), but does not add the entry for the 64-bit version (which gets installed to C:\Windows\system32\adal.dll). If you build and run your application in 32-bit mode, you'll never see this bug manifest.
This is simply a bug in the ADAL installer. Presumably it wasn't detected by Microsoft because both Visual Studio and SSMS are 32-bit applications and thus don't go looking for the 64-bit version.
In my case culprit was VS 2019.
It has newer version of ADALSQL package. For me it was at path "C:\ProgramData\Microsoft\VisualStudio\Packages\sql_adalsql,version=16.0.61903.25110,chip=x64,language=en-US", which I uninstalled and installed desired version to resolve the issue.
Hope this helps!
In my case, add/remove programs didn't show any installed instances of "Active Directory Authentication Library". Yet, trying to install the library would fail saying a newer version was installed.
I un-wedged myself by opening the registry editor (regedt32) and using the Find feature from
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer
looking for adalsql.
That got a hit with containing keys
DisplayName: Active Directory Authentication Library for SQL Server
DisplayVersion: 15.0.1300.359
along with, importantly, a path to the associated installer. For me it was something like c:\windows\installer\4c334521.msi. I ran that msi and was finally able to "uninstall". After that, running the installer from the 'library' link above finally worked.
Or you if planned to upgrade SSMS in the time being, simply uninstall "Active Directory Authentication Library for SQL Server", and repair SSMS.
Next time you upgrade SSMS it won't broke anything. SSMS bring his own adalsql.dll, and know how to upgrade it when you upgrade SSMS. But if you had installed adalsql with something else (or using https://www.microsoft.com/en-us/download/confirmation.aspx?id=48742 ), SSMS is somehow broken.

Getiing error message 'Failed Installing JBAS50SVC' whle running service.bat file in Windows 7

I need to run Jboss 7 as service.
Followed these steps :-
Copied my Jboss to C:\Program Files <86>
Downloaded Jboss-native-2.0.10-windows-x64-ssl and copied the contenst of bin catalog to %JBOSS_HOME%/bin
Changes done on service.bat as per link instructions
https://community.jboss.org/message/724488
Changed my dir location to my Jboss bin
and given command service.bat install
C:\Program Files \jboss7>bin>service.bat install
Failed installing JBAS50SVC
Access is Denied.
Service JBoss Application Server 7.1.1 installed.
I'm not able to rectify this problem .
It appears to be windows access issue.
Try the following:
Does the windows ID you are using have Administrator privileges? If no, get a Admin ID else if Yes, proceed to step 2.
Try to do the same but in some other drive (not c: )
UPDATE #1 : OP says he can not see the output of service.bat file
Follow the following steps
Open start menu
Search for "cmd"
Right click "cmd" and run as Administrator
type in following command
cd C:\Program Files \jboss7\bin
Type service.bat and observe the output
On a 2008 Windows Server this occurs because you're not running the command line as an administrator. Those of us who have spent considerable amounts of time on 2003 server, and others before that, keep forgetting that your logged in ADMIN level account does NOT get passed to the command line automatically like with previous versions of Windows.
With any additional errors, past this one, I would keep going back to the service.bat file and looking at the path statements, throughout that file, to ensure that they are all correct to reach what is correct for your installation.
Also, don't forget to create a log folder under standalone (unless you're doing a domain install). Failure to do that will also cause issues as well.
yoda

Resources