Running Kunkbot in post connection script for VPN

We have been having a problem with Inventory being run on many of our machines. Since everyone is mostly remote we are using SonicWall NetExtender as our VPN. This allows up to run post connection login scripts, so I decided to make a simple batch file that runs runkbot and then gpupdate to force my updated information.

After testing the script and confirming it works I rolled out. The machines are checking in and being updated in KACE.

However a lot of errors are being generated and I'm wondering if I should be worried or if I can just ignore.

I've attached the results, (from onsite machine) please let me know if you notice anything.




[2022-04-04.11:25:07][runkbot:main                    ] runkbot    ----- Starting runkbot.exe-----
[2022-04-04.11:25:07][runkbot:DumpState               ] Dump State:   kbotid=4 kbotId Version=0 -noLogUpload=0 -event= -launchType=KLT_SYSTEM credentials=
[2022-04-04.11:25:07][runkbot:KBotScriptLog::Initializ] KBotScriptLog::Initialize - Logging to [C:\Users\David Kafrissen\AppData\Local\Temp\dkl2A32.tmp]
kbot[4:0] @ 2022-04-04T11:25:07 (debug) Running kbot: runkbot 4 0
[2022-04-04.11:25:07][runkbot:KLaunchUtils::GetUserNam] GetUserNameFromSession: WTSQuerySessionInformation returned UserName=David Kafrissen
[2022-04-04.11:25:07][runkbot:KLaunchUtils::GetIdOfAct] GetIdOfActiveUser: SECURITY_LOGON_TYPE: 2(183) Cannot create a file when that file already exists.

[2022-04-04.11:25:07][runkbot:KLaunchUtils::IsSessionA] IsSessionActive: connectState=0
[2022-04-04.11:25:07][runkbot:KLaunchUtils::GetUserNam] GetUserNameFromSession: WTSQuerySessionInformation returned UserName=David Kafrissen
[2022-04-04.11:25:07][runkbot:KLaunchUtils::GetDomainF] GetDomainFromSession: WTSQuerySessionInformation returned Domain=XXXXXXXXXX
[2022-04-04.11:25:07][runkbot:KLaunchUtils::GetCurrent] GetCurrentInteractiveUser: user="David Kafrissen", domain="XXXXXXXXX"
kbot[4:0] @ 2022-04-04T11:25:07 (output) Running as SYSTEM
[2022-04-04.11:25:07][runkbot:KWeb::DownloadUsingCurl ] DownloadFile: unable to create destination file: C:\ProgramData\Quest\KACE\kbots_cache\4-0.xml.part Error: Permission denied
[2022-04-04.11:25:07][runkbot:KBotScriptManager::Fetch] KBotScriptManager::FetchAndWriteToCache - Kbot[4-0] Download failed, error code = 99
[2022-04-04.11:25:07][runkbot:KBotScript::Load        ] KBotScript::Load - No kbot script wast found at: C:\ProgramData\Quest\KACE\kbots_cache\4-0.xml
[2022-04-04.11:25:07][runkbot:KBotScriptManager::GetSc] KBotScriptManager::GetScriptVersion - Document not parsed successfully
[2022-04-04.11:25:07][runkbot:KBotScriptManager::Fetch] KBotScriptManager::FetchAndWriteToCache - Failed to get version in kbot xml
[2022-04-04.11:25:07][runkbot:KBotScriptManager::GetSc] KBotScriptManager::GetScript - Failed to get kbot script [4-0]
kbot[4:0] @ 2022-04-04T11:25:07 (status) START
kbot[4:0] @ 2022-04-04T11:25:07 (activity) Kbot not available locally, can't execute at this time
kbot[4:0] @ 2022-04-04T11:25:07 (status) FINISH (In state 'verification_failed')
[2022-04-04.11:25:07][runkbot:KBotScriptLog::Upload   ] KBotScriptLog::Upload - Uploading Log file [C:\Users\David Kafrissen\AppData\Local\Temp\dkl2A32.tmp]
[2022-04-04.11:25:07][runkbot:KBotScriptLog::GetUpload] KBotScriptLog::GetUploadURL - temp file is C:\Users\David Kafrissen\AppData\Local\Temp\dkl2A62.tmp
[2022-04-04.11:25:07][runkbot:KWeb::DownloadUsingCurl ] DownloadFile: download with no speed limit
[2022-04-04.11:25:07][runkbot:KWeb::DownloadUsingCurl ] DOWNLOADFILE: CURL DEBUG INFO --->>> START <<<---
[2022-04-04.11:25:07][runkbot:KWeb::DownloadUsingCurl ] DOWNLOADFILE: CURL DEBUG INFO --->>> END <<<---
[2022-04-04.11:25:07][runkbot:KWeb::DownloadUsingCurl ] DownloadFile: Downloaded C:\Users\David Kafrissen\AppData\Local\Temp\dkl2A62.tmp from Download speed: 3041.000000 bytes/second
[2022-04-04.11:25:07][runkbot:KBotScriptLog::Upload   ] KBotScriptLog::Upload - Uploading kbot log to
[2022-04-04.11:25:07][runkbot:KWeb::UploadUsingCurl   ] UploadFile:  uploading file C:\Users\David Kafrissen\AppData\Local\Temp\dkl2A32.tmp to
[2022-04-04.11:25:07][runkbot:KWeb::UploadUsingCurl   ] UPLOADFILE: CURL DEBUG INFO --->>> START <<<---
[2022-04-04.11:25:07][runkbot:KWeb::UploadUsingCurl   ] UPLOADFILE: CURL DEBUG INFO --->>> END <<<---
[2022-04-04.11:25:07][runkbot:KWeb::UploadUsingCurl   ] UploadFile: Uploaded to Upload speed: 5409.000000 bytes/second
[2022-04-04.11:25:07][runkbot:KBotScriptLog::Cleanup  ] KBotScriptLog::Cleanup - Cleaning up log file [C:\Users\David Kafrissen\AppData\Local\Temp\dkl2A32.tmp]

[2022-04-04.11:25:07][runkbot:main                    ] runkbot    ----- Exiting runkbot.exe -----

0 Comments   [ + ] Show comments

Answers (3)

Posted by: IgorAngelini 1 month ago
Second Degree Blue Belt

It looks like the script is not running runkbot as admin.

Try running it with elevated privileges and see if it helps.

Posted by: dkafrissen 1 month ago
White Belt

HI Igor

I thought that too, but it says running as system. kbot[4:0] @ 2022-04-04T11:25:07 (output) Running as SYSTEM

Any other ideas?

  • Thing is, I also get this line when running as a normal user

    [2022-04-04.21:36:00][runkbot:KLaunchUtils::GetCurrent] GetCurrentInteractiveUser: user="user123", domain="domain"
    kbot[4:0] @ 2022-04-04T21:36:00 (output) Running as SYSTEM

    Try on your machine. - IgorAngelini 1 month ago
Posted by: dkafrissen 1 month ago
White Belt

That's why I thought it may be just normal message an I never bothered to look before.


Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


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