Followers 0

# Dos command openfiles run from autoit result file is empty

## 4 posts in this topic

#1 ·  Posted (edited)

Good Morning Everyone,

I want to say thank you to everyone here - you guys are fantastic at what you do and we all appreciate your help and hard work. All of IT has benefited from your hard work and knowledge. So thank you.

Edited...

Edited by souldjer777

"Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"
Song Title: I guess you could say
Artist: Middle Class Rut

##### Share on other sites

Have you tried running it from a 32 bits CMD prompt to see if it's a x86/x64 issue, or running the au3 script with the x64 version of AutoIt3?

Jos

Live for the present,
Dream of the future,
Learn from the past.

##### Share on other sites

Jos how are you so fast?

Just went to say yes its a 32/64 bit issue... if you compile your exe as 64 and run it it will likely work without problem.

Its always a good tip when doing DOS commands put /k to see what is happening...so
RunWait(@ComSpec & " /k " & $CommandFinal , "", @SW_SHOW) While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd #### Share this post ##### Link to post ##### Share on other sites #4 · Posted (edited) Thanks for the fast replies I'll get to it! Thanks again AutoIT Gurus! Edited by souldjer777 "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet" Song Title: I guess you could say Artist: Middle Class Rut #### Share this post ##### Link to post ##### Share on other sites ## 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 account ## Sign in Already have an account? Sign in here. Sign In Now Followers 0 • ### Similar Content • By breakbadsp I want to run a python script from autoit. I know we can do this with shellexecute or run , but this python script takes 3 cmd line arguments. How to pass them from autoit script? I tried many ways. Following solution also not working e.g. RunWait( 'fullpath\Python.exe Scriptpath\ReadLog.py -f "file.log" -k "key" -e "errMsg" ') Found solution: RunWait( 'fullpath\Python.exe ReadLog.py -f "file.log" -k "key" -e "errMsg" ', 'Working_directory_path') PFB description: https://stackoverflow.com/questions/45757834/how-to-pass-command-line-arguments-to-a-python-script-anyscript-while-executin • By StMaSi I'm attempting to code a Run or RunWait command that is a little on the long side and contains multiple sets of embedded quotes (as it would be issued from a CMD prompt), but can't for the life of me figure out the containing quotes as pertains to AutoIt. Here's the one-line command as it would be issued via a CMD prompt... "\\AppServ\G$\Connectivity\Clients\Citrix\Receiver\14.5.0.10018\CitrixReceiver.exe" ADDLOCAL="ReceiverInside,ICA_Client,WebHelper,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d" ALLOWADDSTORE=A ALLOWSAVEPWD=A ENABLEPRELAUNCH=Y ENABLE_SSON=Yes STORE0="AppStore;https://receiver.domain.net/Citrix/Apps/discovery;on;AppStore" /EnableCEIP=false /includeSSON /noreboot /silent I've tried so many different combinations of surrounding quotes with Run and RunWait, I just don't understand why it's this difficult to get past this.
Can anyone assist with this?
Thank you.
• By WannaBeGut
Hello,
I just wrote a script that should copy data into my cloud using xcopy (cmd), but I want the Status Bar I have in my GUI to change it's text like that:
working. -> working.. -> working... -> working. ...
I would also like to make a button which interrupts xcopy (simply closing it should do the trick), but I don't know how to call ProcessClose("xcopy.exe") using a button, while I'am waiting for RunWait to finish.
Example:
$command = 'xcopy "' & @DesktopDir & '\text.txt"' & ' "\\ADMIN-CLOUD\private\" /EECHIY'$SW_STATE = @SW_HIDE RunWait(@ComSpec & " /c " & '"' & $command & '"', @DesktopDir,$SW_State) Please tell me if you need any further information!
• By ur
I have written a script to build the Installshield project file(.ism) to setup files(.msi or .exe based on the release settings..).
So when the user runs the script the process will be automatic for multiple ism files.
Func Build($sOutputIsm,$ReleaseName,$sFilePath="None",$NewName="None") ;build the ism to get the msi If not FileExists($sOutputIsm) Then Logging("File Not Found:$sOutputIsm$",4) MsgBox($MB_OK + $MB_ICONERROR, "Error", "Could not find file ""$sOutputIsm$"".") Return EndIf Logging("Started Building$sOutputIsm$",4) ShowTrayTip($AppName, "Started Building $sOutputIsm$", 10, $TIP_ICONASTERISK) Dim$sBuildExe,$sBuildCommand,$Ret $sBuildExe = FindFileInPath("ISCmdBld.exe", "%ProgramFiles(x86)%\InstallShield")$sBuildCommand = """$sBuildExe$"" -p ""$sOutputIsm$"" -r ""$ReleaseName$"" -s" ;MsgBox(0,"",$sBuildCommand)$Ret = RunWait($sBuildCommand) If$Ret <> 0 Then ShowTrayTip($AppName,"ISM Build Failed, Please build the ISM Manually.",10,$TIP_ICONHAND) MsgBox($MB_OK +$MB_ICONERROR, "Error", "Could not build ""$sOutputIsm$"". Please build manually.") Logging("Error $Ret$ while Building $sOutputIsm$",4) Return;Exit(1) Else ShowTrayTip($AppName,"ISM Build Completed",10,$TIP_ICONASTERISK) Logging("Completed Building $sOutputIsm$",4) if not StringCompare($NewName, "None")=0 then MoveEXE($sFilePath,$NewName) EndIf EndFunc The problem is when we run the ISCmdBuild.exe the RunWait will give whether fail or success but not what are the errors we got. If we use Run, it will give that logging but we don't have the feature of getting fail/success as RunWait. If we run the above code by removing -s and using redirection operator > to a file, it is running manually but failing with autoit. Like$sBuildCommand = """$sBuildExe$"" -p ""$sOutputIsm$"" -r ""$ReleaseName$"" > c:\logs\uday.log" Any help on this??

And also, in some machines the installshield shortcut is launching fine as licensed version but with ISCmdBld.exe it is giving error as licensing info missing or not registered.

Any suggestion on this too??
• By Eggsplorer
Hi,
I want to install chocolatey (https://chocolatey.org/) with AutoIt.
I just need to send the following command to cmd:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin This is what I tried: RunWait(@ComSpec & " /C " "@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin", ""); It didn't work propably because of the quotes.
So I tried this:
$code1 = "@powershell -NoProfile -ExecutionPolicy unrestricted -Command"$code2 = " (iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1"$code3 = " && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" RunWait(@ComSpec & " /C " & $code1 &$code2 & \$code3, ""); Didn't work either.
Any help?