Private Sub UnRar(ByVal filepath As String, ByVal WorkingDirectory As String) Dim objRegKey As RegistryKey objRegKey = Registry.ClassesRoot.OpenSubKey("WinRAR\Shell\Open\Command") Dim obj As Object = objRegKey.GetValue("") Dim objRarPath As String = obj.ToString() objRarPath = objRarPath.Substring(1, objRarPath.Length - 7) objRegKey.Close() Dim objArguments As String objArguments = " X " & " " & filepath & " " + " " + WorkingDirectory Dim objStartInfo As New ProcessStartInfo() objStartInfo.UseShellExecute = False objStartInfo.FileName = objRarPath objStartInfo.Arguments = objArguments objStartInfo.WindowStyle = ProcessWindowStyle.Hidden objStartInfo.WorkingDirectory = WorkingDirectory & "" Dim objProcess As New Process() objProcess.StartInfo = objStartInfo objProcess.Start() End Sub
UnRar("C:\MonFichier.rar", "C:\MonDossierExtrait")
UNRAR 3.93 freeware Copyright (c) 1993-2010 Alexander Roshal Usage: unrar <command> -<switch 1> -<switch N> <files...> <@listfiles...> <Commands> e Extract files to current directory l[t,b] List archive [technical, bare] p Print file to stdout t Test archive files v[t,b] Verbosely list archive [technical,bare] x Extract files with full path <Switches> - Stop switches scanning ac Clear Archive attribute after compression or extraction ad Append archive name to destination path ai Ignore file attributes ap Set path inside archive av- Disable authenticity verification check c- Disable comments show cfg- Disable read configuration cl Convert names to lower case cu Convert names to upper case dh Open shared files ep Exclude paths from names ep3 Expand paths to full including the drive letter f Freshen files id[c,d,p,q] Disable messages ierr Send all messages to stderr inul Disable all messages ioff Turn PC off after completing an operation kb Keep broken extracted files n<file> Include only specified file n@ Read file names to include from stdin n@<list> Include files listed in specified list file o[+|-] Set the overwrite mode oc Set NTFS Compressed attribute or Rename files automatically ow Save or restore file owner and group p[password] Set password p- Do not query password r Recurse subdirectories ri[:<S>] Set priority (0-default,1-min..15-max) and sleep time in ms sl<size> Process files with size less than specified sm<size> Process files with size more than specified ta<date> Process files modified after <date> in YYYYMMDDHHMMSS format tb<date> Process files modified before <date> in YYYYMMDDHHMMSS format tn<time> Process files newer than <time> to<time> Process files older than <time> ts<m,c,a>[N] Save or restore file time (modification, creation, access) u Update files v List all volumes ver[n] File version control vp Pause before each volume x<file> Exclude specified file x@ Read file names to exclude from stdin x@<list> Exclude files listed in specified list file y Assume Yes on all queries
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question