20 May 2008 @ 4:00 AM 
 

How to lock Windows by running a file (or command)

 

If you’ve ever needed to lock your windows up while you are away for a while (ex. jump out really quick out of your working desk) you probably know the shortcut WINKEY+L - this works in all windows versions. You have probably thought if you can make it locked by starting a file this might be your solution. Why do you need to lock your computer with a command (or starting file)? Here is two major reasons:

  • A user has to be logged on so an application to be started (Torrent client, simple FTP/HTTP server, etc);
  • You might want to lock the computer in certain cases (after an application ends, at exact time and so on);
  • Of course there is more cases you need to lock you windows session…

Well, if you use a simple windows command with particular options (which is documented in windows documentation) you can lock your session:

%windir%\system32\rundll32.exe user32.dll, LockWorkStation
This works no matter where your windows installation is.

So if you need a command the above line is for you. But if you need a file to be run you can create one by following this steps (this is for Vista, in all other “modern” versions - Windows NT/2000/2003/XP is similar, I haven’t tested it in Windows 95/98/ME though):

  1. Right click on your desktop and choose NEW then SHORTCUT;
  2. Paste this: %windir%\system32\rundll32.exe user32.dll, LockWorkStation in the field “Type the location of the item:”;
  3. Click NEXT then name the shortcut as you like (ex. LockWin), then hit FINISH.

That’s it. If you don’t like the icon of the shortcut you can change it in the well known way - right click on the shortcut, hit PROPERTIES, choose SHORTCUT tab and press CHANGE ICON button. Then choose an executable file (or DLL) to take the icon from. There is a lot if icons in Vista in this file: “%SystemRoot%\system32\imageres.dll”. And for all windows versions you can use “%SystemRoot%\explorer.exe”. You can use custom icon (EXE,DLL) file too.

Hope this will solve some issues.

Tags Tags: , ,
Categories: system
Posted By: Tricky
Last Edit: 24 Feb 2009 @ 03 45 PM

EmailPermalink
 

Responses to this post » (13 Total)

 
  1. Charmaine says:

    Good for people to know.

  2. Pett says:

    Greatings,
    Not sure that this is true:), but thanks for a post.

    Have a nice day
    Pett

  3. Tricky says:

    Well, all I did is an Internet research - these are all windows- implemented functions. I tested and actually use it all the time. When you try and it doesn’t work - share it so I can help.

  4. Eremeeff says:

    Hi there,
    Thank you! I would now go on this blog every day!

    Thank you
    Eremeeff

  5. Hi, very nice post. I have been wonder’n bout this issue,so thanks for posting

  6. GarykPatton says:

    Hello. I think the article is really interesting. I am even interested in reading more. How soon will you update your blog?

  7. Hi! I like your srticle and I would like very much to read some more information on this issue. Will you post some more?

  8. ARTURO says:


    PillSpot.org. Canadian Health&Care.No prescription online pharmacy.Best quality drugs.Special Internet Prices. No prescription pills. Buy drugs online

    Buy:Prozac.Cozaar.Lipitor.Zetia.Acomplia.Wellbutrin SR.Buspar.Lipothin.Female Cialis.Aricept.Seroquel.Zocor.SleepWell.Nymphomax.Amoxicillin.Lasix.Ventolin.Benicar.Advair.Female Pink Viagra….

  9. TROY says:


    PillSpot.org. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. Online Pharmacy. Order pills online

    Buy:Accutane.Actos.Mega Hoodia.Human Growth Hormone.Zovirax.Valtrex.Prevacid.Retin-A.Nexium.Synthroid.Prednisolone.Lumigan.100% Pure Okinawan Coral Calcium.Zyban.Petcam (Metacam) Oral Suspension.Arimidex….

  10. RAY says:


    Pillspot.org. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. Low price pills. Buy pills online

    Buy:Lipothin.Zocor.Female Pink Viagra.Benicar.Ventolin.Zetia.Female Cialis.Advair.Wellbutrin SR.Nymphomax.Buspar.Lasix.Amoxicillin.Aricept.Cozaar.Seroquel.Prozac.Acomplia.SleepWell.Lipitor….

  11. RAY says:


    Medicamentspot.com. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. High quality pills. Order drugs online

    Buy:Mega Hoodia.Synthroid.Valtrex.Human Growth Hormone.Arimidex.Zyban.Lumigan.Retin-A.Accutane.Zovirax.Actos.Prevacid.Prednisolone.Petcam (Metacam) Oral Suspension.100% Pure Okinawan Coral Calcium.Nexium….

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

\/ More Options ...
Change Theme...
  • Users » 1
  • Posts/Pages » 4
  • Comments » 17
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.