Exit Posted July 22, 2022 Author Posted July 22, 2022 New version in first post Version: 2022.07.22 - Support scripts with the same name but different content in different directories. argumentum, taurus905 and Musashi 3 App: Au3toCmd UDF: _SingleScript()
MightyWeird Posted July 27, 2022 Posted July 27, 2022 (edited) Hi, Yesterday I tried running my script on a different machine. This Windows setup has a space in the username. This becomes a problem. I added screenshot below. Machines without space in username works fine. The cmd window disapears after a couple of second the this was a lucky shot. Might add screenshot of full output later. This is latest version of auto3cmd (Version: 2022.07.22) Edited July 27, 2022 by MightyWeird
Exit Posted July 27, 2022 Author Posted July 27, 2022 (edited) @MightyWeirdPlease confirm that the bug has been fixed. Is fixed. See next post. New version in first post Version: 2022.07.27 - Support scripts with space in username. Edited July 28, 2022 by Exit Fix confirmed. Musashi and argumentum 2 App: Au3toCmd UDF: _SingleScript()
MightyWeird Posted July 28, 2022 Posted July 28, 2022 Hi Exit, Yes the latest update (Version: 2022.07.27) fixes this problem. My script runs fine now. Thank you for your work / quick fix! Exit 1
bartmon2005 Posted August 22, 2022 Posted August 22, 2022 @ExitThank you for this excellent tool. It saved my ass. One of my clients had this false positive problem. After a short search I found your tool and tried it out. It works great and my customer is happy. However, I have no idea how this works. My CMD knowledge is close to zero and I'm already having trouble with the first line of the CMD file. But it works!!! Now I would like the opinion of other users if the tool is safe and has no backdoors. So if a DEV or MVP has an opinion on this, please don't be shy. Thanks in advance bartmon2005
argumentum Posted August 22, 2022 Posted August 22, 2022 (edited) <snipped by user> Edited August 22, 2022 by argumentum bartmon2005 does not deserve anyone's time Musashi 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
bartmon2005 Posted August 23, 2022 Posted August 23, 2022 14 hours ago, argumentum said: bartmon2005 does not deserve anyone's time ?
argumentum Posted August 23, 2022 Posted August 23, 2022 It's quite simple. You are thanking for the solution but superstitious of a backdoor ?!!!. All the code is there. Is worthless to have reasons in a chat with you because you don't even know CMD ? On 8/22/2022 at 1:05 PM, bartmon2005 said: My CMD knowledge is close to zero and I'm already having trouble with the first line of the CMD file. But it works!!! so, yes. It'd be a waste of time. Like I'm doing right now. Hereon after you're in my ignore list of, now 2 users. Exit and Musashi 2 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Musashi Posted August 23, 2022 Posted August 23, 2022 I fully agree with @argumentum ! @bartmon2005 : On 8/22/2022 at 7:05 PM, bartmon2005 said: Thank you for this excellent tool. It saved my ass. One of my clients had this false positive problem. Your ass is safe, but your index finger was not capable to click the Thanks button - that's pathetic ! On 8/22/2022 at 7:05 PM, bartmon2005 said: Now I would like the opinion of other users if the tool is safe and has no backdoors. So if a DEV or MVP has an opinion on this, please don't be shy. @Exit is a well-known member of this forum. The thread is 8 pages long and his solution has already helped a lot of people. Asking about the security of a solution may be legitimate (but what is secure these days?). Asking about backdoors insinuates that the author has dishonest intentions, and that is insulting. taurus905, argumentum, Exit and 1 other 4 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
taurus905 Posted August 27, 2022 Posted August 27, 2022 Hello Exit, Thank you for a great solution with excellent potential. I may have to read through this thread a few more times to understand how I can use it best. In the mean time, I'd thought I'd ask this question. Is it possible to create a .cmd script and have the .ini file in the same directory, like: test.cmd and test.ini Thanks again for your awesome contribution to the AutoIt community. taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
Exit Posted August 27, 2022 Author Posted August 27, 2022 3 hours ago, taurus905 said: Is it possible to create a .cmd script and have the .ini file in the same directory, like: test.cmd and test.ini Yes Just try it The test.cmd is in the current working directory. taurus905 1 App: Au3toCmd UDF: _SingleScript()
taurus905 Posted August 28, 2022 Posted August 28, 2022 Hello Exit, I feel it's just a simple edit to my "Example.au3" script below to have the "Example.ini" file created in the same directory where "Example.cmd" is ran from. Currently, it's created in "C:\Users\taurus905\AppData\Roaming\Au3toCmd\a3x\MCB7\" expandcollapse popupOpt("MustDeclareVars", 1) Opt("TrayMenuMode", 3) ; 1 = no default menu & 2 = items will not automatically check/uncheck when clicked Global $s_Program_Name = StringTrimRight(@ScriptName, 4) Global $p_Ini_File Global $p_Example_Folder = @ScriptDir & "\Example\" If Not FileExists($p_Example_Folder) Then DirCreate($p_Example_Folder) Global $c_tray_Exit _Start_Program() ; Start Program While 1 Switch TrayGetMsg() Case $c_tray_Exit _Exit() ; Exit EndSwitch WEnd Exit Func _Start_Program() ; Start Program $p_Ini_File = @ScriptDir & "\" & $s_Program_Name & ".ini" _Read_Ini_File() ; Read Ini File _Create_Tray_Menu() ; Create Tray Menu EndFunc ; ==> _Start_Program Func _Read_Ini_File() ; Read Ini File If Not FileExists($p_Ini_File) Then IniWrite($p_Ini_File, "Section", "Key", "Value") EndIf EndFunc ; ==> _Read_Ini_File Func _Create_Tray_Menu() ; Create Tray Menu $c_tray_Exit = TrayCreateItem("Exit") TraySetState() EndFunc ; ==> _Create_Tray_Menu Func _Exit() ; Exit Exit EndFunc ; ==> _Exit Thank you for any direction you have to offer. taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
kurtykurtyboy Posted August 28, 2022 Posted August 28, 2022 I may be a wee bit late to the party, but I just wanted to show my appreciation for this awesome project! It's quite remarkable what can be done with only a CMD file. 😲 Exit 1
Exit Posted August 28, 2022 Author Posted August 28, 2022 7 hours ago, taurus905 said: Thank you for any direction you have to offer. Here my directions: ;~ Global $p_Example_Folder = @ScriptDir & "\Example\" Global $p_Example_Folder = @WorkingDir ;~ $p_Ini_File = @ScriptDir & "\" & $s_Program_Name & ".ini" $p_Ini_File = @WorkingDir & "\" & $s_Program_Name & ".ini" Because *.a3x is in the @scriptdir but *.cmd is in the @workingdir And you want the *.ini file in the *.cmd directory. I hope it helps. taurus905 1 App: Au3toCmd UDF: _SingleScript()
taurus905 Posted August 28, 2022 Posted August 28, 2022 Thank you, Exit. I appreciate your detailed explanation. I knew it was something simple I had read earlier that I didn't properly test. I love AutoIt so much. This will allow me to share what I've created over the years with so many non-programmer people. You are the best. taurus905 Exit 1 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
Exit Posted September 1, 2022 Author Posted September 1, 2022 New version in first post Version: 2022.09.01 - Optimized annual cleaning. When using Au3toCmd it makes no sense to write data to @scriptdir as that is not the directory where the CMD file is located. The CMD file is located in @workingdir. If data is written to @scriptdir, it was deleted during the annual cleanup. With the new version, this data is retained and may have to be deleted manually. In order not to suffer any data loss, ALL *.CMD should be recreated with Au3toCmd. Musashi 1 App: Au3toCmd UDF: _SingleScript()
BakedCakes Posted November 19, 2022 Posted November 19, 2022 (edited) When running Deskotp\one-two\three\program.cmd, the cmd exits without writing anything to stdout and stderr. However, it works correctly if I put program.cmd directly in Desktop. Looks like it doesn't like nested folder with dashes in them? Edited November 19, 2022 by BakedCakes
lowbattery Posted December 17, 2022 Posted December 17, 2022 Bitdefender is flagging the CMD as a virus. "....cmd.prog is infected with Gen:Heur.PHM.1. The threat has been successfully blocked, your device is safe." Any recommendations?
Skysnake Posted December 30, 2022 Posted December 30, 2022 1. Uninstall BitDefender 2. Set an exclusion on the folder in Windows Defender and/or BitDefender 3. Email BitDefender with explanation of what the script does and why. Ask for exclusion? Try 300 words or less. 4. See point 1. Skysnake Why is the snake in the sky?
Mateocedillo Posted January 4, 2023 Posted January 4, 2023 Hello, Does this work with AVG Antivirus? Because this is overprotecting execution whit a compiled script and autoit3.exe. An exclusion could be added, but it's really annoying.
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