Forum    News    Downloads    Saved Games


CMD Vista

<<

.Yunoko

User avatar

Brew Guru
Brew Guru

Posts: 3142

Joined: March 05 2006

Location: Toronto, Ontario

Thanks given: 13 times

Thanks received: 3 times

Post Wed Jul 08, 2009 2:08 pm

CMD Vista

Hi I was just wondering, is it possible to make a .bat file where after say 15 seconds of it being open, it exits (closes)? Thanks.
<<

AdventWolf

User avatar

Brew Guru
Brew Guru

Posts: 5958

Joined: September 19 2007

Location: Pandora

Thanks given: 5 times

Thanks received: 10 times

Post Wed Jul 08, 2009 4:52 pm

There is some info here http://www.computerhope.com/batch.htm#4

website wrote:Creating a batch file delay

Below is an example of how to delay a batch file any where from 5 to 99 seconds. In the below example we illustrate a 5 second delay.

TYPE NUL | CHOICE.COM /N /CY /TY,5 >NUL


Is that it?
Image
Image
<<

.Yunoko

User avatar

Brew Guru
Brew Guru

Posts: 3142

Joined: March 05 2006

Location: Toronto, Ontario

Thanks given: 13 times

Thanks received: 3 times

Post Wed Jul 08, 2009 5:02 pm

Urm. I don't think so, I tried it but nothing happened. What I am looking for is, after say I open my .bat file and after 15 seconds or w.e of it being open and nothing happens to it, it closes. That I believe logs off your computer or puts it to sleep.
<<

AdventWolf

User avatar

Brew Guru
Brew Guru

Posts: 5958

Joined: September 19 2007

Location: Pandora

Thanks given: 5 times

Thanks received: 10 times

Post Wed Jul 08, 2009 5:08 pm

Oh, I'm not sure. You'll probably need to look into a lot of .Bat functions to find and put together what you want.
Image
Image
<<

.Yunoko

User avatar

Brew Guru
Brew Guru

Posts: 3142

Joined: March 05 2006

Location: Toronto, Ontario

Thanks given: 13 times

Thanks received: 3 times

Post Wed Jul 08, 2009 5:20 pm

Okay so this is what I have so far. I have a .bat file. With this.

cls
@ECHO OFF
title SYSTEMRECOVERY.DPX
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Start System Recovery (Yes/No)
set/p "cho=>"
if %cho%==Yes goto LOCK
if %cho%==Yes goto LOCK
if %cho%==No goto END
if %cho%==No goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo A problem has been detected starting System Recovery.
echo Windows has shut down the operation to prevent damage to your computer.
echo The problem seems to be caused by the following file: SYSTEMRECOVERY.DPX
echo PAGE_FAULT_IN_NONPAGED_AREA
echo If this is your first time youve seen this stop error screen,
echo Restart your computer. If this screen appears again, follow
echo These steps:
echo Check to make sure any new hardware or software is properly installed
echo If this is a new installation, ask your hardware or software manufacturer
echo For any Windows updates you might need.
echo If problems continue, disable or remove any newly installed hardware or
echo Software, disable BIOS memory options such as caching or shadowing.
echo If you need to use Safe Mode to remove or disable components, restart
echo Your computer, press F12 to select Advanced Start up Options, and then
echo Select Safe Mode.
echo Technical Information
echo *** STOP: 0x00000050 (0xfd3094c2, 0x0000001, 0x000000)
echo *** SYSTEMRECOVERY.DPX – Address FBFE7617 base at FBFE5000, DataStamp 3d6dd67c
set/p "pass=>"
if NOT %pass%== MYPASSWORD goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End


(Its a Fake out hidden folder to store my crap aha)
What that does is it creates a hidden folder. So I click on the .bat file it opens up the CMD and I type in my password to access my hidden folder. Once I am done I click on it again, and I type Yes and it closes. But what I want is if I don't, or if somebody else. Doesn't type in the password within 5 seconds it closes. So I found out the CMD to do that. its.....

TIMEOUT 5
EXIT


I tried that out in.....



IPCONFIG
TIMEOUT 5
EXIT


and it worked. But I am trying to install that text somewhere in my hidden folder script, but its not working. I had it here....

echo *** SYSTEMRECOVERY.DPX – Address FBFE7617 base at FBFE5000, DataStamp 3d6dd67c
TIMEOUT 5
EXIT
set/p "pass=>"
if NOT %pass%== MYPASSWORD goto FAIL


and it works but and all....

Image

but as you can see, after it says waiting for 2 seconds. It says "press any key to continue" well its kind of hard to type in my password when that shows up and I click anything and it closes. So now I need to get rid of the "press any key" but keep the rest. Lol. Thanks![/list]
<<

ace

User avatar

Brewology Administrator
Brewology Administrator

Posts: 5007

Joined: May 12 2007

Location: bat cave Firmware: iXtreme 1.7

Thanks given: 10 times

Thanks received: 29 times

Post Wed Jul 08, 2009 8:24 pm

Bah I'm running w7rc and I copied the same batch file and whenever I run it all it does is make a "Private" folder on my desktop. But my guess would be to add TIMEOUT 5 EXIT either directly after the if NOT %pass%== MYPASSWORD goto FAIL line or one line before :End.
Image
It's not the religion that causes wars, it's the men who use religion as a means to control people that do.
They call me tater salad.
<<

.Yunoko

User avatar

Brew Guru
Brew Guru

Posts: 3142

Joined: March 05 2006

Location: Toronto, Ontario

Thanks given: 13 times

Thanks received: 3 times

Post Wed Jul 08, 2009 8:35 pm

Nope not working. I did try putting it just before my first ECHO under :UNLOCK but I am still having the problem after the timer stops or even during it. If I click anything it just exits.
<<

Kanadier

User avatar

Brewology Moderator
Brewology Moderator

Posts: 2190

Joined: July 20 2007

Location: British Columbia, Canada!

Thanks given: 2 times

Thanks received: 60 times

Post Sat Jul 11, 2009 9:00 pm

If you wanna secure your porn, there's more practical ways Yunoko... lol
Image
<<

Alex Finlay

User avatar

Brewery Master
Brewery Master

Posts: 1063

Joined: January 31 2009

Location: My Hardrive sorting out Files.

Thanks given: 1

Thanks received: 2 times

Post Sun Jul 12, 2009 2:02 am

Diehard335 wrote:If you wanna secure your porn, there's more practical ways Yunoko... lol


Rofl :-) mines secure lol. *portable hardrive baby*
Being redone
<<

.Yunoko

User avatar

Brew Guru
Brew Guru

Posts: 3142

Joined: March 05 2006

Location: Toronto, Ontario

Thanks given: 13 times

Thanks received: 3 times

Post Sun Jul 12, 2009 12:39 pm

Thanks. Lol never said it was porn though xD it might just be other types of files I need secure ;) Plus I have an external hard drive but still somebody grabs that they can still get to that! Doesn't matter though, I will just keep the .bat command the way it is. It works good :)

Return to General Chat

Who is online

Users browsing this forum: No registered users and 298 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for blacklist.org.