×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Using environmental variables in Windows.

    Start->Run->cmd.exe

    echo "hello %username% at %computername% this is your %processor_identifier% speaking. I detected some pr0n in %userprofile%. Please remove it."

    "hello fnord at THETA this is your x86 Family 6 Model 8 Stepping 1, AuthenticAMD speaking. I detected some pr0n in C:\Dokumente und Einstellungen\fnord. Please remove it."

    --

    C:\>E:

    E:\>%homedrive%

    C:\>

    --

    C:\>cd %userprofile%

    C:\Dokumente und Einstellungen\fnord>

    --

    C:\cd %tmp%

    C:\DOKUME~1\fnord\LOKALE~1\Temp>

    --

    E:\>%systemdrive% cd %systemroot%

    C:\WINDOWS>

    --

    Use these when scripting and also when telling people on IRC where to go in Windows. Avoids all the trouble with different partition names and localization.

    To get a list of all environmental variables type "set" in cmd.exe (just like in Linux).

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.