Hardware – Dell model 7050 and legacy boot for PXE network boot

The process we have been using to boot Dells to the K2000 imaging server requires PXE boot in “Legacy” boot mode. The optiplexes we received in the summer of 2017 came with “Secure boot enabled” and UEFI boot set in the BIOS.  The following three BIOS settings had to be changed to get those models to boot PXE to the K2000 deployment server:

— Disable “Secure Boot” — (you may need to reboot to have this setting apply)

— Enable “Legacy ROM” —

— Select Legacy Boot not UEFI Boot —

Posted in Labs | Tagged | Comments Off on Hardware – Dell model 7050 and legacy boot for PXE network boot

Mac OS – High Sierra – Run installer from command

The High Sierra installer not only installs the new OS but it also changes the disk format form HFS to APFS on SSD drives.  Additionally, it does the required firmware updates for the model of mac that the installer is being run on. Therefore, it may be necessary/easiest to run this installer on each mac before applying a High Sierra image to the mac.  The command to do that is:

/Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --applicationpath /Applications/Install\ macOS\ High\ Sierra.app --agreetolicense --nointeraction

(obviously you have the “install macOS High Sierra.app” in the /Applications folder for this to work)

Posted in Labs | Tagged , | Comments Off on Mac OS – High Sierra – Run installer from command

Linux – Install Linux on external disk

Note one –  To install the correct boot loaders and hardware drivers,  I recommend doing the actual Linux install on the type of computer you plan to run Linux on. Meaning that, I think, the installer will put boot loaders specific for the hardware you are running the installer on in the boot drive of the newly created Linux external disk. For example, I created an Linux (Ubuntu) disk on a Dell precision tower but it could not boot a Dell Optiplex of the same era!

Note two – Always use USB3 ports (marked SS for “SuperSpeed”) for all connections!

Note three – In the following steps you will be using two different USB drives.  One to use as the Linux installer “media” (the thing to install from) and another to actually install Linux on. It is extremely helpful to use two different drives of different sizes and manufacturers. This will help tell them apart so that you can choose the correct disk when installing.  In this example, I used a 1 TB “Seagate” drive for the first “Linux Installer” disk and a 250 GB “Samsung” drive for the second disk to actually install and run Linux from.

First – Create a bootable DVD/CD/USB disk with the Linux installer on it. To do that download the Ubuntu ISO or the Linux Mint ISO to a computer and then burn that ISO to disk. (On a Mac you can use Etcher to burn the ISO to a USB drive.) This process does NOT install Linux.  It only creates the media from which you are going to install Linux in the next step.

Second – (No matter what computer you used above to create the Linux install disk, move to the type of computer you want to run Linux on before proceeding. This is tested on both a Dell Optiplex and a Dell Precision.  Mac hardware will require extra steps to fix the boot loader after install. ) With the SSD external disk you actually want to run Linux on attached to a second USB3 port, boot to the Linux installer ISO disk you created above. This will bring up the “Grub” boot menu.

Third – Choose “Install … “. Follow the prompts slowly and carefully.  Before running the actual install step, select “Something Else” first and set the option to install the boot loaders to the external disk you will actually be installing Linux onIf you don’t do this you could screw up the internal drive’s boot loaders causing that computer not to be able to boot! Then click on “Back” and select “Erase drive and install …” .  Then again be careful to select the external drive you want to actually install Linux onAn erased, internal drive will probably make your day a bit harder then you wanted it to be!

 

 

Finally – Boot to the new, fully installed, external SSD Linux disk.

Posted in Labs, Software | Tagged , , | Comments Off on Linux – Install Linux on external disk

Mac – Burning ISO to USB disk – use Etcher

A great little tool to burn ISOs to external USB disks:
Etcher

Use Disk Utility to format the external as Fat 32 (may have to format as Mac OS first).

If Etcher doesn’t see the drive at first, use the gear to turn on “Unsafe” mode which lists all attached disks. Then choose your disk with care. “Etching” the ISO to the disk REPLACES the contents of the disk with the ISO image!!!

Posted in Labs, Software | Tagged , | Comments Off on Mac – Burning ISO to USB disk – use Etcher

Windows 10 – Check for service status and restart if not running

