Jump to content

Recommended Posts

Posted

Need to return two variables from autoit script to batch file, but I found only how to return errorlevel with Exit($var). And errorlevel is only numeric :(, I have symbols in variables.

Is any method except Exit?

Posted

Did you try EnvSet() to pass values to external variables in the shell environment? You could also pass data through a small text file, or via the registry.

:(

EnvSet()works only for programs launched from script

Through registry or file, don want to save variables as plain text anywhere, login and password :)))))

Posted

I think you misread the initial message. :(

Not really :), but... I'm not that into batch file programming... and always assumed that console output can easily be redirected to a variable for further use... might be wrong there :)...
Posted (edited)

Changes to the shell environment of the calling batch file are lost when that shell closes. Tell me what you think is more secure about a return value than a local shell variable...?

:)

You want to know how to securely pass credentials to a batch file: Don't!

:)

Edit: The script inherits only a copy of the parent batch file's environment, so that was true but not helpful since the parent shell never sees the changes. Rats.

:(

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted (edited)

Burp. I guess there is.

Strike :) ... and... nice research, I love this sometimes really productive ping-pong game :( ... was watching "Edge of Darkness" in parallel :)... Edited by KaFu
Posted

When I try to write to console like this, in batch I get not real login and password, but names of variables,

ConsoleWrite('$login $passwd' & @CRLF)

In batch output

D:\!!!!!!\Steam\Test>echo.var1=$login

var1=$login

D:\!!!!!!\Steam\Test>echo.var2=$passwd

var2=$passwd

If I try like this ConsoleWrite($login & @CRLF)

In batch output

D:\!!!!!!\Steam\Test>echo.var1=$login

var1=username

D:\!!!!!!\Steam\Test>echo.var2=$passwd

var2=

But it works only for one variable :(

How to make It work for two variables?

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
×
×
  • Create New...