My friend have a problem and he can't access CMD, so I wrote this to help him
It's working pretty fine, my problem is that I can't pass the command "cd .." or navigate to any directory.
Is there any solution for that?
Thanks in advance
1 2 3 4 5 6 7 8 9 10 11 12
#include<iostream.h>
#include<windows.h>
int main(){
char command[100];
while (1){
cout<<"Enter a command:\n";
cin.getline(command,100, '\n');
system(command);
cout <<"\nDone!\n";
}
return 0;
}
Yea It probably is a virus, Go into system 32 and check if all the cmd commands are all there.
If not, Do a windows repair.
especially cmd.exe Also look in your Registry ( doubt anything in there) , and services.
change #include <iostream.h>
to just #include <iostream>
Thank you guys, but I'm not trying to fix anything he has, and it's not a virus
I've tried it on many computers, I get the same.
I don't want the cmd.exe to work again, all I want is the "cd" command to work and be able to navigate.