Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Запрос: скрипт для распаковки архива с паролем (?) 
Author Message
fa1con



PostPosted: Sun Mar 01, 2009 16:02    Post subject: Reply with quote

kadvlad
Лучше как-то так:

Code:
' =====================================================================
' File:         unrarp.vbs
' Description:  Распаковка запароленного rar-архива, использую в
'               качестве пароля текст из clipboard
'               winrar x -p<текст из БО> %P%N %T
' Installation: Создайте кнопку на панели TC
'               Команда: "диск:\путь\к\файлу\unrarp.vbs"
'               Параметры: %P%N %T
' =====================================================================

Dim RarPath, Params
RarPath = "c:\Program Files\WinRAR\Rar.exe" 'Путь к (win)rar-у

Set objArgs = WScript.Arguments
Set WS = CreateObject("WScript.Shell")

if objArgs.Count = 2 then

  Set objIE = CreateObject("InternetExplorer.Application")
  objIE.Navigate("about:blank")
  strURL = objIE.document.parentwindow.clipboardData.GetData("text")
  objIE.Quit

  Params = "x -p" & strURL & " " & chr(34) & objArgs(0) & chr(34) & " " & chr(34) & objArgs(1) &chr(34)
  WS.run chr(34) & RarPath & chr(34) & " " & Params
End if
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group