melmitts707 Posted January 13, 2016 Share Posted January 13, 2016 (edited) Yes, I am going to feel really stupid after I find out why it don't work...Running Windows 10 Pro, from the command line I enter WinRAR a -r- E:\UserID\DataBackup\BackupData.rar D:\UserID\Data\*It works fineFrom my AutoIt script I enter: RunWait("WinRAR a -r- E:\UserID\DataBackup\BackupData.rar D:\UserID\Data\*")It doesn't work. No errors reported, the script finishes running but no file createdIf I try using ShellExecuteWait I get multiple popup error messages.Any guidance or words of wisdom about what I am missing an or doing wrong?ThanksMel Edited January 14, 2016 by melmitts707 Link to comment Share on other sites More sharing options...
TheDcoder Posted January 13, 2016 Share Posted January 13, 2016 (edited) To run DOS (console) commands, try RunWait(@ComSpec & " /c " & 'commandName', "", @SW_HIDE) ; don't forget " " before "/c"Remarks in the Documentation for RunWait Edited January 13, 2016 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
water Posted January 13, 2016 Share Posted January 13, 2016 Welcome to AutoIt and the forum!The help file is a great ressource RunWait expects "The full path of the program". My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
melmitts707 Posted January 14, 2016 Author Share Posted January 14, 2016 I said I would feel stupid... I was using a different file compression program that didn't require the full path but apparently WinRAR does. Anyway, it works perfectly by including the program's full path.Thanks to all for the helpMel Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 14, 2016 Share Posted January 14, 2016 You are saying that as if WinRAR is the weird one. In fact most applications DON'T add themselves to the PATH environment variable. Open a cmd window and run path and see for yourself. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
melmitts707 Posted January 15, 2016 Author Share Posted January 15, 2016 I wasn't saying that WinRAR is weird, I was saying the other compression program (pacl) did not require it so I didn't think about or even try to run the WinRAR program with the full path when I should have. I know most programs must be ran with full path or added to the system PATH command. I just went temporarily brain dead... Link to comment Share on other sites More sharing options...
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