Jump to content

TheShadowBlade

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by TheShadowBlade

  1. Hello there, Yesterday I was started working on a very basic shell for Windows. Currently it hasn't got any name, so name ideas are also welcome. If you want to test it, first, you need to extract the package, and compille all files in it, and then you can start StartShell.exe What do you think about it? What things would be needed in a cool shell? basicshell.zip
  2. Thanks for sharing, another cool idea And I was finished my virtual disk manager example. I think it can be useful for this project (works under Windows 7 and 8, tested under 8): #RequireAdmin #NoTrayIcon Global Const $vdisk_path = @WindowsDir & "\Resources\secret.vhd" Global Const $disk_label = "Secret disk" Global Const $mount_type = "LETTER" Global Const $mount_place = "P" ;DirCreate(@DesktopDir & "\TheSecretFolder") ;needed for attaching, you can delete this folder after deattaching the disk ;Global Const $mount_type = "MOUNT" ;Global Const $mount_place = FileGetShortName(@DesktopDir & "\TheSecretFolder") #Region Create a secret virtual disk, open it, and delete it. CreateSecretDisk("500") ;creates a 500 MB disk While 1 $pass = InputBox("Secret disk", "Enter the password to open the secret disk :D", "", "*") If @error Then ;if cancel button was pressed ... FileDelete($vdisk_path) Exit EndIf SplashTextOn("", "Verifying password ...", Default, 45, Default, Default, 1) Sleep(600) SplashOff() If $pass == "something" Then MountSecretDisk() ExitLoop Else SplashTextOn("", "Wrong password!", Default, 45, Default, Default, 1) Sleep(1000) SplashOff() EndIf WEnd MsgBox(64, "Password accepted", "Press escape anytime to deattach the secret disk.") HotKeySet("{ESC}", "Unmount") While 1 Sleep(10) WEnd Func Unmount() SplashTextOn("", "Deattaching secret disk ...", Default, 45, Default, Default, 1) UnmountSecretDisk() Sleep(1000) FileDelete($vdisk_path) Exit EndFunc #EndRegion Func CreateSecretDisk($disk_size_in_megabytes = "100", $label = $disk_label, $type = $mount_type, $letter_or_path = $mount_place, $diskpath = $vdisk_path) Local $diskpart_script = FileOpen(@TempDir & "\script.txt", 2) FileWriteLine($diskpart_script, 'CREATE VDISK FILE="' & $diskpath & '" MAXIMUM=' & $disk_size_in_megabytes & " TYPE=EXPANDABLE") FileWriteLine($diskpart_script, "ATTACH VDISK") FileWriteLine($diskpart_script, 'create partition primary') FileWriteLine($diskpart_script, 'format fs=ntfs label="' & $label & '" quick') FileWriteLine($diskpart_script, "ASSIGN " & $type & '=' & $letter_or_path) FileWriteLine($diskpart_script, "DETACH VDISK") FileClose($diskpart_script) Sleep(100) RunWait('diskpart /s "' & @TempDir & '\script.txt"', "", @SW_HIDE) Sleep(100) FileDelete(@TempDir & "\script.txt") EndFunc Func MountSecretDisk($diskpath = $vdisk_path) Local $diskpart_script = FileOpen(@TempDir & "\script.txt", 2) FileWriteLine($diskpart_script, 'SELECT VDISK FILE="' & $diskpath & '"') FileWriteLine($diskpart_script, "ATTACH VDISK") FileClose($diskpart_script) Sleep(100) RunWait('diskpart /s "' & @TempDir & '\script.txt"', "", @SW_HIDE) Sleep(100) FileDelete(@TempDir & "\script.txt") EndFunc Func UnmountSecretDisk($diskpath = $vdisk_path) Local $diskpart_script = FileOpen(@TempDir & "\script.txt", 2) FileWriteLine($diskpart_script, 'SELECT VDISK FILE="' & $diskpath & '"') FileWriteLine($diskpart_script, "DETACH VDISK") FileClose($diskpart_script) Sleep(100) RunWait('diskpart /s "' & @TempDir & '\script.txt"', "", @SW_HIDE) Sleep(100) FileDelete(@TempDir & "\script.txt") EndFunc
  3. Cool idea and quite useful against a beginner thief, but 3 clicks in the task manager to terminate. Try to make another script, with this code: #NoTrayIcon #RequireAdmin Global Const $script_name = "YourGuardianProgram'sFilename" Global Const $script_path = @ScriptDir & "\" & $script_name & ".exe" Global Const $action_when_program_terminates = 1 Global Const $check_interval = 10 ; 1 = Restarts the computer ; 2 = Kill the task manager if exists, and restart the guardian While 1 If ProcessExists($script_path) = False Then Switch $action_when_program_terminates Case 1 Shutdown(6) Case 2 ProcessClose("taskmgr.exe") Run($script_path) EndSwitch EndIf Sleep(10) WEnd ;add the Run("2ndguardianpath") and this code to the main guardian's program, but modify the $script_name constant to this program's nameI hope it will useful for you
  4. Set the process as critical, because it can be simply terminated by the task manager. And also a screenshot taking after the thief opens the lid.
×
×
  • Create New...