download http://EDCTEM:52311/Uploads/ServerInfo/Server.csv
delete {file “Server.csv” of folder “ServerInfo” of parent folder of regapp “besclient.exe”}
move “_Download\Server.csv” {folder “ServerInfo” of partent folder of regapp "besclient.exe}
I’m not certain of this, but you might need to add the URL to the download white list.
http://support.bigfix.com/fixlet/documents/WinActions_81_110817.pdf
Like this:
http://DNSNAME_OF_ROOT_SERVER:52311/Uploads/*
Any request to download from a URL (that isn’t explicitly authorized by use of a literal URL in the action script) must meet one of the criteria specified in a white-list of URLs on the Tivoli Endpoint Manager Server, located at (BES Server Install Path)\Mirror Server\Config\DownloadWhitelist.txt. This file contains a newline-separated list of regular expressions using a Perl regex format, such as the following:
http://.*\.sitename\.com/.*
http://software\.sitename\.com/.*
http://download\.sitename\.com/patches/JustThisOneFile\.qfx
Tried both solutions, still getting the 403 error. Even tried pulling it off of a different web server and still get the 403. Might have to open a PMR and see what they say.
Maybe try HTTPS instead of HTTP?
Does your web server require authentication? If so, you will either need to serve the content with anonymous access (not recommended), or pass credentials. One way to pass credentials is via runascurrentuser. That assumes that the logged on user (or group containing the user) is permitted access to the web server.
I had to actually put in a PMR and there was a fixlet I needed to run, a command using the BESAdmin tool and a registry hack, but I got that working now and can download the file to the _Download folder.
What I can’t seem to get to work is moving the file out of the folder to another folder either inside of the BESClient folder structure or even to C:\Temp.
I get the following errors
Retry error, attempt 8 failed for MoveFile (C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite_Download\Server.csv, C:\TEMP)
Command failed (Move of ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite_Download\Server.csv’ to ‘C:\TEMP’ failed (2 - File error “class FileNotFoundError” on “C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite_Download\Server.csv”: Windows Error 0x2: The system cannot find the file specified.)) move “_Download\Server.csv” “C:\TEMP” (action:28890)
Retry error, attempt 8 failed for MoveFile (C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite_Download\Server.csv, C:\TEMP\Server.csv)
Command failed (Move of ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite_Download\Server.csv’ to ‘C:\TEMP\Server.csv’ failed (2 - File error “class FileNotFoundError” on “C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite_Download\Server.csv”: Windows Error 0x2: The system cannot find the file specified.)) move “_Download\Server.csv” “C:\TEMP\Server.csv” (action:28891)
Here is the command I am using.
move “_Download\Server.csv” “C:\TEMP\Server.csv”
I get this overwhelming feeling I am missing something very simple, but I just can’t see it. Any thoughts?
Try double-underscore Download. move “__Download\Server.csv” “C:\TEMP\Server.csv”
Command failed (Move of ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite__Download\Server.csv’ to ‘C:\TEMP\Server.csv’ failed (3 - File error “class FileMoveError” on “C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite__Download\Server.csv” and “C:\TEMP\Server.csv”: Windows Error 0x3: The system cannot find the path specified.)) move “__Download\Server.csv” “C:\TEMP\Server.csv” (action:28892)
Double-underscores are consistent within the agent context. __BESdata or __Download etc
__Download = C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite__Download (or wherever your client is install)
Also, either delete your target before an Actionscript move or copy. Make sure your target directory exists as well.
looks like you are missing a \
maybe this: ?
move "\__Download\Server.csv" "C:\TEMP\Server.csv"
Or perhaps C:\TEMP does not already exist?
Why are you moving the file to C:\TEMP out of curiosity?
I usually leave things in the download folder so that the BES Client deletes them automatically after a while, OR in the cases of small text info I want to stick around long term, I put that in the BES Client Log folder with a prefix, like info_Servers.csv or results_HitmanProScan.txt or info_CPUZ.xml or install_AdobeLog.txt
I needed to move it out of the folder so the rest of the script would read the file and do the actions required. I finally got it all working. Here is the code I am using
delete “{pathname of storage folder of client}\Serverinfo\Server.csv”
if {not exists folder (pathname of storage folder of client & “\ServerInfo”)}
folder create "{pathname of storage folder of client}\Serverinfo\Server.csv"
endif
download http://EDCTEM:52311/Uploads/ServerInfo/Server.csv
move __Download\Server.csv “{pathname of storage folder of client & “\Serverinfo\Server.csv”}”
You don’t need to move the file out of the downloads folder for the rest of the script to use the file. You only need to move the file out of the downloads folder if you want the file to remain on the system on an ongoing basis.
In my case I leave things in the downloads folder so that when the next action runs it gets deleted automatically.
If I am placing something that must stay on the system afterwards, and it is a small text file, then I typically place it in the BES Client logs folder like I explained above.