Я пытаюсь создать пакетный файл, который создает пакетный файл, но, как мне кажется, я не могу получить первый пакетный файл, который также отправляет значения в процентах (например, %example%
).Как сделать первый пакетный файл, который создает второй пакетный файл?Но сгенерированный файл должен содержать %
?Также, если вы обнаружите какие-либо другие ошибки в моем скрипте, пожалуйста, исправьте это:)
Кроме того, пока я здесь, как вы можете видеть, я поставил "example, please help!"
под ":prep"
, я не могу показатьсявыяснить "> нуль" вещь.Неважно, сколько я поставлю «^», оно не сохранится до последнего сектора (это «gnome.bat»).Однако он будет сохранен в «setup.bat», но не дальше.Пожалуйста, помогите мне с этим!
Ошибка находится в разделе ": Prep"
вот мой полный сценарий: (даже близко к тому, чтобы быть завершенным со сценарием ...)
@echo off
title Annoying Menu
mode 150
color a
:begin
cls
echo Welcome to "Annoying Menu"
echo This menu is made to prank your friends
echo All pranks that you make on your friends are completely your own responsibility
echo Please be aware that this menu contains what could be consideret "Virus"
echo No harm will however be done to either your, or your freinds pc
echo Please read through all the instructions before use, of the menu...
echo ---------------------------------------------------------------------------------------
echo 1. Please select a password to cancel the prank, by pressing "3" (only numbers)
echo 2. Please make sure that the setup files are ready to be transferred, by pressing "1"
echo 3. Now you are ready to send off the setup file to one of your freinds
echo ---------------------------------------------------------------------------------------
echo type "1" to create setup file
echo type "2" to prepare setup files for use
echo type "3" to download it on your own pc
echo type "4" to select password to cancel the prank (please only use numbers)
echo type "5" to test password
echo type "exit" to close the menu
echo ---------------------------------------------------------------------------------------
echo.
set /p opt= Option:
if %opt%==1 goto create
if %opt%==2 goto prep
if %opt%==3 goto UD
if %opt%==4 goto pass_select
if %opt%==5 goto testpass
if %opt%==exit goto end
cls
echo please enter a valid number to continue...
echo.
pause
goto begin
:create
break>"C:\Users\%Username%\Desktop\setup.bat"
echo.
echo setup file created, please prepare the setup file before use, by pressing "2" in the main menu
echo.
pause
goto begin
:prep
@echo @echo off> setup.bat
@echo title quick_setup>> setup.bat
@echo color a>> setup.bat
@echo mode 150>> setup.bat
@echo :begin>> setup.bat
@echo break^>"C:\Users\%Username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\gnome.bat">> setup.bat
@echo cd C:\Users\%Username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup>> setup.bat
(Example, please help!)
@echo @echo ping localhost -n 2 ^>nul^>^> gnome.bat>> setup.bat)
@echo @echo set /a time=%clock%-1^>^> gnome.bat>> setup.bat
@echo @echo if %clock% EQU 0 goto Timesup^>^> gnome.bat>> setup.bat
@echo @echo :Timesup^>^> gnome.bat>> setup.bat)
goto begin
(Not Done!)
:UD
(Not Done!)
:pass_select
cls
echo Please enter a password that will be used to cancel the prank (please only use numbers)
echo.
set /p pas= Set Password:
set /a pss=%pas%
cls
echo the password has now been set to %pss%
echo to enter a new password simply select "3" again and choose a new password
echo.
pause
goto begin
:testpass
cls
echo we are now ready to test your newly set password (if not you've set a password, please do so first)
echo.
echo type "1" to start the test
echo type "2" to set a password/new password
echo type "exit" to go back to the main menu
echo.
set /p lll= Option:
if %lll%==1 goto test
if %lll%==2 goto pass_select
if %lll%==exit goto begin
cls
echo please enter a valid number to continue...
echo.
pause
goto testpass
:test
cls
echo please enter password to continue...
echo type "exit" to go back to main menu
echo.
set /p tes= Password:
if %tes%==%pss% goto completetest
if %tes%==exit goto begin
cls
echo either you typed the wrong password or it didn't work, please try to set a new password if the same thing happens twice...
echo.
pause
goto test
:completetest
cls
echo The test was successful!
echo you're password works as intended
echo.
pause
goto begin
:end