zLast20_Builder

Discussion in 'LastOS-Based Mods Released By Other Members' started by 00Proteus00, Feb 25, 2020.

  1. 00Proteus00

    00Proteus00 Active Member

    [​IMG]

    GUI Install for Last20. Due to some complexities in the install process, I recommend
    you click the "Instructions" button and follow those til you get more familiar with the
    Last20 build process. This is my 1st ever Visual Basic program, so please be gentle
    and dont throw any sharp objects at me if you dont like it.

    NOTE: @Glenn did all the work with the original Installer Process as far as I know. I just
    took his work and made the GUI as a launcher for his scripts.

    1 - MUST be unzipped to "C:\zLast20_Builder"

    2 - It will NOT work when unzipped to ANY other drive or directory.
    As I get better with VB, I promise better, more polished apps.

    3 - Tested and debugged and NOW working correctly.

    4 - Feel free to do with as you see fit.

    Usage

    Unzip to above mentioned directory, and run "Last20 Installer.exe"

    Download link - 1.14gb
    https://drive.google.com/open?id=1tLqi1unfEMUuu1kHQ8-jl6pOEaJKSudm
     
    Last edited: Feb 25, 2020
    zorro48, Glenn, Sshadow and 2 others like this.
  2. Glenn

    Glenn Administrator Staff Member

    You forgot to share your source code and which version of Visual Basic you used, I can help you to find source code to do things you need, some things are meant to be figured out/discovered and others are made to be copied :D for example how to get the applications exe path to use so your builder can be extracted anywhere.
     
  3. 00Proteus00

    00Proteus00 Active Member

    Made with Visual Basic 10 Express

    I tried the newest 2019 version, but it doesnt show me the list to use (buttons etc...) and with just a plain coding window I was LOST!

    I have no clue where to even find that or what it is named (source code). I just made the buttons and labels, then double clicked the buttons and pasted this in. I found this on the net (how to run a program on your drive) and went with it, HENCE the reason why it HAS to be installed to the C:\zLast20_Builder directory ONLY.

    (screen cap of part of code, but its all the same for everything not seen)

    [​IMG]

    I tried doing it WITHOUT a directory and just calling the commands, but it fails miserable. was wondering if I should just edit the .cmd files and post that code in, but that failed too. This is the only way (with 1 day learning) that I could make it work and call the .cmd files.

    I sure theres a path variable to be set somewhere, or something, but I was so hell bent on doing this that I ran before walking.
     
    Last edited: Feb 26, 2020
  4. Glenn

    Glenn Administrator Staff Member

    I googled "get executable path visual basic" without quotes and got this code.

    '------------------
    Dim exePath As String = Application.ExecutablePath()
    System.Diagnostics.Process.Start(exePath+"\00.0_Rename_First_ISO_To_Windows_Original_ISO.cmd")
    '-----------------

    The exePath Variable we Dim (set) is then usable in place of setting your own path, you use quotes to contain data and the variables can be added outside the containers using +:

    '----------- Example of containing set text with a variable embedded (added) to it
    print "Hello the Executable path is: " + exePath + " - Best place for it IMO!" 'This is a comment you can use a single quote to write information after a line of code or above if it's a big section.
    '-----------

    This is the 2nd day of programming now, so variables will be essential to your progress in coding ;)

    -EDIT-

    To debug your code you can use
    '-------
    Print exePath
    '-------
    this will print the variable content to the immediate window at the bottom of the screen while you run it, you could also use: https://docs.microsoft.com/en-us/do...asic.interaction.msgbox?view=netframework-4.8
    --------
    msgbox ("This is EXE path: " + exePath)
    ---------

    The above one will open a message box on the screen showing the content of the variable.

    -EDIT-

    Part two of Day two programming is working with more than one form:



    You can use the name of the form to .Show or .Hide it. this will allow you to have a form called About, add your logo and version number, your name etc and add a button to the main form to open the 2nd form.


    Google and youtube will be your friends to a rapid learning to code and I'l be here "twice a day" for a bit to help if you still have questions.
     
    00Proteus00 likes this.
  5. Sshadow

    Sshadow New Member

    I have always been interested in VB. I will definitely be keeping an eye on the progress here.
     
  6. Glenn

    Glenn Administrator Staff Member

    To tell the truth, I've never used VB.NET of any description. I learned Visual Basic 6 (VB6), then I learned AutoIt and finally I learned Xojo 2014 (this was the latest version that included resources in the .exe and not external as well as a 20mb library file).

    VB.NET code is the same, but I always based my work of self contained .exe's to work during XP setup etc, so I needed it to work without needing the 300mb .NET library that is included in Windows 8, 8.1 and 10 (if you enabled it), that is my history of coding, learn one basic and you can program any given some time to learn the differences tho.
     
    00Proteus00 likes this.
  7. 00Proteus00

    00Proteus00 Active Member


    I tried that coding for 2 days straight. Kept erroring out on me. Google was my friend in this case, I found this code for VB10 and it works flawlessly.

    [​IMG]

    Here is my result, which can be put "anywhere" and run. This is my version of the Post Setup. DVD/Flashdrive must be inserted to work, since "ssWPI" and "Settings" are located there for my builds.

    [​IMG]

    Plus it autoruns one time on 1st boot. (thanks to regedit and RunOnce)
     
    Glenn and The Freezer like this.
  8. Glenn

    Glenn Administrator Staff Member

    You figured out the issues yourself, you'll make a fine programmer if you enjoy it :)

    one other tip I can spot, please rename your buttons from Button1, Button2 to Settings and Installer, just to keep yourself sane :D when you go back to code 8 months later you forget and don't want to spend time looking for identifiers again.
     
    00Proteus00 likes this.
  9. Ghost

    Ghost Forum Crapolator

    WoW , I learned how to do .cmd stuff around LastXp 20, then seen the source for Settings using VB 6 and was intrigued to figure it all out, never did, end of story.

    Glad to see someone picked it up and ran with it.
     
    00Proteus00 likes this.

Share This Page