I am somewhat new to both vbs and batch programming but i am trying to write a program that will launch a vbs message box and depending on what answer is chosen in the message box it would launch a program or do nothing. The problem is i cannot seem to find a way to write the program without having the vbs file ask you if you want command prompt to run the file after ive chosen yes. would there be some sort of way to ping variables from the vbs to the batch file?
THANKS A BUNCH
yeah this is an example of a batch file I use to load up my steam, basically it find the steam location from the registry (if it can find it), asks which username I want to load up with and then loads steam with that username. Much like yourself, I got help in creating the barebones of it but refined it through experience as well as trial and error.
@for /f "tokens=2*" %%a in ('reg query "HKCU\software\valve\steam" /v "steamexe"') do set "steamdir=%%b"
@rem echo %steamdir%
@if not defined steamdir (
@echo steam cannot be found, this batch file will now exit
@echo 1. username1
@echo 2. username2
@echo 3. Exit
@rem set /P uname=Select which username you would like to login with
@choice /c 123 /n /m "Select User to use"
@if errorlevel 1 set user=username1
@if errorlevel 2 set user=username2
@if errorlevel 3 exit
@start "Steam" "%steamdir%" -login %user% <password>
you can also use "goto" statemants combined with line markers