APPCMD is create empty file - iis

We have issue with executing APPCMD and it produces empty file.
When we try with below command
AppCmd list AppPools > c:\test\test.txt
It creates a empty file.
But when we just list in cmd prompt like below is works
AppCmd list AppPools
We have opened cmd prompt as administrator as well
Am I missing anything??

We have uninstalled all the IIS components and reinstalled in Windows 2012 R2 and it is working now

Related

View logs of electron-builder packaged AppX package

I've created an Electron app and I'm packaging it using Electron Builder. I'm using the AppX (Windows Store) format for Windows.
How can I view the app's logs i.e. console.logs from main node process?
I need to be able to view logs for the packaged version of the app as the app launches fine without AppX packaging, but fails with it.
On macOS, Linux and 'Windows with NSIS' instead of AppX, launching the app via the command line is sufficient to view logs
I've already tried launching AppX packages from the command line:
The only way to launch Windows Store apps from the command line is to follow these steps:
From here
Run explorer.exe shell:AppsFolder in cmd
Find the app, and create it's shortcut on the desktop
Open the shortcut's properties and copy the "Target" field
Run get-appxpackage > list.txt in PowerShell
Open the file (located in %USERPROFILE%)
Find and make a note of the PackageFamilyName and InstallLocation corresponding to the Target name copied earlier
Open the file AppxManifest.xml present in the InstallLocation
Search for "Executable=" in the file, make a note of the value of "Application Id" above the line containing "Executable=".
Run the command explorer.exe shell:appsFolder\<PackageFamilyName>!<Application Id>, substituting <PackageFamilyName> for the Package Family name noted earlier and <Application Id> for the Application Id noted earlier to run your app.
This works but doesn't actually connect node's stdout to the terminal
I don't know how you can see the log but the part where you launch the app from the command line seems like overcomplicated.
Here is a thread on how to launch an app from an appx/msix from the command line properly:
How to properly set AppExecutionAlias so the program could be launched from command line?

Netbeans 12 on Windows won't let me connect Tomcat

No matter which tutorial I follow, I am unable to get apache-tomcat-8.0.9 to work with Netbeans 12. The IDE keeps showing the error message The specified Server Location (Catalina Home) folder is not valid. I'm using jdk-14.0.1 and apache-ant-1.9.15.
The error:
My Catalina home directory C:\Program Files\apache-tomcat-8.0.9
Perhaps this error testing tomcat from the command line has some clues?
Based on the last link from the question try this:
In file nbproject/project.properties try to change this line (it may contains other path)
endorsed.classpath=\
${libs.javaee-endorsed-api-7.0.classpath}
to this:
endorsed.classpath=
I had the same problem and I fixed it by created CATALINA_HOME environment variable. For creating CATALINA_HOME in environment variable specify the path of catalina.bat file in tomcat folder installation without bin folder.
Ex: if you have catalina.bat in C:\Program Files\Apache\Tomcat\bin\catalina.bat, then specify in CATALINA_HOME just C:\Program Files\Apache\Tomcat as path.
I solved it in this way:
Go to the folder of Tomcat and enter, the system tells me that I don't have rigths, and if I want enter? I select yes. The system displays the content of the folder. I try again to conect netbeas with tomcat and now it works.

Unable to activate virtual environments on Windows 10 with Python 3.7 using cmd

I am having a problem with activating a virtual environment by the name FYP using cmd on Windows 10. I checked the bat file, which is of 1KB size.
See the below commands or image. It should have (FYP) on the start after running the activate.bat file.
C:\Users\Manish>M:
M:\>ENV\FYP\Scripts\activate.bat
M:\>
But using a similar command in PowerShell or VS code will get the environment activated.
Check the below image or command. It is showing (FYP) on the start of the command, and FYP env is now activated.
PS M:\> cd .\ENV\
PS M:\ENV> .\FYP\Scripts\activate
(FYP) PS M:\ENV> cd ..
(FYP) PS M:\> cd .\projects\
Earlier when I had Windows 7, the virtual environment was getting activated on both PowerShell and cmd as well. And I used similar commands in both cmd and PowerShell.
M:\ENV>FYP\Scripts\activate
But with Windows 10, I don't know why it is not getting activated on cmd.
Please help?
Is there any specific reason why the virtual environment is not activating.
The command line needs to know where to start. Add .\ to tell it that start in the current directory.
c:\Program Files (x86)>".\Internet Explorer\iexplore.exe"
So basically, I can easily activate it through Visual Studio Code's terminal(Powershell), using the command
<PATH_TO_VENV>\Scripts\activate
<PATH_TO_VENV>: where you have created the virtual environment.

How to uninstall mongodb from Windows

I saw a tutorial that said to run this:
C:\mongodb\bin\mongod.exe --config C:\mongodb\mongod.conf --remove
but that command does not work since there is no mongod.conf file in the mongodb folder in my Windows. Besides, I don't want to only stop the service, but to remove everythin, including files, services, etc. Is that possible?
I am using Windows 8.1.
The command...
C:\MongoDB\bin\mongod.exe --config C:\MongoDB\mongod.conf --remove
Is used to just remove the service.
If you don't have a mongod.conf and/or no longer have the .msi installer (who keeps that stuff?) then:
win-key + r and run regedit
Navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MongoDB (or just cut and paste this path)
Once there right click on MongoDb and click Delete. Service is now gone.
Goto C:\mongodb (or where you installed it) and delete directory. Mongodb is now gone.
Check your system environment variables to see if it's in your path (It will not exist unless you put it there).
Alternatively you may be able to re-download the msi and try using that.
EDIT: If you forgot to stop the service first or if it left dead orphan in services then open CMD or other shell as administrator and run the command: sc.exe delete MongoDB ... you should see: [SC] DeleteService SUCCESS
Use the command below to delete the service:
run cmd as Administrator
sc delete MongoDB
Since you're using Windows, just run the same .msi file that you installed it with.
It should be in your downloads folder, i'm guessing.
Once you opened the file, press next and there you will have the complete access to remove your MongoDB installation.
Run the mongo-db installation file that ends with .msi.
You'll see the remove option there, click on it.
Then you could delete the mongo-db files that are in your computer.
Go to services.msc and stop MongoDb service .
Delete all the folders in C: drive where MongoDb Folders exists.
Remove data folder if you created previously.
Type cmd in start and ryt click on cmd and select run as
administrator and type below Command.
sc delete MongoDB
If it throws some error like service not exists then open properties of the service and check whether you are giving the proper service name.
net stop MongoDB : This will stop your mongo server(in case of windows) then simply delete that MongoDb folder.

Showing error "nvmw command not found" when setting the path of nvmw in Nodejs

I am new in Nodejs. I want to install nvmw in my system. For that first I clone the respiratory using this command
git clone git://github.com/hakobera/nvmw.git "%HOMEDRIVE%%HOMEPATH%\.nvmw"
after that for activating nvmw, I used this command
set "PATH=%HOMEDRIVE%%HOMEPATH%\.nvmw;%PATH%"
in E drive.Folder is also created in E drive in name of %HOMEDRIVE%%HOMEPATH% and inside the folder all the datas and nvmw folder also created.
But after that when I am running this command nvmw help, it shows "nvmw command not found". I tried by changing the folder name also but it shows the same error. I think I am doing some mistake in setting the path.
In my case, that command is not working on Windows PowerShell.
The command for setting System Path should be run Windows Command Prompt.
In the other hands, you can add installed path with GUI.
For Windows PowerShell, see following question:
Setting Windows PowerShell path variable

Resources