Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Help making startup batch file  (Read 3387 times)

0 Members and 1 Guest are viewing this topic.

kizza1645

  • Guest
Help making startup batch file
« on: May 01, 2009, 03:47:28 AM »
Hey guys, I need a little help writing a startup batch file to prevent un-authorized userrs on a pc.
Basically what i want to do, is insert a batch file in the startup dirrectory so on startup,
this batch runs, and ask for a y/n input,
where y/n = a determinded ocurance but requires a password for each (input)
Depending on which input the batch either closes or runs a del code,
which deletes numerous folders including that of the windows dirrectory.

No this is not a virus or malicous piece of code.
Could someone please help me get started please.
I only know basic batch file code.

kizza1645

  • Guest
Re: Help making startup batch file
« Reply #1 on: May 01, 2009, 03:52:33 AM »
To put it kinda simply, this is wat i want to happen
(i dont know the codes so ill make them up)
@echo off
Input Y/N                         << Though here i want a time limit where if no input has been made (within say 10sex) the batch file continues with 'Y'
echo y= pass: 1645
echo n=pass: 1645
If Y goto EXIT
If N goto DEL Codes
*Delete codes go here
exit

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Help making startup batch file
« Reply #2 on: May 01, 2009, 03:59:29 AM »
Quote
No this is not a virus or malicous piece of code.
But is sounds like it is!
If you are the administrator, u you do not need to use a batch file to restrict users. The administrator can restrict, files, directories, services, applications and network use by system policy and group membership.
All authorized users should have each their own account. And they should have membership in one or more groups.
You do not want to do this in a Batch file, because batch files are hard to protect. And the batch files become awkward and hard to maintain.

But here are many people here that will love to help you with the most counterrevolutionary batch file just because somebody said it is hard to do!


kizza1645

  • Guest
Re: Help making startup batch file
« Reply #3 on: May 01, 2009, 04:04:13 AM »
Lol hold on one minute here, Not only is this going to be converted to an .exe anyway...
But this is to prevent my private information to get in the hands of someone who has stolen my computer?
What i want is to have the computer boot, and then only i will knoe the password to prevent the deletion,
and the intruder will obviously fail and the data will be gone? smart idea actually.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Help making startup batch file
« Reply #4 on: May 01, 2009, 04:25:39 AM »
Well, that sounds good.  :)

One this forum there are articles about how to do a password in a batch.
Look here:
http://www.computerhope.com/forum/index.php/topic,69496.0.html

And you need to prevent the user from terminating the batch
But I can not find that one. Maybe somebody else knows..

mroilfield



    Mentor
  • Thanked: 42
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 11
Re: Help making startup batch file
« Reply #5 on: May 01, 2009, 04:49:48 AM »
Lol hold on one minute here, Not only is this going to be converted to an .exe anyway...
But this is to prevent my private information to get in the hands of someone who has stolen my computer?
What i want is to have the computer boot, and then only i will knoe the password to prevent the deletion,
and the intruder will obviously fail and the data will be gone? smart idea actually.

What would happen if say a family member or friend tries to use your comp and thinks they can figure out your password or since you will obviously want the password displayed as "****" as you type it you accidentally hit a wrong key and all your stuff goes up in smoke? I think I would find a better way of protecting my data.

If you still insist on using your batch file maybe you need to give the user a few tries and with each failure a message pops up saying that all data will be erased with so many more wrong entries.
You can't fix Stupid!!!

kizza1645

  • Guest
Re: Help making startup batch file
« Reply #6 on: May 01, 2009, 05:06:59 AM »
But i also want a timer put in front of the input, so that the person who made the batch,
is the only one who knows what to do, therefore giving someelse little time to guese the password.
and when the timers up, start another line of code.