/build/static/layout/Breadcrumb_cap_w.png

Join domain vb scripts fail

Hello guys,
After an upgrade of our K2000 about 6 months ago we noticed that our customized "join domain and OU.vbs" post-deployment task didn't work anymore. Now I've finally got my head above water to troubleshoot this but it's seems to go much deeper than just our vbs-script failing. As I tried the kace-bundled example: join domain and so on, I couldn't get any of them to work properly. I'm using domain admin account and now the most simple of the scripts, the "join domain.vbs", and it keeps throwing me a "The system cannot find the file specified".

I use parameter "join_domain.vbs our.domain administrator password

The second thing I've noticed is that these pre-upgrade was defined as "windows script" tasks. Now all of a sudden, they are changed to "application" type. Can anyone help me getting these native vb-scripts to work again?


0 Comments   [ + ] Show comments

Answers (2)

Posted by: anonymous_9363 9 years ago
Red Belt
1
I know *nothing* about KBox scripting but, from what you've told us, my guess is that you need to tell the task to run the command '%SystemRoot%\SYSTEM32\CSCRIPT.EXE' and pass the script name and its arguments as parameters to that command.

Comments:
  • Yes VBScab you are right. If you look at the example the parameters are listed and the script will run with cscript in front. You do not need the %SystemRoot% Environment Variable anymore.

    cscript join_domain.vbs <my domain> <admin user> <admin password> <primary dns IP (optional)> - aragorn.2003 9 years ago
    • Well, I did run this now as an application with the "cscript join_domain.vbs <my domain> <admin user> <admin password>", the green check appears and the deployment continues but the client still didn't join the domain. Any suggestions? - szo850 9 years ago
      • We´ve extend our script to write a logfile and a event, and we have to change the FJoinOptions of the JoinDomainOrWorkGroup to use JOIN_DOMAIN+ACCT_CREATE+ACCT_DELETE instead of JOIN_DOMAIN+ACCT_CREATE.

        Do you know the ReturnValue?

        0 = "Succeeded", 5 = "Access is denied", 87 = "The parameter is incorrect", 110 = "The system cannot open the specified object", 1323 = "Unable to update the password", 1326 = "Logon failure: unknown username or bad password", 1355 = "The specified domain either does not exist or could not be contacted", 2224 = "The account already exists", 2691 = "The machine is already joined to the domain", 2692 = "The machine is not currently joined to a domain" - aragorn.2003 9 years ago
Posted by: cserrins 9 years ago
Red Belt
1
This was caused by upgrading to 3.6, which includes a new task engine, so things run a little differently.  To help you with that transition, there is a section in the K2 Advisor that looks for tasks that won't work with 3.6 or higher and makes suggestions.  It is also extremely useful as a K2 health check.
The join domain script should be an application task.  3.6 is the first version that introduced the task type "Windows Scripts"  Windows scripts accept .vbs, .wsh and java script files.  However, through version 3.7SP1 this type of task does not accept parameters (which is why the join domain script is not a windows script task.

Corey
Lead T3 Enterprise Solutions Consultant, K2000

Comments:
  • Ah, that's why my parameters are gone as soon as I hit save.... I can't download the K2 Advisor without a Dell Software login, my kace support login work either. The best sollution would be if I could just delete these tasks and import the original tasks again somehow and start from scratch.

    Worth mentioning is that our customized script that stopped working after the upgrade was being run without any parameters as a windows script. - szo850 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