I would like to make a simple program to hide/unhide hard disk partitions in windows. In order to accomplish that I have to run commands in command prompt as well as in diskpart within the program. I have heard that the command "system()" can be used to run commands in cmd , but what about diskpart?.
Also, I nee to know how can I pass arguments to cmd/ diskpart commands which are stored in c++ variables?
Eg:
1 2 3 4
char drive;
cin>>drive;
system(cd /d drive) /*do this statement work to change the directory to the drive stored in "drive" variable? what about this in diskpart?*/