On First Start--Batch

August 27, 2011 at 05:44:53
Specs: Windows 7
I'm fairly new to batch scripting, but i'm wondering if there's a way to make something show up only the first time you start the program.

Any replies are appreciated!


See More: On First Start--Batch

Report •

#1
August 27, 2011 at 07:16:26
It would be kind of complex, but try something like this:

@ECHO OFF
SET CONFIG=
SET /P CONFIG=<CONFIG.TXT
REM Any other startup commands here:

IF '%CONFIG%'=='0' GOTO FIRST
IF '%CONFIG%'=='1' GOTO SECOND
:FIRST
GOTO SETFIRST
:RESUME
REM Your code here:

:SECOND
REM Your code here:

:SETFIRST
SET CONFIG=1
ECHO %CONFIG% >CONFIG.TXT
GOTO RESUME

You will have to merge your code into this program. Just look at the REM lines to find out where. Hope this helps,
RMT2

Mouse could not be found. Click OK to continue.
What to do now?


Report •
Related Solutions


Ask Question