DOS Unleashed - DOS for the 3l33t
Results 1 to 9 of 9

Thread: DOS Unleashed - DOS for the 3l33t

  1. #1
    Banned
    Join Date
    Aug 2001
    Location
    Yes
    Posts
    4,429

    Post DOS Unleashed - DOS for the 3l33t

    I've read a lot of 'newbies DOS-guides' lately. I guess some of you should be ready for the 3l33t stuff by now... So, here's 'Dos Unleashed' for all of you Windows-bashers
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Posts
    196

    Talking

    Now you see how we use to make installation batch files Who needs a setup program when you can batch the entire thing. I'll look for the utility, it's in my archive of floppies somewhere. You can take batch files and convert them to *.com files which is like "compiling" it so to speak but not exact. This will provide the same functions, but in binary form so people can't just edit the file and steal your code, err batch of commands

  3. #3
    Senior Member
    Join Date
    Sep 2001
    Posts
    412
    Good post Negative :-)
    Maybe you answer a question thats been bothering me for a while...
    When using command lines for scripting, you sometimes need to set a variable %Rootdrive% to be a users home directory, but, knowing that batch files are not able to use 2 variables as a piece of data - and the home directory is a combination of server name and home directory name, its necessary to use Subst command to consolidate the two variables (Subst %RootDrive% %HomeDrive% %HomePath%) - Now, maybe i'm being stupid but do we not use 2 variables to create the consolidated value - because we can't use 2 variables!!!
    Hope you can shed some light on this for me, i can't seem to get my head round it!

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Posts
    196

    Batch to Exec

    Ok, here is the program. It was a freeware thing released 11 years ago, ok don't laugh at me, I'm not that old, anyway it was cool then and it's cool now

    Here is how it works (sorry lost the documentation long ago)

    Take your batch file, we will call this example foo.bat

    It does something useful, cool, maybe looks like a password login or something. You want to make it an exec file so people can just open up notepad and steal your hard work, heh.

    Put the bat2exec.com on your hard drive somewhere, doesn't matter where (temp directory would be a good idea). Copy the batch file into the same directory. Simply type the program name, a space, and the batch file name and it will make one with the *.com extention.

    bat2exec foo.bat

    ==> becomes foo.com

    Foo.bat and Foo.com do the exact same thing except now it's an exec file. This was useful for making password prompts out of batch files, but you didn't want someone to just edit the file and see what the password was. This was useful decades ago
    Attached Files Attached Files

  5. #5
    Banned
    Join Date
    Aug 2001
    Location
    Yes
    Posts
    4,429
    Thx for the reply I got

    Petemcevoy,

    Im' not sure what you mean with your question, but about the batch-file variables: you actually can use up to 9 variables when it comes to batch-filing (%1 to %9). %0 has a special meaning: it's the batch file's name.

    This is what I think you mean: you need to set the environment variable Rootdrive (%rootdrive%), and that variable consists of (the variables) %Homedrive% and %Homepath%. You indeed can't (as far as I know) consolidate those two variables using a batch-file.

    But u can use the parameters of a batchfile.
    Let's say you want the environment variable to be the consolidation of the first parameter + the second parameter of your batchfile (test.bat):

    @echo off
    cls
    set rootdrive=%1%2

    For example, if your input is test c:\ user (with a space between c:\ and user), this batchfile will set rootdrive to "c:\user" (one string, no space between c:\ and user).

    Now, let's say you have %homedrive%, and %homepath% (two environment variables), and you want to 'consolidate' them into one environment variable (%rootdrive%). This is like the opposite of the former example...
    So, typing set at the prompt would give you something like homedrive=c:\
    homepath=user

    --- Test.bat --

    @echo off
    cls
    rem Write the output of set to check.bat
    set >check.bat
    rem Retrieve the homedrive setting (/i for no distinction between rem caps and lower-cases) in check.bat and write them to
    rem home.bat. < is used to avoid the -------check.bat the FIND
    rem command generates.
    find /i "homedrive" <check.bat>home.bat
    rem Do the same for homepath, add it to home.bat
    find /i "homepath" <check.bat>>home.bat

    Now we have a home.bat-file containing the following:
    homedrive=c:\
    homepath=user

    Now, we need those two values combined in one string "c:\user" and we need it to be set as the %rootdrive% variable.

    And that is where I'm stuck . If you just can tell me whether I'm going in the right direction or not...
    If yes, I'll try to work it out later...
    If not, well... too bad

  6. #6
    AO BOFH: Luser Abuser BModeratorFH gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177
    Is it just me or does this still say the overall rating of this post is currently : even? anyway, awesome post on our old friend of computing, DOS, (but still Kickin ass!!)
    Kill the lights, let the candles burn behind the pumpkins’ mischievous grins, and let the skeletons dance. For one thing is certain, The Misfits have returned and once again everyday is Halloween.The Misfits FreeBSD
    Cannibal Holocaust
    SuSE Linux
    Slackware Linux

  7. #7
    Now, RFC Compliant! Noia's Avatar
    Join Date
    Jan 2002
    Posts
    1,210
    lol, Not any more....though I think Negative needs to make a DOS&CMD Unleashed- Revisited redo it since some things have changed since 2k and XP came to the scene...

    - Noia
    With all the subtlety of an artillery barrage / Follow blindly, for the true path is sketchy at best. .:Bring OS X to x86!:.
    Og ingen kan minnast dei linne drag i dronningas andlet den fagre dag Då landet her kvilte i heilag fred og alle hadde kjærleik å elske med.

  8. #8
    Banned
    Join Date
    Jan 2003
    Posts
    95
    Good post negative

  9. #9
    Junior Member
    Join Date
    Feb 2003
    Posts
    1
    i downloaded dosunleashed.txt and bat2exec.zip into mydocuments folder. each time that i try to open them they flash for about 1 second and then disappear. how can i keep these files open?
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •