/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Trouble trying to execute an .EXE using a script - Getting Error Code (267) The directory name is invalid

08/26/2020 256 views

Hey all - new to scripting on the K1000, but my fairly simple script is not functioning right.   I'm trying to run a Symantec Cloud Uninstall program called CEDAR which is just an executable with a -silent switch.  If I run this directly on the machine with just "Cedar.exe -silent", it works fine.  If I take the path in the log file that it can't find the directory to and paste it into a command prompt, the program runs without issue.  Not sure where I'm getting lost.


Here's the script along w/ the log file below:

2Q==


LOGS:

Log for Uninstall Symantec AV Cloud on <Removed> Show All ]

Started:08/26/2020 11:35:06
Finished:08/26/2020 11:35:06
Elapsed Time:0 seconds
Status:4

Output Log

Running as SYSTEM
Directory does exist: C:\Program Files\Symantec.cloud\EndpointProtectionAgent
Creating process returned non-zero:  C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\236\cedar.exe -silent : (267) The directory name is invalid.
Error Code: 267
Status Code: 0

Status Log

Uninstall of Symantec FAILED.

Activity Log

verify - directory_does_not_exist
Checking if directory does not exist: C:\Program Files\Symantec.cloud\EndpointProtectionAgent
verify - launch_program
Launching program: ' C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\236\cedar.exe -silent' '' wait='true'
verify - log_message

Debug Log

Running kbot: runkbot 236 1598459675
KBotScript::LogScriptInfo - Start
id=236 name=Uninstall Symantec AV Cloud version=1598455505 type=policy
execute disconnected=false logged_off=false
execute events
KBotScript::LogScriptInfo - Finish
KBotScript::LogScriptInfo - Start
id=236 name=Uninstall Symantec AV Cloud version=1598455505 type=policy
execute disconnected=false logged_off=false
execute events
KBotScript::LogScriptInfo - Finish
KBotScriptManager::CleanupDependencies - clean up dependencies in kbot directory C:\ProgramData\Quest\KACE\kbots_cache\\packages\kbots\236\
CleanupDependencies: file CEDAR.exe is part of the dependency list, keep the file
CleanupDependencies: file Remove_PendingFileRenameOperations.bat is part of the dependency list, keep the file
runkbot    ----- launching [path=' C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\236' program='cedar.exe -silent' parms='' wait='true'] -----
0 Comments   [ + ] Show comments

Comments


All Answers

0

Might I ask a question that could take this in a different direction?

If you look at Inventory -> Software and look up that software package, do you see it there? If so, click on it. You should see an uninstall string there. You could use that, in conjunction with MSIEXEC, and uninstall it. Below is what I use for Java.


1viHh3uXYtuAAAAAElFTkSuQmCC

Answered 08/26/2020 by: BHowell
Yellow Belt

  • Thansk BHowell for the response. Unfortunately, I'm at this point in using the CEDAR program rather than the uninstaller built-in for Symantec because of the issues I've had. The CEDAR program is going to give me a cleaner uninstall of over 550 installations so that I can install a different endpoint solution.
0

1a. When you manually run the Cedar.exe on the machine, like you indicated, where are you running it from? Desktop? Downloads? Somewhere else?

1b. Pending answer above, what happens if you run the Cedar.exe from the Kace Dependancy folder directly....exactly as you configured Kace to do?

2. This may, or may not, make a difference, but in the scripts that I have looking for something, I have it look (or not find) a particular file instead of a directly. Maybe that could make a difference?

3. The dependency that you have in there, "Remove_PendingFileRenameOperations.bat". Where does that play into this? I don't see anything in your script that would need that file unless it is called by the Cedar.exe file.

Answered 08/26/2020 by: BHowell
Yellow Belt

  • Thanks again for the reply BHowell.

    I'm manually running the file from a local c:\cedar path by manually copying it there. I've also taken the path in this part of the log (below) and ran it in a command prompt to make sure the path is accessible and valid. Both times, they run successfully and I see Cedar.exe start to process itself in task manager.

    Creating process returned non-zero: C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\236\cedar.exe -silent

    The Remove_PendingFileRenameOperations.bat was something that I was trying to run before the cedar.exe file, however since I was having issues with just running cedar.exe, I removed the logic to launch that program before cedar.exe. At this point, that bat file does nothing and isn't called by anything.

    I'm running Server version: 10.2.234 just as FYI.
0

Right now I am not seeing anything obvious. Will have to think on this. I am running the same server version.

Answered 08/26/2020 by: BHowell
Yellow Belt

0

Try to Change "Remediation" to "Run a batch file"

Name it anything you want...........

In the field type in your install switches........ 

In your case..........cedar.exe -silent

Don't change anything else.

Answered 08/27/2020 by: akmagnum
Red Belt

0

This might be related to the KACE client running in the 32bit context. I'm wondering if that is causing CEDAR to launch in the 32bit context and then it doesn't have access to the Symantec install (assuming Symantec is 64bit in this case). The error is what CEDAR is returning to KACE.

As a work around you could try:

  • Launch a program: c:\windows\sysnative
  • File: cmd.exe
  • Arguments: /c $(KACE_DEPENDENCY_DIR)\cedar.exe -silent

I'm not sure if the variable will work in the arguments path, but I think it should. If not, you could hard code the path.

Answered 08/27/2020 by: chucksteel
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