jgstew / tools

various scripts and tools
MIT License
23 stars 14 forks source link

create a Windows CMD option: install_bigfix.bat #3

Closed jgstew closed 8 years ago

jgstew commented 8 years ago

needs improvement: https://github.com/jgstew/tools/blob/master/bash/install_bigfix.sh Reference: http://stackoverflow.com/questions/17510688/single-script-to-run-in-both-windows-batch-and-linux-bash

This is completely crazy, but it might actually be possible to allow for install_bigfix.sh to run as a windows .bat file as well, without requiring BASH on windows through something like CygWin.

jgstew commented 8 years ago

Steps

  1. Download http://software.bigfix.com/download/bes/95/BigFix-BES-Client-9.5.1.9.exe
  2. Download http://$1:52311/masthead/masthead.afxm
  3. Create clientsettings.cfg
  4. Install Silently

Might be possible to add this as a single line or a few lines at the top of the file. Linebreaks will be an issue.

:<<"::CMDLITERAL"
@ECHO OFF
ECHO
ECHO I am %COMSPEC%
ECHO put CMD/BAT lines in here.
ECHO
PAUSE
EXIT
::CMDLITERAL
jgstew commented 8 years ago

For downloading on windows CMD: http://superuser.com/questions/59465/is-it-possible-to-download-using-the-windows-command-line

jgstew commented 8 years ago

how to use BITSADMIN priority to download files:

https://technet.microsoft.com/en-us/library/cc771868(v=ws.11).aspx

jgstew commented 8 years ago

bigfix client exe silent install switches: http://www-01.ibm.com/support/docview.wss?uid=swg21505981

jgstew commented 8 years ago

have bitsadmin ignore invalid SSL:

11110 is the bitset to make bitsadmin ignore all SSL errors (very permissive) 1000 is the bitset to make bitsadmin ignore only SSL signing errors

These bitsets should be applied as their decimal equivalent.

jgstew commented 8 years ago

WSF file type is interesting: https://en.wikipedia.org/wiki/Windows_Script_File

jgstew commented 8 years ago

VBS wrapped into BAT wrapped into BASH? seems like asking too much:

http://stackoverflow.com/questions/9074476/is-it-possible-to-embed-and-execute-vbscript-within-a-batch-file-without-using-a

Seems like it would make more sense to try to make the VBS file from within the BAT file, then run it.

jgstew commented 8 years ago

powershell might be the best option:

powershell -command "& { (New-Object Net.WebClient).DownloadFile('http://example.com/', 'c:\somefile') }"