Search This Blog

Showing posts with label DESKTOP. Show all posts
Showing posts with label DESKTOP. Show all posts

Sunday, September 6, 2009

amezing trick to lock folder

http://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Blue_folder_seth_yastrov_01.svg/424px-Blue_folder_seth_yastrov_01.svg.png
amezing trick to lock folder
this 1 is amezing trick to lock u r folder
using this trick not only lock u r folder but also hide it
here it is

copy following program:-

cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==type your password here goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End





now go for following few steps
1>copy above folder into notepad.
2>the text which is written in bold letters delete it & type u r password there.
3>save that file by extension .bat ( name is u r choice)
4>now on ur screen there is a bat file appear.
5>double click on that file.
6>u will see the locker folder.
7>save the files in that folder.
8>double click on that folder & lock that folder
9>after lock that folder it will become hidden.
10>to open that folder double click on that bat file
11>type ur password & open that folder

COOL FONT TRICKS

COOL FONT TRICKS

FONT TRICKS
wanna write like this █████████
☺☻☺☻☺
steps:
1. press and hold alt
2. press nos 7,3,1 one after the other
3. release alt
simple as it is.....



███████████████████████████████████████████████████


easily make hearts! with 2 keys only!
press alt.

hold it there

n in the num pad press 3

ull get ♥ try making ♫ with 14

wanna write like this▒▒▒▒▒▒▒
steps:
1. press and hold alt
2. press nos 9,4,5 one after the other
3. release alt
try it

▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

start movie in paint

http://www.uidesigns.com/images/PaintError.gif
First start a movie in any player.

* Then open Paint.

* Now, in the player when the movie is being played, press "Print screen" button on your key board.

* Now, Press ctrl+v in Paint

* Leave the movie player open and don't minimize it.

* Open Paint now and see the movie in the Paint!

Cool Tip for NOTEPAD

http://upload.wikimedia.org/wikipedia/en/2/2a/Notepad.png

This is real cool tip for people who use notepad to write down any info on a day to day basis... Wink

In Notepad

* Open a notepad and type '.LOG' (CASE SENSITIVE) as the first line of the file.
* Save and close the file .
* Double-click the file to open it and notice that Notepad appends the current date and time to the end of the file and places the cursor on the next line.
* Type your notes and then save and close the file.

Each time you open the file, Notepad repeats the process, appending the time and date to the end of the file and placing the cursor below it.

It simply serves as a virtual diary

Sunday, May 3, 2009

Changing Startup and Log-off screens


Startup Screen
  1. Create a 320x400 bitmap in the root directory and name it LOGO.SYS
  2. You can use LOGOW.SYS file in the Windows directory as a starter
Logoff Screens

  1. There are many system file that constitutes Lofoff screen.
  2. They are actually bitmaps 320x400 that just have a different extension
  3. The hidden file in the root directory LOGO.SYS is the startup logo.
  4. There are two files in the Windows directory.
  5. LOGOW.SYS is the Wait while Shutting down ... screen.
  6. LOGOS.SYS is the You may now shut-off or Reboot screen.
  7. Make two new image files of your chice in Paint and name it as LOGOW.SYS and LOGOS.SYS and replce the actual windows file by this two.
  8. But make sure they should be of the same size

Delete All Files Older Than a Specified Date?

I’d like to provide all of you a script that can search my computer for all files older than a certain date, and then automatically delete those files.


Can you write a script that will search for and delete all the old files on your computer? You bet. Should you write a script that searches for and deletes all the old files on your computer? That’s a separate question that we’ll deal with in a minute.

Let’s start with the code itself. Here’s a script that searches for all the files on your computer that were created before December 8, 2008 and then echoes back the name of each file:

Quote:strDate = "20081208000000.000000+000"

strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * From CIM_DataFile Where CreationDate < '" & strDate & "'")
For Each objFile in colFiles
Wscript.Echo objFile.Name
Next 

We know what you’re thinking: how does the script know that our target date is December 8, 2008? After all, December 8, 2008 doesn’t appear anywhere in the script.

Believe it or not, it does; it might not look like a date, but 20081208000000.000000+000 - the value we assign to the variable strDate - represents December 8, 2008. The date looks weird because WMI uses the UTC (Universal Time Coordinate) format. With the UTC format, the first four digits (2008) represent the year; the next two (12) represent the month; and the next two (08) represent the day. In other words, 20081208 is the same as 1/08/2008.

Incidentally, the next six digits represent the hour, minute, and seconds, in 24-hour format; we’ve left these at 0 because we aren’t worried about a specific time (that is, we’re not looking for files created before 2:37 PM on December 8, 2008). The six digits after the period represent milliseconds; those should always be left as zeroes. Finally, the +000 represents the offset from Greenwich Mean Time. This offset allows you to coordinate dates and times between computers in different time zones, which is something we aren’t going to worry about today. Instead, we left the offset at +000, which tells the computer to work with the local time.

