home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2005 May
/
PCWorld_2005-05_cd.bin
/
software
/
vyzkuste
/
zastupci
/
zastupci.exe
/
PCWJpFld.VBS
< prev
next >
Wrap
Text File
|
2004-02-19
|
9KB
|
228 lines
Set MyShell = CreateObject("Wscript.Shell")
Set MyFiles = CreateObject("Scripting.FileSystemObject")
Set Appshell = CreateObject("Shell.Application")
Set Schalter=wscript.arguments
Set umgebung=MyShell.Environment("PROCESS")
windir=umgebung("windir")
neu="wscript.exe " & windir & "\PCWjpFld.vbs "
On Error Resume Next
OL=""
mode=Schalter(0)
installpath=windir & "\PCWjpFld.VBS"
If mode = "" then
a = myshell.regread("HKCR\*\shell\=> Vybrat slo₧ku\command\")
If a = "" Then
a = myshell.regread("HKCR\*\shell\=> Zav°φt seznam\command\")
If a = "" Then
pcwscript=wscript.scriptfullname
Set pcwcopy=MyFiles.GetFile(pcwscript)
pcwcopy.copy(installpath)
myshell.regwrite("HKCR\*\shell\=> Vybrat slo₧ku\command\"), neu & "-max"
myshell.regwrite("HKCR\Directory\shell\=> Vybrat slo₧ku\command\"), neu & "-max"
msgbox "Utilita byla nainstalovßna"
wscript.quit
Else
myshell.regdelete("HKCR\*\shell\=> Zav°φt seznam\command\")
myshell.regdelete("HKCR\*\shell\=> Zav°φt seznam\")
myshell.regdelete("HKCR\*\shell\=> P°idat odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\*\shell\=> P°idat odkaz na slo₧ku \")
myshell.regdelete("HKCR\Directory\shell\=> Zav°φt seznam\command\")
myshell.regdelete("HKCR\Directory\shell\=> Zav°φt seznam\")
myshell.regdelete("HKCR\Directory\shell\=> P°idat odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\Directory\shell\=> P°idat odkaz na slo₧ku \")
Weg=Myfiles.Deletefile(installpath, true)
OL = myshell.regread("HKCU\Software\PCW \jumpfolder\")
If not OL ="" then
n=0
m=0
Do
Komma = InStr(n+1, OL, ",")
Verz = Mid(OL, n+1, Komma-n-1)
n = Komma
m=m+1
ReDim Ver(m)
Ver(m) = Verz
BBB=Mid(Ver(m), 2, Len(Ver(m))-2)
If Len(Ver(m))=5 Then
Basis=Mid(BBB, 1, Len(BBB)-1)
Else
Basis = MyFiles.GetFilename(BBB)
End If
myshell.regdelete("HKCR\*\shell\" & " " & Basis & "\command\")
myshell.regdelete("HKCR\*\shell\" & " " & Basis & "\")
myshell.regdelete("HKCR\Directory\shell\" & " " & Basis & "\command\")
myshell.regdelete("HKCR\Directory\shell\" & " " & Basis & "\")
Loop Until n = Len(OL)
myshell.regdelete("HKCU\Software\PCW \jumpfolder\")
myshell.regdelete("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \")
myshell.regdelete("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \")
Else
myshell.regdelete("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \")
myshell.regdelete("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \")
End If
msgbox "Utilita byla odinstalovßna"
wscript.quit
End If
Else
myshell.regdelete("HKCR\*\shell\=> Vybrat slo₧ku\command\")
myshell.regdelete("HKCR\*\shell\=> Vybrat slo₧ku\")
myshell.regdelete("HKCR\Directory\shell\=> Vybrat slo₧ku\command\")
myshell.regdelete("HKCR\Directory\shell\=> Vybrat slo₧ku\")
myshell.regdelete("HKCU\Software\PCW \jumpfolder\")
Weg=Myfiles.Deletefile(installpath, true)
msgbox "Utilita byla odinstalovßna"
wscript.quit
End if
end if
Select case mode
Case "-max"
OL = myshell.regread("HKCU\Software\PCW \jumpfolder\")
myshell.regdelete("HKCR\*\shell\=> Vybrat slo₧ku\command\")
myshell.regdelete("HKCR\*\shell\=> Vybrat slo₧ku\")
myshell.regwrite("HKCR\*\shell\=> Zav°φt seznam\command\"), neu & "-min"
myshell.regwrite("HKCR\*\shell\=> Zav°φt seznam\")
myshell.regwrite("HKCR\*\shell\=> P°idat odkaz na slo₧ku \command\"), neu & "-plus"
myshell.regdelete("HKCR\Directory\shell\=> Vybrat slo₧ku\command\")
myshell.regdelete("HKCR\Directory\shell\=> Vybrat slo₧ku\")
myshell.regwrite("HKCR\Directory\shell\=> Zav°φt seznam\command\"), neu & "-min"
myshell.regwrite("HKCR\Directory\shell\=> Zav°φt seznam\")
myshell.regwrite("HKCR\Directory\shell\=> P°idat odkaz na slo₧ku \command\"), neu & "-plus"
If not OL = "" Then
myshell.regwrite("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \command\"), neu & "-minus"
myshell.regwrite("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \command\"), neu & "-minus"
n=0
m=0
Do
Komma = InStr(n+1, OL, ",")
Verz = Mid(OL, n+1, Komma-n-1)
n = Komma
m=m+1
ReDim Ver(m)
Ver(m) = Verz
BBB=Mid(Ver(m), 2, Len(Ver(m))-2)
If Len(Ver(m))=5 Then
Basis=Mid(BBB, 1, Len(BBB)-1)
Else
Basis = MyFiles.GetFilename(BBB)
End If
myshell.regwrite("HKCR\*\shell\" & " " & Basis & "\command\"), neu & Ver(m)
myshell.regwrite("HKCR\Directory\shell\" & " " & Basis & "\command\"), neu & Ver(m)
Loop Until n = Len(OL)
Else
myshell.regdelete("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \")
myshell.regdelete("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \")
End If
myshell.Sendkeys "+{F10}"
Case "-min"
myshell.regwrite("HKCR\*\shell\=> Vybrat slo₧ku\command\"), neu & "-max"
myshell.regwrite("HKCR\Directory\shell\=> Vybrat slo₧ku\command\"), neu & "-max"
OL = myshell.regread("HKCU\Software\PCW \jumpfolder\")
If not OL ="" then
n=0
m=0
Do
Komma = InStr(n+1, OL, ",")
Verz = Mid(OL, n+1, Komma-n-1)
n = Komma
m=m+1
ReDim Ver(m)
Ver(m) = Verz
BBB=Mid(Ver(m), 2, Len(Ver(m))-2)
If Len(Ver(m))=5 Then
Basis=Mid(BBB, 1, Len(BBB)-1)
Else
Basis = MyFiles.GetFilename(BBB)
End If
myshell.regdelete("HKCR\*\shell\" & " " & Basis & "\command\")
myshell.regdelete("HKCR\*\shell\" & " " & Basis & "\")
myshell.regdelete("HKCR\Directory\shell\" & " " & Basis & "\command\")
myshell.regdelete("HKCR\Directory\shell\" & " " & Basis & "\")
Loop Until n = Len(OL)
myshell.regdelete("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\*\shell\=> Odstranit odkaz na slo₧ku \")
myshell.regdelete("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\Directory\shell\=> Odstranit odkaz na slo₧ku \")
End If
myshell.regdelete("HKCR\*\shell\=> Zav°φt seznam\command\")
myshell.regdelete("HKCR\*\shell\=> Zav°φt seznam\")
myshell.regdelete("HKCR\*\shell\=> P°idat odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\*\shell\=> P°idat odkaz na slo₧ku \")
myshell.regdelete("HKCR\Directory\shell\=> Zav°φt seznam\command\")
myshell.regdelete("HKCR\Directory\shell\=> Zav°φt seznam\")
myshell.regdelete("HKCR\Directory\shell\=> P°idat odkaz na slo₧ku \command\")
myshell.regdelete("HKCR\Directory\shell\=> P°idat odkaz na slo₧ku \")
wscript.quit
Case "-plus"
Set AppFolder = Appshell.BrowseForFolder(0, "", &H0001, 17)
Ordner = AppFolder.ParentFolder.ParseName(AppFolder.Title).Path
If err.number > 0 then
i=instr(AppFolder, ":")
Ordner = mid(AppFolder, i - 1, 1) & ":\"
End If
If Ordner="" Then
myshell.run neu & "-min"
wscript.quit
End if
rest = myshell.regread("HKCU\Software\PCW \jumpfolder\")
myshell.regwrite("HKCU\Software\PCW \jumpfolder\"), rest & Chr(34) & Ordner & Chr(34) & ","
myshell.run neu & "-max"
Case "-minus"
OL = myshell.regread("HKCU\Software\PCW \jumpfolder\")
If not OL ="" then
n=0
m=0
Do
Komma = InStr(n+1, OL, ",")
Verz = Mid(OL, n+1, Komma-n-1)
n = Komma
m=m+1
ReDim Ver(m)
Ver(m) = Verz
BBB=Mid(Ver(m), 2, Len(Ver(m))-2)
If Len(Ver(m))=5 Then
Basis=Mid(BBB, 1, Len(BBB)-1)
Else
Basis = MyFiles.GetFilename(BBB)
End If
lsch = MsgBox("Chcete smazat polo₧ku " & Chr(34) & Basis & Chr(34) & "?", 4, "Odstranit polo₧ku?")
If lsch = 6 Then
myshell.regdelete("HKCR\*\shell\" & " " & Basis & "\command\")
myshell.regdelete("HKCR\*\shell\" & " " & Basis & "\")
myshell.regdelete("HKCR\Directory\shell\" & " " & Basis & "\command\")
myshell.regdelete("HKCR\Directory\shell\" & " " & Basis & "\")
Else
Liste = Liste & Ver(m) & ","
End If
Loop Until n = Len(OL)
If Liste = "" Then
myshell.regdelete("HKCU\Software\PCW \jumpfolder\")
deinst = MsgBox("VÜechny odkazy byly odstran∞ny" & VBCR & "Chcete nynφ celou utilitu odinstalovat?", 4, "Odinstalovat utilitu?")
If deinst = 6 Then
myshell.run neu
wscript.quit
End If
Else
myshell.regwrite("HKCU\Software\PCW \jumpfolder\"), Liste
End if
End if
myshell.run neu & "-max"
Case Else
myshell.run Chr(34) & Schalter(0) & "\" & Chr(34)
myshell.run neu & "-min"
End Select