Maestro Posted August 3, 2005 Posted August 3, 2005 I'm trying to create some self-extracting winRAR archives to install some of my programs, and I've been able to create them fine manually, but I'm having trouble finishing them from the command line utility. I can create the sfx archive itself just fine, but then when I try to add comments to it from a file, I cannot get them to add. The "date modified" on the archive updates to the current time, but the comments aren't actually in it.The file I'm trying to call the comments from is "comment.txt" and looks like:;The comment below contains SFX script commandsPath=strokeitSavePathSetup=strokeit.cmdSilent=1Overwrite=1I've also tried naming this comment file with different extensions (or no extension) with the same results.To add the comments to an existing sfx archive, I understand the correct syntax to be the first one here, but I've tried all these and none work:rar cf folder\existingarchive.exe comment.txtrar c folder\existingarchive.exe comment.txtrar cf comment.txt folder\existingarchive.exe rar c comment.txt folder\existingarchive.exeSo, does anybody know what I'm doing wrong here? This is driving me insane, it seems like it aught to be so simple... and it probably is.Thanks in advance!
nakira Posted August 3, 2005 Posted August 3, 2005 The rar commandline tool is named rar32.exe, so I'm assuming you have renamed it.rar c -zcomment.txt folder\existingarchive.exe
Maestro Posted August 3, 2005 Author Posted August 3, 2005 Actually, I haven't renamed anything, and i just searched my computer and there's no "rar32.exe" on it. All I've done is added "C:\Program Files\WinRAR\" to the "paths" variable, so now I can simply use the "rar" command from any command prompt or batch file.The syntax you gave there works for me, Thanks so much! That's very interesting. I'd tried it almost that way, but without the z. How on earth did you ever know to add that? Is there a guide somewhere I've overlooked?
nakira Posted August 3, 2005 Posted August 3, 2005 (edited) Ah, I thought you meant RAR for Dos when you mentioned "the command line utility". The 'guide' I use is WinRAR.hlp. WinRAR Help > Contents >> Command line mode >> Commands >> "C" Add an archive commentb) Comments may be added from a file by using the -z<file> switch.WinRAR c -zinfo.txt dummyYou can also use rar /? from commandline. Edited August 3, 2005 by nakira
Maestro Posted August 3, 2005 Author Posted August 3, 2005 Son of a gun!! I should have looked through that help before, I guess I don't always think all the way. (I know you can use rar /? at the command line, but its information is limited.) Well thanks for helping me with something I should have found on my own!
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now