from: https://stackoverflow.com/questions/3325081/how-to-check-if-a-service-is-running-via-batch-file-and-start-it-if-it-is-not-r

for /F “tokens=3 delims=: ” %%H in (‘sc query “MyServiceName” ^| findstr ” STATE”‘) do (
if /I “%%H” NEQ “RUNNING” (
REM Put your code you want to execute here
REM For example, the following line
net start “MyServiceName”
)

)

Posted in Labs | Tagged | Comments Off on Windows 10 – Check for service status and restart if not running

Stata – Creating an Installer

Creating an installer for the various versions of Stata:

On Windows:

  • 1) After installing and keying the correct version on a test PC, collect the keyed application and the “stata.lic” file (these are both different for each variant, IC, SE, MP)
  • 2) Place copies of those in the ./payload/wclicense/ folder in the installer directory
  • 3) Change the command in the “Install-RightClick-Run as Admin.bat” file to reflect the correct version.
 ./setupstata15.exe /qn /ADDLOCAL=Ado,Core,StataIC64
 or
 ./setupstata15.exe /qn /ADDLOCAL=Ado,Core,StataSE64

On MacOS:
Everything is contained within the Stata Folder in the applications folder.

  • 1) Install the correct version
  • 2) Key the app
  • 3) Package the Stata folder with “Packages”
  • 4) Zip the package and distribute
Posted in Software | Tagged , | Comments Off on Stata – Creating an Installer

JMP – Creating an Installer

Creating an installer to distribute JMP

On MacOS:

  • 1) Install application
  • 2) License application (creates “jmp.per file” in /Users/labadmin/Library/Application Support/JMP/ )
  • 2) Key application
  • 3) Package keyed application and the /Library/Application Support/JMP/ folder
  • 4) Create a folder that contains:
    • Packaged installer
    • jmp.per file from user’s space above
    • Readme file to install (see previous year)
  • 5) Create a compressed disk image from that folder using disk utility (results in a .dmg file)
  • 6) Compress the .dmg file
  • 7) Post the zipped .dmg file

On Windows:
The “jmp.per” file can be included in the same folder as the “setup.exe” file.

Posted in Software | Tagged , | Comments Off on JMP – Creating an Installer

Windows 10 – Get Windows Update Log

Apparently windows 10 changed the windows 10 log format and you now need to run a power shell command to generate the log file as a text file that normal humans can read.

Open Powershell with “Run as Administrator”
give the command:

Get-WindowsUpdateLog

Then wait until all the log files have been found and parsed and you get the PowerShell command prompt back. Below is an example.

If you find that your windows update log goes back to the beginning of time and the resulting text log file is too large to read, you can temporarily move older log files from C:\Windows\Logs\WindowsUpdate

More details see: https://support.microsoft.com/en-us/help/3036646/how-to-read-windows-update-logs-in-windows-10-version-1607

PS C:\Windows\system32> Get-WindowsUpdateLog

Converting C:\Windows\logs\WindowsUpdate into C:\Users\labadmin\Desktop\WindowsUpdate.log …

Input
—————-
File(s):
C:\Windows\logs\WindowsUpdate\WindowsUpdate.20171011.120412.263.1.etl

0.00%100.00%

Output
—————-
DumpFile: C:\Users\labadmin\AppData\Local\Temp\WindowsUpdateLog\wuetl.CSV.tmp.00000

The command completed successfully.

WindowsUpdate.log written to C:\Users\labadmin\Desktop\WindowsUpdate.log

PS C:\Windows\system32>

Posted in Labs, Software | Tagged | Comments Off on Windows 10 – Get Windows Update Log

Windows 10 – System-wide File Type Associations

List current filetype associations with these two different commands:

ftype
or
assoc

Change or create new ones:

Open an elevated command prompt.

  • Use FTYPE {fileType}={commandString} to create a file type and associated command to open the file.
  • Use ASSOC {.fileExtension}={fileType} to associate a file extension with the file type you created.

Example:

FTYPE MyCustomType=C:\Program Files\MyCustomProgram\MyProg.exe “%1”
ASSOC .custom=MyCustomType

These commands can be issued from the KACE server. See the SPSS example there.

Posted in Labs | Tagged | Comments Off on Windows 10 – System-wide File Type Associations