ute_man Posted July 5, 2019 Posted July 5, 2019 Hi everyone, I have 2 identical lines used to extract folders using 7za.exe. One of them works fine and not the other. I cannot figure out what is going on with my code and I have already spent 2 days and frustrated. Hence, seeking help from pros. Please help. My code below : FileInstall("C:\Software\LSSAM_CBT.7z", @TempDir & "\LSSAM_CBT.7z", 1) FileInstall("C:\Software\Maintenance_Tool.7z", @TempDir & "\Maintenance_Tool.7z", 1) FileInstall("C:\Software\7za.exe", @TempDir & "\7za.exe", 1) FileInstall("C:\Software\7za.dll", @TempDir & "\7za.dll", 1) Runwait(@ComSpec & " /c " & @TempDir & "\7za.exe x LSSAM_CBT.7z -o"&@TempDir&" -aoa", "", @SW_HIDE) Sleep(1000) Runwait(@ComSpec & " /c " & @TempDir & "\7za.exe x Maintenance_Tool.7z -o"&@TempDir&" -aoa", "", @SW_HIDE) This line works perfectly : Runwait(@ComSpec & " /c " & @TempDir & "\7za.exe x LSSAM_CBT.7z -o"&@TempDir&" -aoa", "", @SW_HIDE) But the below does NOT. Runwait(@ComSpec & " /c " & @TempDir & "\7za.exe x Maintenance_Tool.7z -o"&@TempDir&" -aoa", "", @SW_HIDE) Please let me know what is wrong with this, eventhough it is identical to the first one. Thanks a lot.
Moderators JLogan3o13 Posted July 6, 2019 Moderators Posted July 6, 2019 Change the /c to /k so you can see the output from 7za. Do you see any 7-zip specific errors? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
TheXman Posted July 6, 2019 Posted July 6, 2019 4 minutes ago, JLogan3o13 said: Change the /c to /k so you can see the output from 7za. ...don't forget to remove the @sw_hide flag too, or you still won't see anything. CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
Moderators JLogan3o13 Posted July 6, 2019 Moderators Posted July 6, 2019 good catch, missed that "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
ute_man Posted July 6, 2019 Author Posted July 6, 2019 Gents, Thank you so much for your quick replies. I changed /c to /k and removed @sw_hide and then got the following. But the file was actually there. (Maintenance_Tool.7z) Then I changed the code as below and then it worked. Runwait(@ComSpec & " /c " & @TempDir & "\7za.exe x ""Maintenance_Tool.7z"" -o" & @TempDir & " -aoa", "", @SW_HIDE) I enclosed the file name with quotes - ""Maintenance_Tool.7z"" Thank you so much all, much appreciated. This forum is amazing, and people like you are more amazing !!!!
Nine Posted July 6, 2019 Posted July 6, 2019 You're missing a space after -o “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ute_man Posted July 6, 2019 Author Posted July 6, 2019 Thanks Nine - It does not work if you add a space after -o. The only way I managed it was by enclosing file name with quotes. Thanks again.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now