How to Make a Username Finding Batch File

This instructable shows you how to create a batch file that shows your username on the screen.There is no real use for this but it is fun anyway

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Code

Now Copy and paste this code into note pad
@echo off
title Jake Hallidays Username Finder
echo %username%
pause

Step 2: Saving the File

Now save the file as JakeHalliday'sUsernameFinder.bat

Step 3:

a file should be created that looks like this
open it and your user name should appear like this

Step 4: Thank You

thank you for using the software and learning about batch files

Share

    Recommendations

    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    4 Discussions

    0
    None
    Prof. Pickle

    6 years ago on Introduction

    Perhaps if you turn this into a working command and it could list all the usernames on the computer it could have a use.

    0
    None
    batchfile4718

    6 years ago

    i said it had no real use in the intro!

    0
    None
    THAWKK

    6 years ago

    One question not to sound negative, but wouldn't they already know their username :-)

    0
    None
    theformatter

    6 years ago on Introduction

    Print the username vertically (one character per line):


    rem ------------------------------
    @ECHO OFF
    setlocal ENABLEDELAYEDEXPANSION
    SET Iam=%username%
    for /l %%i in (0, 1, 32) do @ (
    SET TheChar=!Iam:~%%i,1!
    IF [!TheChar!] NEQ [] ECHO !TheChar!
    )
    rem ------------------------------


    I'm a professional, please don't try this at home! :)

    I tested this on Windows 8, but it should work on previous versions.