I was wondering if there was a way where I could set a variable as a path name. So when you first boot up the program, it asks you to set a source. And you create a new profile, so that you can easily preset the path. When you want to create a new user you use the --Profile -n -p
command, and it takes you to the setup page. You select a profile number, and then it will ask you for the program path. The idea is that this program will be portable, so when you move it, it will have different src paths. Therefore the idea to make the src path changeable. Is there a way I can set this input answer for the path as a variable, so that every time this program needs to launch a file or app, it can direct itself to the src path? I know this sound very confusing as I type this, but any and all help is appreciated.
Here is the code:
@echo off
set /p source="Set Source:"
if "%source%"=="--Profile -n -p" (
goto ProfileC )
:ProfileC
cls
echo When your user is created it will be in a format of --Profile -(PROFILE NUMBER)
echo And the number will be replaced with whatever your number is without the brackets
echo Currently Available Numbers:
echo Profile2
echo Profile3
echo Profile4
echo Profile5
set /p pnumber="Set Profile Number:"
if "%pnumber%"=="Profile2" (
goto Profile2" )
if "%pnumber%"=="Profile3" (
goto Profile3" )
if "%pnumber%"=="Profile4" (
goto Profile4" )
if "%pnumber%"=="Profile5" (
goto Profile5" )
:Profile2
set /p path2="Set program path:"
Thanks
Bailey Caithness is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1