Results 1 to 2 of 2

Thread: DOS Question

  1. #1
    Join Date
    May 2002

    DOS Question

    I have a file called file.bat on my computer. When the user clicks on it, i want it to capture the user's login name (NT) and store in a variable (i.e., $username would replace with the real username of that user). What variable/code do i put into the this bat file? Someone told me this can be done. I'm clueless about DOS, so please help me out.

  2. #2
    Join Date
    Nov 2001
    Ann Arbor, MI
    When I type "set" in my "Command Prompt", it shows:


    That's probably the environment variable you're looking for. To use it in a BAT file, just put percent signs around it:


    To set a variable use:

    -Mark Adams - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

Posting Permissions

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