Scripting Question

K1000 Scripting: "The directory name is invalid."

05/11/2016 3151 views
When attempting to run an uploaded executable via script in the K1000, the KBox throws an error.

I'm attempting to launch an executable just to gain familiarity with the process.  However, this setup (which should only upload a single self-contained executable, then run it) fails with the error "Creating process returned non-zero:  C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\124\WinSCP.exe : (267) The directory name is invalid."

I have confirmed, however, that the C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\124\ does exist and that it was created by this script.  Attempting to run it later (after the folder has already been created) makes no difference.  Creating a new script with the same settings results in a new folder being created (C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\125\), but the same error.  Manually copying the executable (WinSCP.exe) to that folder on the target machine and running it also results in the same error.

Any ideas?
0 Comments   [ + ] Show comments


Community Chosen Answer

zip the file and add the zip file as the dependency
Answered 05/11/2016 by: SMal.tmcc
Red Belt

  • I'm having the same issue as the OP. I also had just uploaded a single EXE file and I have also tried zipping the file as suggested and it hasn't helped. I'm still getting the error "(267) The directory name is invalid."

    I can confirm the file is being unzipped correctly and the directory does exist as does the executable in the directory.

    What else do you suggest I try?

    EDIT: Finally got it working. I also tried including a batch file in zip that executes the EXE. That didn't help.
    What did work was using the "run a batch file" option in the script which executed the exact same batch command that I put in the batch file I created myself, ("%~dp0webcomponents.exe" in case you were curious) and it worked. Doesn't make a lot of sense but neither does getting K1000 scripts to work a lot of the time. >_<
    • I just wanted to say thank you for your edit. Changing from "launching a program" and NOT using the batch file in my zip file to "run a batch file" and including the contents of the batch file in there has worked.

All Answers

FYI - we actually discovered, after some further troubleshooting, that DFS had not replicated the file to the local repository due to errors we were encountering with DFS.  Once that was resolved, the script ran as expected.
Answered 05/11/2016 by: george.mattson@plansource.com
Yellow Belt

  • cool I have run into MSI's not running unless I zipped them
George, I think it's probably sub-optimal to choose a user ID which contains your email address in a public forum.
Answered 05/13/2016 by: VBScab
Red Belt

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