How do i make this work ?

Antworten
Radek
Beiträge: 6
Registriert: 28 Nov 2016, 17:05

How do i make this work ?

Beitrag von Radek »

Hi, i am having problems with this. Can you please help me ?

DefVar $passwd$
DefVar $user$

Set $passwd$ = GetProductProperty ("password","test")
Set $user$ = administrator
[Actions]

DosBatch_1 $user$ $passwd$

[DosBatch_1]
net user %1 %2


I am new to opsi i am thankful for any help :) thanks
andré
Beiträge: 324
Registriert: 07 Jan 2014, 10:48

Re: How do i make this work ?

Beitrag von andré »

Try it this way:

Code: Alles auswählen

[Actions]
DefVar $passwd$
DefVar $user$

Set $passwd$ = GetProductProperty("password","test")
Set $user$ = administrator

DosBatch_1

[DosBatch_1]
net user  $user$ $passwd$
edit: removed space between GetProductProperty and bracket
Radek
Beiträge: 6
Registriert: 28 Nov 2016, 17:05

Re: How do i make this work ?

Beitrag von Radek »

andré hat geschrieben:Try it this way:

Code: Alles auswählen

[Actions]
DefVar $passwd$
DefVar $user$

Set $passwd$ = GetProductProperty("password","test")
Set $user$ = administrator

DosBatch_1

[DosBatch_1]
net user  $user$ $passwd$
edit: removed space between GetProductProperty and bracket

I have already tried this. But thanks for an advice.
Radek
Beiträge: 6
Registriert: 28 Nov 2016, 17:05

Re: How do i make this work ?

Beitrag von Radek »

Okay now it does look like i am stupied, but i have really tried it exectly the same way and it didnt worked.... Now it does work. Thanks man.
Benutzeravatar
ueluekmen
uib-Team
Beiträge: 1939
Registriert: 28 Mai 2008, 10:53

Re: How do i make this work ?

Beitrag von ueluekmen »

I think, that the line:

Code: Alles auswählen

Set $user$ = administrator
should be:

Code: Alles auswählen

Set $user$ = "administrator"
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.
http://www.uib.de
Antworten