home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 December (Special)
/
PCWorld_2004-12_Special_cd.bin
/
Windows
/
zapomenute
/
zapomenute.exe
/
NTFS-compact.vbs
Wrap
Text File
|
2003-10-11
|
5KB
|
126 lines
Set MyShell = CreateObject("Wscript.Shell")
Set MyFiles = CreateObject("Scripting.FileSystemObject")
Set Schalter=wscript.arguments
Set umgebung=MyShell.Environment("PROCESS")
windir=umgebung("windir")
neu="wscript.exe " & windir & "\NTFS-compact.vbs "
On Error Resume Next
mode=Schalter(0)
Ordner = Schalter(1)
installpath=windir & "\NTFS-compact.VBS"
If mode = "" then
a = myshell.regread("HKCR\Directory\shell\-> Komprese\command\")
If a = "" Then
a = myshell.regread("HKCR\Directory\shell\-> Zav°φt menu Komprese\command\")
If a = "" Then
pcwscript=wscript.scriptfullname
Set pcwcopy=MyFiles.GetFile(pcwscript)
pcwcopy.copy(installpath)
myshell.regwrite("HKCR\Directory\shell\-> Komprese\command\"), neu & "-max"
msgbox "Menu Komprese bylo nainstalovßno"
wscript.quit
Else
myshell.regdelete("HKCR\Directory\shell\-> Zav°φt menu Komprese\")
myshell.regdelete("HKCR\Directory\shell\-> Prov∞°it stav komprese\command\")
myshell.regdelete("HKCR\Directory\shell\-> Prov∞°it stav komprese\")
myshell.regdelete("HKCR\Directory\shell\-> Zkomprimovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> Zkomprimovat\")
myshell.regdelete("HKCR\Directory\shell\-> Dekomprimovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> Dekomprimovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> ZaÜifrovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> ZaÜifrovat\")
myshell.regdelete("HKCR\Directory\shell\-> DeÜifrovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> DeÜifrovat\")
End If
Else
myshell.regdelete("HKCR\Directory\shell\-> Komprese\command\")
myshell.regdelete("HKCR\Directory\shell\-> Komprese\")
End If
Myfiles.deletefile(Installpath)
MsgBox "Menu Komprese bylo odinstalovßno"
end if
Select case mode
Case "-max"
myshell.regdelete("HKCR\Directory\shell\-> Komprese\command\")
myshell.regdelete("HKCR\Directory\shell\-> Komprese\")
myshell.regwrite("HKCR\Directory\shell\-> Zav°φt menu Komprese\command\"), neu & "-min"
myshell.regwrite("HKCR\Directory\shell\-> Zav°φt menu Komprese\")
myshell.regwrite("HKCR\Directory\shell\-> Prov∞°it stav komprese\command\"), neu & "-proof " & Chr(34) & "%1" & chr(34)
myshell.regwrite("HKCR\Directory\shell\-> Zkomprimovat\command\"), neu & "-comp " & Chr(34) & "%1" & chr(34)
myshell.regwrite("HKCR\Directory\shell\-> Dekomprimovat\command\"), neu & "-decomp " & Chr(34) & "%1" & chr(34)
myshell.regwrite("HKCR\Directory\shell\-> ZaÜifrovat\command\"), neu & "-ciph " & Chr(34) & "%1" & chr(34)
myshell.regwrite("HKCR\Directory\shell\-> DeÜifrovat\command\"), neu & "-deciph " & Chr(34) & "%1" & chr(34)
myshell.Sendkeys "+{F10}"
Case "-min"
myshell.regwrite("HKCR\Directory\shell\-> Komprese\command\"), neu & "-max"
myshell.regdelete("HKCR\Directory\shell\-> Zav°φt menu Komprese\command\")
myshell.regdelete("HKCR\Directory\shell\-> Zav°φt menu Komprese\")
myshell.regdelete("HKCR\Directory\shell\-> Prov∞°it stav komprese\command\")
myshell.regdelete("HKCR\Directory\shell\-> Prov∞°it stav komprese\")
myshell.regdelete("HKCR\Directory\shell\-> Zkomprimovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> Zkomprimovat\")
myshell.regdelete("HKCR\Directory\shell\-> Dekomprimovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> Dekomprimovat\")
myshell.regdelete("HKCR\Directory\shell\-> ZaÜifrovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> ZaÜifrovat\")
myshell.regdelete("HKCR\Directory\shell\-> DeÜifrovat\command\")
myshell.regdelete("HKCR\Directory\shell\-> DeÜifrovat\")
wscript.quit
Case "-proof"
Set d = Myfiles.GetDrive(MyFiles.GetDriveName(Ordner))
s = d.FileSystem
If s = "NTFS" then
myshell.run "cmd.exe /k compact.exe /s:" & Ordner
myshell.run neu & "-max"
Else
x = MsgBox("Slo₧ka se nachßzφ na diskovΘm oddφlu" & s & ", komprimovat se dajφ pouze slo₧ky na diskov²ch oddφlech NTFS.", 48, "Chyba")
End If
Case "-comp"
Set d = Myfiles.GetDrive(MyFiles.GetDriveName(Ordner))
s = d.FileSystem
If s = "NTFS" then
myshell.run "cmd.exe /k compact.exe /c /s:" & Ordner
myshell.run neu & "-min"
Else
x=MsgBox("Slo₧ka se nachßzφ na diskovΘm oddφlu " & s & ", komprimovat se dajφ pouze slo₧ky na diskov²ch oddφlech NTFS.", 48, "Chyba")
End If
Case "-decomp"
Set d = Myfiles.GetDrive(MyFiles.GetDriveName(Ordner))
s = d.FileSystem
If s = "NTFS" then
myshell.run "cmd.exe /k compact.exe /u /s:" & Ordner
myshell.run neu & "-min"
Else
x=MsgBox("Slo₧ka se nachßzφ na diskovΘm oddφlu " & s & ", komprimovat se dajφ pouze slo₧ky na diskov²ch oddφlech NTFS.", 48, "Chyba")
End If
Case "-ciph"
Set d = Myfiles.GetDrive(MyFiles.GetDriveName(Ordner))
s = d.FileSystem
If s = "NTFS" Then
myshell.run "cmd.exe /k cipher.exe /e /s:" & Ordner & " /a"
myshell.run neu & "-min"
Else
x=MsgBox("Slo₧ka se nachßzφ na diskovΘm oddφlu " & s & ", Üifrovat se dajφ pouze slo₧ky na diskov²ch oddφlech NTFS.", 48, "Chyba")
End If
Case "-deciph"
Set d = Myfiles.GetDrive(MyFiles.GetDriveName(Ordner))
s = d.FileSystem
If s = "NTFS" Then
myshell.run "cmd.exe /k cipher.exe /d /s:" & Ordner & " /a"
myshell.run neu & "-min"
Else
x=MsgBox("Slo₧ka se nachßzφ na diskovΘm oddφlu " & s & ", Üifrovat se dajφ pouze slo₧ky na diskov²ch oddφlech NTFS.", 48, "Chyba")
End If
End Select