How set .bat file to C++ -


Can anyone help, I've created a bit file, now I want to convert to C ++

In my Bat file, I need to make another file call name.bat, so now I want to use C ++ to execute all these commands.

My sample here:

  set / p CID = Curr_ID = set / p CIP = Curr_IP = set / p CIS = Curr_SUBNET = counter set to Curr_POrt hex from December / P CIPR = Currror = Set / P NID = New_ID = Echo CD \ & gt; & Gt; If.bat echo CLS & gt; & Gt; If.bat echo if exists del.bat goto: label1 & gt; & Gt; If.bat Echo: Label 1 & gt; & Gt; If.bat echo CD \ & gt; & Gt; If.bat echo c: & gt; & Gt; If.bat echo CLS & gt; & Gt; If.bat echo @echo off echo echo setup has ended !!! & Gt; & Gt; If.bat echo pauses & gt; & Gt; If.bat echo del del.bat & gt; & Gt; If.bat echo del name.bat & gt; & Gt; If.bat echo del if.bat & gt; & Gt; If.bat echo output & gt; & Gt; If.bat echo del name.bat & gt; & Gt; Del.bat echo CD rdsconfig & gt; & Gt; Name.bat echo rdsconfig.exe / CURR_ID =% CID% / CURR_IP =% CIP% / CURR_SUBNET =% cis% / CURR_PORT =% CIPR% / NEW_ID =% NID% / NEW_IP = 192.168.2.% NID% / NEW_SUBNET = 255.255.255.0 / new_pORT = 33536 & gt; & Gt; Name.bat START name.BAT    

I do not think you are efficiently using auto-batch Convert to C ++, but you can run each command sequentially with the system in the batch file (). Here's an example:

  #include & lt; Cstdlib & gt; Int main (int argc, char ** argv) {system ("cls"); Return 0; }   

This will clear the screen. I hope it helps.

Comments