1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: WinRAR SFX and batch

Discussion in 'Software Development' started by Codiah, Sep 27, 2008.

Thread Status:
Not open for further replies.
  1. Codiah

    Codiah Thread Starter

    Joined:
    Sep 27, 2008
    Messages:
    116
    Ok, so this is a question i've been looking for the answer for, for some time.. is there some way to run a command in a batch file that will open a winrar self extracting file, input your password and unpack the file? i dont know if winrar has a command line parameter for this or not, or if theres some type of general one... or if there's a way to open a normal self decrypting archive in the .sda.exe format from the command prompt...

    any answers would be much appreciated..
     
  2. Codiah

    Codiah Thread Starter

    Joined:
    Sep 27, 2008
    Messages:
    116
    Ok well, after allot of digging through files and the internet, i found that there is a command for winrars SFX password-ed files to open them from the command line, and i figured i'd go ahead and share if anyone else had any interest...

    filename.exe -p<password> ///note: password goes immediatly after the "p" without a space between them.

    this would be usefull in an .exe file, if you include the SFX archive as an included file when you compile the exe, you can have the exe extract the file, insert the password and unpack the archive.. this would keep sensitive information safe if you were using multiple batch files outside of a parent exe... it obviously would still be viewable, but only after you input the password to allow the script to run..

    if it were as simple as wanting to lock files from prying eyes, i would just recomend using the SFX archive,no point in making a file if your just trying to hide something, but it does have some small advantages in the viewpoint of unpacking usable source files for your parent exe file..

    anyway, i should stop rambeling and get some sleep, g'night everyone..
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/753816

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice