Discussion:
[Unattended] appsonly.bat, autolog.pl, problems with blanks in username / password
Gerhard Hofmann
2011-02-15 15:00:43 UTC
Permalink
Hi all,

with appsonly.bat / appsonly.pl I have the problem that it won't pass
users and passwords containing blanks correctly to autolog.pl

Example:
user name: my admin
password: my pwd

Result:
autologin will not be set correctly, only "my" will be passed as user...

I have seen that autolog.pl is designed to work with blanks and a
autolog.pl --logon=1 --user="my admin" --password="my pwd"
in a DOS box will do what it should.

So I thought changing the line
system("%z%\\bin\\autolog.pl --logon=1 --user=$ENV{USERNAME}
--domain=$ENV{USERDOMAIN} --password=$autologinpwd");
to
system("%z%\\bin\\autolog.pl --logon=1 --user=\"$ENV{USERNAME}\"
--domain=$ENV{USERDOMAIN} --password=\"$autologinpwd\"");
in appsonly.pl should do the job but it won't.

I suppose my way of escaping the double quotes in system(...) is not correct.

Any ideas?

Best Regards
Gerhard

Loading...