/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


File won't upload to K1000

09/06/2017 992 views

Can someone tell me why this is not uploading to the K1000? I am running this online kscript to grab a gpresult report and upload it to the K1000. I don't want to use gpresult /r because the HTML report has much more information. I am running the script as the logged on user. I can see the html report gets created locally at the specified location, but it won't upload.


Output Log

Running as active user: RAD\*********
Launched Process: %windir%\system32\gpresult.exe

Activity Log

verify - on_verify_success
verify - on_verify_failure
verify - launch_program
Launching program: '%userprofile%\%windir%\system32\gpresult.exe' ' /H %userprofile%\gp_report.html /f' wait='true'
verify - upload_file
Uploading file: %userprofile%gp_report.html

Debug Log

Running kbot: runkbot 115 1504733059
KBotScript::LogScriptInfo - Start
id=115 name=*** RUN - Group Policy Report version=1504733059 type=policy
execute disconnected=false logged_off=false
execute events
KBotScript::LogScriptInfo - Finish
KBotScript::LogScriptInfo - Start
id=115 name=*** RUN - Group Policy Report version=1504733059 type=policy
execute disconnected=false logged_off=false
execute events
KBotScript::LogScriptInfo - Finish
runkbot    ----- launching [path='%userprofile%' program='%windir%\system32\gpresult.exe' parms=' /H %userprofile%\gp_report.html /f' wait='true'] -----
runkbot    ----- completed [exitCode=0] -----
NetworkOps_UploadFile: Failed to upload file.
1 Comment   [ + ] Show comment

Comments

  • Do you need to specify the \ in the path for uploading the file?
    • Chuck, I did observe that in the log (the slash missing) but when you look at the script page on the web browser, the shown path contains the slash. So I added a slash to the command, and now in the script page it shows two slashes, but then the resulting log now shows one slash, but still it does not upload. Not sure if this is some kind of bug in Kace.

      Now, I did realize that is not even the problem. The problem seems to be that the Kace upload function does not like the %userprofile% variable because when I specified the explicit path to my profile, the file uploaded successfully. Now I am hunting down for a way to get the %userprofile% variable to work with the upload function.
      • You would probably be better off saving the file to a different location where every user has rights, perhaps c:\users\public\documents.

Be the first to answer this question

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:

Share

 
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