I've been struggling with this issue for some time now and it seems nobody on forums or google posted something like this, so I'll try to get some help here. I'm describing ec2 instances using vbs with multiple arguments and I'm using constant for NOT displaying command line window. Script works but instead of saving data into output file it saves it into a file that takes value of 'outFile' and adds some random numbers. Here is my command:
'objShell.Run "%COMSPEC% /c aws ec2 describe-instances --region " & region + " --filters " & Filters + " --profile " & ProfileName + " --query " & Query + " --output " & oFormat + ">>" & outFile & WindowStyleStealth, false _
so before that code my outFile = "cmdresult.txt" and script writes data into cmdresult.txt546234895 - and I can't figure it out how to move around ">>" so it will append to that file. If I take out WindowStyleStealth, false and just leave:
... outFile _
then it works great but I do want to use the ability to hide command line window, so any help is greatly appreciated with this. VBscripting is not my forte so that might be another reason I can't figure this out but hopefully someone else had similar problem.
Thank you!