Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Serving static files on a a relative path

Viktor June 21, 2019

Im looking for a way for agent's to start a Remote Control on Windows machines.

 

It can be started, for instance, with this run command

C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386\CmRcViewer.exe HOSTNAME1337

 

I figured it would be wise to create batch file for each machine, that would be downloaded as an attachment and the file would start this program with the computer hostname.

 

The contents of the batch file is very simple:

c: & cd "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\i386\" & CmRcViewer.exe HOSTNAME1337

 

However, this has to be running on the Jira server, since attachments need to have a relative patch so they will be downloaded, else Chrome will simply display the contents of the batch file as text.

 

So, if I were able to serve static files, I could create a URL with the download attribute, so the batch file would be downloaded, and not displayed as text in the browser.

<a href="/relative_path/HOSTNAME1337.bat" download="" target="_blank">Download batch</a>

 

Does anybody have a suggestion on how this can be achieved? I saw one post on the forum regarding this, suggesting using an open project and simply uploading through the UI, but I'm talking about being able to serve maybe thousands of different batch files.

I created a python script to generate the batch files, but I need a way to serve them using a relative path on the same machine.

 

Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events