# Help with username in batch



## SuddenG (May 6, 2009)

Hi there guys,

I'm currently trying you use this line of code which works fine:
"%SystemRoot%\explorer.exe "C:\Program Files\Steam\Steamapps"

But after \steamapps there is a username which differs from computer to computer. I need to get past that in-order to open up another file. 

Could you tell me how to make it open all usernames or %Username% or something.

Thanks.


```
@echo off
title C:SS help program.
:menu
color e
echo   **************************************************************
echo   C:SS Help Program - Built by SuddenGunfire
echo   **************************************************************
echo.
echo Please choose an option below to start!
echo.
echo ********************************************************
echo C = Find your Counter-Strike:Source Folder.
echo M = Install C:SS maps.
echo F = Open counterstrikesource.com C:SS help section.
echo P = Find your system Specs.
echo G = Install Skins.
echo O = Copyright information.
echo E = Exit the program.
echo *******************************************************
echo.
set /p opt=Option:
if %opt%==c goto folder
if %opt%==C goto folder
if %opt%==m goto maps
if %opt%==M goto maps
if %opt%==f goto help
if %opt%==F goto help
if %opt%==p goto p
if %opt%==P goto p
if %opt%==g goto g
if %opt%==G goto g
if %opt%==o goto o
if %opt%==O goto o
if %opt%==e goto e
if %opt%==E goto e

:folder
cls
echo.
echo ----------------------------------------------------------------------------------------------------------
echo This will open the SteamApps folder.
echo Once there you need to click on the folder with your Steam account name on.
echo.
echo Press any key to open your C:SS folder.
echo ----------------------------------------------------------------------------------------------------------
pause>nul
%SystemRoot%\explorer.exe "C:\Program Files\Steam\Steamapps"
pause>nul
cls
goto :menu

:maps
cls
echo.
echo -----------------------------------------------------------------------------------------------------------------------------------------------
echo This section will take you to a popular skin website and will also open your materials and models folder.
echo -----------------------------------------------------------------------------------------------------------------------------------------------
echo.
echo Please press any key to start installing maps...
pause>nul
start explorer http://www.fpsbanana.com/skins/games/2
%SystemRoot%\explorer.exe "C:\Program Files\Steam\Steamapps\"
cls
echo When steamapps is loaded up navigate to:
echo yourname-cstrike-
echo Then drag and drop your skin files into there.
echo.
echo If prompted to overwrite files, click "Yes To All" 
pause>nul
cls
goto :menu

:help
cls
echo.
echo -----------------------------------------------------------------------------------------------------------------------------
echo This section will take you to the counterstrikesource.com C:SS support section.
echo -----------------------------------------------------------------------------------------------------------------------------
start explorer "http://www.counterstrikesource.com/forums/viewforum.php?f=38"
cls
echo Thank you for visiting, you should register it's great.
echo.
echo I'm a member there, look up "SuddenGunfire"
pause>nul
cls
goto :menu

:p
cls
echo ----------------------------------------------------------------------------------------- 
echo This section will run a systen "dxdiag" 
echo This will display the information needed about your pc
echo that will help us find your problem.
echo -----------------------------------------------------------------------------------------
echo.
echo Press any key to run a dxdiag. 
echo (This may take a few minutes)
pause>nul
cd c:\windows\system32\
start dxdiag
cls
echo dxdiag is now running...
pause>nul
cls
goto :menu

:g
cls
echo
echo This section will take you to a skin website and load up your skin installation folders.
```


----------



## W1zzard (May 6, 2009)

on a command prompt type "set" to see all the defined environment variables


----------



## Deleted member 3 (May 6, 2009)

Instead of making overly complicated batch files you could just download visual studio express. You can learn a lot from there on as well.


----------



## SuddenG (May 6, 2009)

I have visual studio, autoit, the Vb and C++ stuff.

Can  you help me?


----------



## Deleted member 3 (May 6, 2009)

draw some buttons, doubleclick them and by default you can enter the code that's executed when clicking. That's 10 seconds of work to replace the whol if/then selection stuff. Since you're executing single lines of codes, put single shell commands behind those buttons, done. Look into it.


----------



## SuddenG (May 6, 2009)

is this VB or C++?


----------



## FordGT90Concept (May 7, 2009)

Use VB.NET.


----------

