I am creating a simple Setup and just added Security Dialog Box with 100 predefined Keys with Built-In, so that in order to install setup correct serial code will be required. Now what I want is, when a user enter correct serial key and press next button then, the same input key should be stored in a Text file in AppFolder.
Announcement
Collapse
No announcement yet.
Writing Input Serial Number to a File in AppFolder
Collapse
X
-
Originally posted by Ulrich View PostCool. What is your question?
Ulrich
How can I make my setup to write input serial key to a text file in target (installation directory) i.e %AppFolder%
Comment
-
The serial number is stored in a session variable, and the name is given in the screen, which is %SerialNumber% by default but of course you can edit as desired. The screen has a Help button which links to two examples for working with information typed into an Edit field, check them out.
For writing text files, use TextFile.WriteFromString() or TextFile.WriteFromTable() …
Ulrich
Comment
-
Originally posted by Ulrich View PostThe serial number is stored in a session variable, and the name is given in the screen, which is %SerialNumber% by default but of course you can edit as desired. The screen has a Help button which links to two examples for working with information typed into an Edit field, check them out.
For writing text files, use TextFile.WriteFromString() or TextFile.WriteFromTable() …
Ulrich
I'm unable to store user defined serial key to an external file.
Comment
-
This is the method which you suggested, I have been working on it for a long to get Input Serial Number instead of Hello World Text.
Code:TextFile.WriteFromString(SessionVar.Expand("%AppFolder%\\yourserialkey.txt"), "Hello World", false);
Comment
-
In your On Post Install event script, you placed this:
Code:TextFile.WriteFromString("%AppFolder%\\yourserialkey.txt", "Hello, world.", false);
Something like this would work properly, assuming that you want only the original key stored in the text file, and nothing more:
Code:TextFile.WriteFromString(SessionVar.Expand("%AppFolder%\\yourserialkey.txt"), SessionVar.Expand("%SerialNumber%"), false);
Comment
-
Originally posted by Ulrich View PostIn your On Post Install event script, you placed this:
Code:TextFile.WriteFromString("%AppFolder%\\yourserialkey.txt", "Hello, world.", false);
Something like this would work properly, assuming that you want only the original key stored in the text file, and nothing more:
Code:TextFile.WriteFromString(SessionVar.Expand("%AppFolder%\\yourserialkey.txt"), SessionVar.Expand("%SerialNumber%"), false);
At some point I reach to this below code: But guess what, I didn't add SessionVar.Expand with target file.
Code:TextFile.WriteFromString("%AppFolder%\\yourserialkey.txt"), SessionVar.Expand("%SerialNumber%"), false);
Comment
Comment