Watch MIT Professor, Erik Demaine, a former child prodigy who completed his Ph.D. at the age of 20, break down the concept of dynamic programming.

So, I read somewhere, using WMIC, I can ‘…name=”product” and version=”0.0.0.0″ call uninstall’ to remove the proper product version. This syntax produced an error for me. So, after reviewing a list of installed product versions and seeing that the likelihood of a match wasn’t likely at all, I decided to just use the version number. It turns out, it works just fine.

WMIC Uninstall Version

WMIC Uninstall Version

Real Online Resources

If your day-to-day is anything like mine, you’re not working on the things you love all day. You may want to check out the site above (it’s a hyperlink by the way, Google NOT REQUIRED) during your lunch break or whenever you have downtime at the office. Of course, you could use the site at home, but hopefully you have or will take a leap of faith and start installing the products you’re interested in onto your personal hardware.

Signed
NO EXCUSES

def minilang(str)
  stack = []
  register = 0
  str.split.each do |item|
    if item.to_i != 0
      register = item.to_i
    end
    case item
    when "PUSH"
      stack << register
    when "ADD"
      register = register + stack.last
      stack.pop
    when "SUB"
      register = register - (stack.last)
      stack.pop
    when "MULT"
      register = register * stack.last
      stack.pop
    when "DIV"
      register = register / stack.last
      stack.pop
    when "MOD"
      register = register % stack.last
      stack.pop
    when "POP"
      register = stack.last
      stack.pop
    when "PRINT"
      puts register
    end
  end
  nil
end

So, I didn’t expect an USB external hard drive to appear as a local disk but there it was “E:\ Local Disk”. I wrote a script a few months ago thinking I covered all my bases. However, I wrote it expecting all external drives to appear as a Removable Disk. Note the additional line of my batch file identifies disk using a USB interface. Problem solved!

@echo off
:main
echo "Please enter a valid hostname or type exit to quit"
set /p host="Enter Hostname: "
if %host% == exit goto escape
wmic /node:"%host%" diskdrive where interfacetype='USB' list brief
wmic /node:"%host%" logicaldisk get description, name
pause
goto main
:escape
exit

You can easily find the talk I’m referencing in the title. I’ll leave the link at the end of the post. I stumbled onto the talk while watching the latest Ruby conferences. Discussing the issue of concurrency, Ruby’s lack of it, how this could affect the performance of your stack, the shortcomings prospective clients are looking to avoid, and then how “adding” these other languages into your stack can solve these problems, would seem to be a more constructive approach. However, that’s not the impression I got. You can make your own opinion.

Our security admins stopped allowing programs to launch outside of the Program Files folder so I was forced to find a solution.

Here’s what I came up with. I hope you find it useful.

@echo off
REM Copy Batch to Computer Needing Software
REM Run Batch as Administrator

REM Copy files, don't display names and overwrite if file already exist at destination
XCOPY "\\server_name\share_folder\software_folder" C:\ /q /y

REM Install Path for 64-BIT OS without display
IF %processor_architecture% == AMD64 (
start /wait msiexec /i "C:\file_name" TARGETDIR="C:\Program Files (x86)" /qn
start /wait msiexec /i "C:\file_name" TARGETDIR="C:\Program Files (x86)" /qn
)

REM Install Path for 32-BIT OS without display
IF %processor_architecture% == x86 (
start /wait msiexec /i "C:\file_name" TARGETDIR="C:\Program Files" /qn
start /wait msiexec /i "C:\file_name" TARGETDIR="C:\Program Files" /qn
)

external drive attached == yes || no? Simple enough you might say but I hadn’t tried it before. Growing with confidence from practicing Perl, Python and Ruby in my spare time, I decided I should be able to use WMI, my go to tool when administrating Windows systems.

Here’s what I came up with…

@echo off
:main
echo "Please enter a valid hostname or type exit to quit"
set /p host="Enter Hostname: "
if %host% == exit goto escape
wmic /node:"%host%" logicaldisk get description, name
pause
goto main
:escape
exit