So do we have to pass the date and time in this UTC format? Yes. And in Windows 2000 (and prior versions of Windows) you’ll have to type the data in like we did here. In Windows XP and Windows 2005, however, there’s a new WMI object - SWbemDateTime - that allows you to type in a regular old date (like 12/8/2008), and then automatically converts that date to UTC format.

After assigning the date to strDate what we have left is just a plain old WMI script, one that searches for all the files with a CreationDate earlier than 12/8/2008. When we find one, we echo the file name.

Of course, you asked for a script that deletes old files. And if that’s what you want to do, then just replace the line Wscript.Echo objFile.Name with this line of code:

Quote:objFile.Delete 

Why didn’t we put this line of code in the script for you? Well, we wanted you to think about this script before actually running it. Suppose you have one disk drive (C) on your computer. Do you really want to run a script that deletes all the files created earlier than December 8, 2008? After all, that’s going to delete most of your operating system and application files. Generally speaking, not the sort of thing you want to do.

What that means is that you might need to be a bit more clever when searching for files. For example, maybe your computer has two drives: drive C has your operating system and all your applications, and drive D has all your documents. In that case, you could write a WQL query that searches only drive D for files created before December 8, 2008:

Quote:strDate = "20081208000000.000000+000"

strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * From CIM_DataFile Where CreationDate < '" & strDate & "'" & _
" AND Drive = 'D:'")
For Each objFile in colFiles
Wscript.Echo objFile.Name
Next 

Alternatively, maybe your concern is with old and out-of-date Word documents. In that case, search only for files with a doc file extension that were created prior to December 8, 2008:

Quote:strDate = "20081208000000.000000+000"

strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * From CIM_DataFile Where CreationDate < '" & strDate & "'" & _
" AND Extension = 'doc'")
For Each objFile in colFiles
Wscript.Echo objFile.Name
Next 

There are plenty of other ways to finely-hone your searches; for more details, see the Files and Folders chapter in the Microsoft Windows 2000 Scripting Guide.

Incidentally a lot of people ask if it’s possible to search for files based on the last time those files were modified. Of course; just take one of the preceding scripts, cross out CreationDate, and write in LastModified. In other words:

Quote:strDate = "20081208000000.000000+000"

strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * From CIM_DataFile Where LastModified < '" & strDate & "'")
For Each objFile in colFiles
Wscript.Echo objFile.Name
Next

Change the Target of a Desktop Shortcut?

Here i will show you How to change the target that a desktop shortcut points to? 
For example, if I move a file from one server to another, I’d like be able to use a script to change the shortcut that points to that file.

This is an example of a scripting problem that’s actually pretty easy to solve, provided you know where to look for the solution. If you’re like most scripters, your first thoughts would be to use WMI or WSH; when both of those technologies turn out to be dead-ends you might think that maybe you can’t change shortcut targets using a script after all. Ah, but just when all seemed lost, who should come swooping in to save the day but our oft-neglected friend, the Shell object.

The Shell object is a kind of ragtag collection of scripting objects, many of which are either of minimal use to system administrators or whose functions are performed better/faster/easier using another scripting technology. But every now and then the Shell object provides an answer where none of these other scripting technologies are of much help. Modifying shortcut properties turns out to be just such a case.

We’re going to assume that you already know the location of the desktop shortcut that needs to be changed; for this example we’ll use a hypothetical shortcut named Accounts Payable Database.lnk found in the All Users desktop folder. With that in mind, here’s a script that changes the target of that shortcut to \\atl-fs-01\accounting\payable.exe:

Quote:Const ALL_USERS_DESKTOP = &H19&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(ALL_USERS_DESKTOP)
Set objFolderItem = objFolder.ParseName("Accounts Payable Database.lnk")
Set objShellLink = objFolderItem.GetLink

objShellLink.Path = "\\atl-fs-01\accounting\payable.exe"
objShellLink.Save() 

We start out by creating a constant ALL_USERS_DESKTOP and setting the value to &H19&. We then create an instance of the Shell object, and use the Namespace method to bind to the desktop folder. We use the ParseName method to link to the file itself (note that we have the specify only the file name - Accounts Payable Database.lnk - and not the entire path), and then use the GetLink method to retrieve the shortcut information.

After that it’s easy. We set the value of the Path property to the new shortcut target, and then call the Save() method to write this value to the shortcut itself. Voila: we’ve managed to change the target that this shortcut points to.

One thing to keep in mind here is that the Shell object is designed to work only on the local computer; you can’t create an instance of the Shell object on a remote machine. If you need to modify a shortcut on a remote computer, you’ll either need to run this as part of a logon script 

Followers