Save batch file path to local harddisk
- by Brian
Hi,
I have a batch file that is Run when a selfextraction file is executed.
The self extracted files must be copied to to specefic place on the harddisc. In the batch file the user is asked where the path is (if it's not located the default place)
Part of the batch file:
@ECHO OFF
IF EXIST "C:\Program Files\program\program.exe". (
set PROGRAMPATH=C:\Program Files\
) ELSE (
echo Program folder was not found. Please enter the path for Program
set /p PROGRAMPATH=Path:
)
echo Copying data to "%PROGRAMPATH%"...
copy /Y "*.txt" "%PROGRAMPATH%"
Now for my question.
If a user then enters a new path, is it possible to save that path. So when he executes the self extraction packagde again, it could remember that new path?