pditty8811 wrote:Hi Aacini,
I don't think your solution works for my agenda.
I have 3 batch files and they have filepaths in them of 3 different types. That's 3 batch files, and they all use 3 different variables that I'd like to change. I need these 3 batch files to be permanently edited because they will be ran continously over and over again after the three variables have been changed. So a permanent edit to the files is necessary.
My program was designed to encode and install ONE Batch file. If you have 3 Batch files, I think you could encode each one in individual form and give the user 3 installer files. However, if you prefer that my program encode and install the 3 Batch files, I need to modify it. I have no problem with that, but it will take some time (please read the last phrase of this reply).
pditty8811 wrote:I don't need user input every time these batch files are ran, just the first time in order to permanently edit the 3 variables.
This is precisely the way it works. The user run the installer just one time and this operation permanently edit the 3 variables IN THE INSTALLED PROGRAM. Perhaps you may understand the process in a clearer way with this scheme: In your computer you have PROGRAM.BAT file you want to encode and give to the users, so:
Code: Select all
PROGRAM.BAT -> BatchEncoder.bat -> INSTALLPROGRAM.BAT
Code: Select all
INSTALLPROGRAM.BAT -> PROGRAM.BAT
Of course! This is an EXAMPLE on how to use the installation variables! I included some other examples below.pditty8811 wrote:You've only listed 2 variables, source and directory.
Example of a program that does NOT use installation variables, just the encoding feature:
Code: Select all
@echo off
setlocal
rem In this line should be the SET /P command intended for installation variables
echo Hello World!
Code: Select all
@echo off
setlocal EnableDelayedExpansion
set /P "color=What is the color you prefer? "
cls
echo This program have one installation variable: a color
echo The value permanently edited for the color variable in this file is: %color%
Code: Select all
@echo off
setlocal EnableDelayedExpansion
set /P "name=Your name, please: "
set /P "min=Minimum value: "
set /P "max=Maximum value: "
echo These are the values permanently edited in this file:
echo Name: "%name%", Minimum: %min%, Maximum: %max%
pditty8811 wrote:Perhaps I don't understand what your code does, but it doesn't seem like it will work for my needs.
Well, the basic tool to check any application capabilities is TO TEST IT! All your questions about my program could be easily answered by yourself with a simple test. It is really funny to try to explain you how something should work if you have not even tried to run it. In my previous posts I included several very simple examples on how to use my solution, and I explained the same things several times in different ways, but I could explain the same things more times and you still don't understand what I am talking about if you don't see it with your own eyes. For example:
pditty8811 wrote:I know how I could do this.
I could encrypt all my batch files, the 3 plus the installer, with your program of encryption.
Then I could echo the 3 user input variables to 3 different text files, then have the other 3 batch files read from the text files to get the variables. Everything would be encrypted too.
Wont this work?
I don't know. You could send me your 3 Batch files plus the installer, so I could do a test. Or you could give the 3 Batch files plus the installer plus my BatchEncoder.bat program to a friend and ask him if it worked after he did the test. Or you could do the test by yourself.
I am sorry, but I will not answer any further question on this thread based on speculations or rhetorical questions about how my program supposedly works. I will gladly answer any question based on results you obtain after you used my program, including any modification to it (like the possibility to encode and install more than one Batch file at the same time).
Antonio