تبلیغات :
ماهان سرور
آکوستیک ، فوم شانه تخم مرغی ، پنل صداگیر ، یونولیت
دستگاه جوجه کشی حرفه ای
فروش آنلاین لباس کودک
خرید فالوور ایرانی
خرید فالوور اینستاگرام
خرید ممبر تلگرام

[ + افزودن آگهی متنی جدید ]




نمايش نتايج 1 به 5 از 5

نام تاپيک: نحوه ایجاد یک batch فایل برای ویندوز

  1. #1
    حـــــرفـه ای mahdi7610's Avatar
    تاريخ عضويت
    Mar 2007
    محل سكونت
    قـــــــم
    پست ها
    6,150

    پيش فرض نحوه ایجاد یک batch فایل برای ویندوز

    سلام دوستان عزیز

    می خواستم بدونم چه طور می شه یک دستور مثل دستور زیر را به صورت یک batch فايل ويندوز در اورد و توی ریکاوری کنسول فقط اجراش کرد . نحوه اجرای اون توی ریکاوری کنسول را هم لطف کنید و یگید

    md tmp
    copy c:\windows\system32\config\system c:\windows\tmp\system.bak
    copy c:\windows\system32\config\software c:\windows\tmp\software.bak
    copy c:\windows\system32\config\sam c:\windows\tmp\sam.bak
    copy c:\windows\system32\config\security c:\windows\tmp\security.bak
    copy c:\windows\system32\config\default c:\windows\tmp\default.bak

    delete c:\windows\system32\config\system
    delete c:\windows\system32\config\software
    delete c:\windows\system32\config\sam
    delete c:\windows\system32\config\security
    delete c:\windows\system32\config\default

    copy c:\windows\repair\system c:\windows\system32\config\system
    copy c:\windows\repair\software c:\windows\system32\config\software
    copy c:\windows\repair\sam c:\windows\system32\config\sam
    copy c:\windows\repair\security c:\windows\system32\config\security
    copy c:\windows\repair\default c:\windows\system32\config\default

    ممنون می شم اگه کامل توضیح بدین

  2. #2
    حـــــرفـه ای piremard's Avatar
    تاريخ عضويت
    Aug 2006
    پست ها
    6,618

    پيش فرض

    برای این مورد شما فقط کافیه محتویات رو داخل نوتپَد وارد کنید
    بعد در هنگام ذخیره کردن پسوند فایل رو به bat تغییر بدین
    برای سایر موارد اینها فرامین بچ فایل هستند :

    @----------------------------------------------

    Does not echo back the text after the at symbol. This is most commonly used as @ECHO OFF to prevent any of the commands in the batch file from being displayed, just the information needed. %1 The percent followed by a numeric value, beginning with one, allows users to add variables within a batch file. The below line is an example of what can be used in a batch file. echo Hello


    ----------------------------------------- %1
    When the above one-line batch file is created, add your name after the batch file. For example, typing myname (being the name of the bat file) and then your name:
    myname bob
    would output:
    Hello bob
    Note: This can be extended to %2, %3, and so on.


    ----------------------------------------------:LABEL

    By adding a colon in front of a word, such as LABEL, you create a category, more commonly known as a label. This allows you to skip to certain sections of a batch file such as the end of the batch file. Also see GOTO.


    ----------------------------------------------CALL

    This is used to run another batch file within a batch file. When the batch file that is called is completed, the remainder of the original batch file is completed. Note if the batch file does not exist it will give an error message. CHOICE See [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] for an example of how to use this command.----------------------------------------------CLS

    Just like the DOS command would clear your screen.----------------------------------------------ECHO

    Will echo a message in the batch file. Such as "ECHO Hello World" will print Hello World on the screen when executed. Note if you have not typed @ECHO OFF at the beginning of the file this will also print "ECHO Hello World" and "Hello World". If you would just like to create a blank line, type ECHO. adding the period creates an empty line.

    ----------------------------------------------EXIT

    Exits out of the DOS window if the batch file is running from Windows.

    [IMG]file:///F:/DOCUME%7E1/unsec/LOCALS%7E1/Temp/moz-screenshot.jpg[/IMG][IMG]file:///F:/DOCUME%7E1/unsec/LOCALS%7E1/Temp/moz-screenshot-1.jpg[/IMG][IMG]file:///F:/DOCUME%7E1/unsec/LOCALS%7E1/Temp/moz-screenshot-2.jpg[/IMG]----------------------------------------------GOTO LABEL


    Used to go to a certain label, such as LABEL. An example of GOTO would be to GOTO END. For an example of this see [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] .
    ----------------------------------------------IF

    Used to check for a certain condition if the condition exists. If that condition exists it will perform that function. To see an example of this see [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] .

    ----------------------------------------------PAUSE


    Prompt the user to press any key to continue.

    ----------------------------------------------REM

    Allows you to place comments into the batch file without displaying or executing that line when the batch file is run.

    ----------------------------------------------SHIFT

    Changes the position of replaceable parameters in a batch program.
    ----------------------------------------------START

    Used for [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] , [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] , and [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] and above to start a windows application; such as START C:\WINDOW\CALC would run the Windows Calculator. Users running [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] need to utilize the WIN command. For example, WIN C:\Windows\CALC.EXE would run Windows and then Calculator after Windows has finished loading.

  3. #3
    حـــــرفـه ای piremard's Avatar
    تاريخ عضويت
    Aug 2006
    پست ها
    6,618

    پيش فرض

    کد:
    برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید

  4. #4
    حـــــرفـه ای mahdi7610's Avatar
    تاريخ عضويت
    Mar 2007
    محل سكونت
    قـــــــم
    پست ها
    6,150

    پيش فرض

    کد:
    برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید

    سلام دوست عزیز
    ممنون از این که جواب دادید

    لطف می کنید در باره نحوه اجرای این دستور توضیح بدید . چون من می خوام توی یه محیط داسی این همه جمله را ننویسم می خوام به فایلی درست کنم و اطلاعات را توی اون بریزم و فقط اون فایل را اجرا کنم .

  5. #5
    حـــــرفـه ای piremard's Avatar
    تاريخ عضويت
    Aug 2006
    پست ها
    6,618

    پيش فرض

    سلام دوست عزیز
    ممنون از این که جواب دادید

    لطف می کنید در باره نحوه اجرای این دستور توضیح بدید . چون من می خوام توی یه محیط داسی این همه جمله را ننویسم می خوام به فایلی درست کنم و اطلاعات را توی اون بریزم و فقط اون فایل را اجرا کنم .
    در کامنت اولم نوشتم باید محتویات رو داخل notepad ریختــ......

Thread Information

Users Browsing this Thread

هم اکنون 1 کاربر در حال مشاهده این تاپیک میباشد. (0 کاربر عضو شده و 1 مهمان)

User Tag List

قوانين ايجاد تاپيک در انجمن

  • شما نمی توانید تاپیک ایحاد کنید
  • شما نمی توانید پاسخی ارسال کنید
  • شما نمی توانید فایل پیوست کنید
  • شما نمی توانید پاسخ خود را ویرایش کنید
  •