Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

VBS create rar files.


  • Please log in to reply

#1
IO-error

IO-error

    Member

  • Member
  • PipPipPip
  • 276 posts
Hi there fellow geeks.

I'm wondering how to get this result with VBS:

FileName.rar Containing:
Picture01.jpg*
Picture02.jpg*
Picture03.jpg*
Picture04.jpg*
Password.txt
ReadMe.txt*


Note, Password.txt not having a star and thus not having a password.
I have tried a wide variety of switches and also made a lot of google searches for a few days, but I can't find it.

So basically, I'm wondering what switches, syntax and order I have to put the command, in order to achieve the "Password.txt" to be accessible without password.
Thank you for you time in advance.

***EDIT***
Oh, I'm not trying to make fake rars that you see at download centra.
I'm trying to use this for my work, to easily and most of all safely, store back-ups of customers.
The password in the Password.txt is encoded with my own unique encoding script and is only decodable by my own decode script.

Edited by IO-error, 07 November 2010 - 06:56 AM.

  • 0

Advertisements


#2
IO-error

IO-error

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 276 posts
I found out how to do it.
So, here it is:
Set sh = CreateObject("WScript.Shell")
	sh.run("""C:\Program Files\WinRAR\Rar.exe"" a -m5 -en " &Bdir &" " &PassFile)	'Bdir is location to save the rarfile to.
		Wscript.Sleep 100	'You know what this does.
	sh.run("""C:\Program Files\WinRAR\Rar.exe"" a -m5 -ed -p" &Pass &" " &Bdir &" " &Target)'Pass is the password to encode with, Target is the dirs to save.

"-en" will prevent the rarfile to close.
"-ed" leaves out empty directory's.
"-m5" max compression ratio.

This seemed the right way to do what I wanted.
I hope others have some use of this.

Edited by IO-error, 08 November 2010 - 12:04 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP