#118011 - 2004-04-15 03:51 PM
Problem getting SHELL-command with quotes to work
|
Luziekix
Getting the hang of it
Registered: 2003-02-27
Posts: 68
|
Hi,
sorry, but I´m tired of my unsuccessful trying ....
Problem:
I´ve tried to used Windows 2003 command-line-tool DSADD.EXE to add an new user to the Active Directory (AD).
It works fine from a commandline or from a Batch-(-BAT)-File.
But including my commandline into KIX (I´m using v4.20 FINAL), I only get error-beeps all the time I´ve tried from the KIX32.EXE ....
I tried:
Code:
$cmd="%comspec% /E:1024 /c DSADD.EXE user "CN=James Robert,CN=Users,DC=domain,DC=int"" SHELL $cmd
But this won´t work, and also:
Code:
$cmd=´%comspec% /E:1024 /c DSADD.EXE user "CN=James Robert,CN=Users,DC=domain,DC=int"´ SHELL $cmd
won´t work.
It seems, tp be aan error with the single/double-quotes, but I can´t find out ...
Any help ?
Regards,
Luziekix
|
|
Top
|
|
|
|
#118014 - 2004-04-15 05:04 PM
Re: Problem getting SHELL-command with quotes to work
|
Luziekix
Getting the hang of it
Registered: 2003-02-27
Posts: 68
|
@AzzerShaw:
with your line:
Code:
shell "cmd %comspec% /E:1024 /c DSADD.EXE user "CN=James Robert,CN=Users,DC=domain,DC=int""
the DSADD.EXE-command waits there for input from the STDIN (=keyboard)
@Les:
I´ve tried:
Code:
shell ´cmd %comspec% /E:1024 /c DSADD.EXE user "CN=James Robert,CN=Users,DC=domain,DC=int"´
but this gives me the following error:
ERROR : unknown command [%comspec%]! Script: D:\Daten\TEST.KIX Line : 0
Luziekix
|
|
Top
|
|
|
|
#118016 - 2004-04-15 05:39 PM
Re: Problem getting SHELL-command with quotes to work
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
The "curlies" strike again...
Code:
shell '%comspec% /E:1024 /c DSADD.EXE user "CN=James Robert,CN=Users,DC=domain,DC=int"'
|
|
Top
|
|
|
|
#118020 - 2004-04-16 09:15 AM
Re: Problem getting SHELL-command with quotes to work
|
Luziekix
Getting the hang of it
Registered: 2003-02-27
Posts: 68
|
> ... caught by the short and curlies" ...
OK,
I found my "starter-error" ;-)
I´ve used the false ´ instead of right ' so this causes my "Eror in expression".
Regards,
Luziekix
|
|
Top
|
|
|
|
#118022 - 2004-06-16 06:14 PM
Re: Problem getting SHELL-command with quotes to work
|
Udaloy
Fresh Scripter
Registered: 2003-09-08
Posts: 31
Loc: Ohio
|
Ok, I'm having the same issue. I've read both faq's, and they don't seem to help. Here's my current version of code Code:
$cmd = '%COMSPEC% /c "\\<server>\<share>\cscript service.vbs /M automatic /N W32Time /S "'+$pc $x = Shell $cmd
I have tried it at least 10 different ways with no results.
|
|
Top
|
|
|
|
#118024 - 2004-06-16 07:23 PM
Re: Problem getting SHELL-command with quotes to work
|
Udaloy
Fresh Scripter
Registered: 2003-09-08
Posts: 31
Loc: Ohio
|
That was it...
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Henriques)
and 2516 anonymous users online.
|
|
|