Windows Tech Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 31 August 2011

My Favorite Tweeters

Posted on 19:57 by Unknown

No, I'm not talking about stereo speakers.  I'm talking about my top list of most interesting or funniest Twitter folks:

Funny

  • DoucheF**k (Jason Alan)
  • AfroGirl23
  • BorowitzReport (Andy Borowitz)
  • MommyWantsVodka (Aunt Becky)
  • TSAGov
  • WillBrimley (fake Wilford Brimley)
  • NotGaryBusey (fake Gary Busey)

Educational

  • Freakonomics
  • RodTrent (Rod Trent)
  • JArwidmark (Johan Arwidmark)
  • KaraSwisher (Kara Swisher)
  • MrCADman (Shaan Hurley)
  • JeffHicks (Jeff Hicks)
  • Om (Om Malik)
  • MaryJoFoley (Mary Jo Foley)
  • TechCrunch
  • BeersOfTheNight (Lance Martin)

I would have posted a longer list, but a lot of the folks I follow have locked accounts so you wouldn't be able to read their stuff anyway.  If I follow you and left your name off please don't hate me.  Well, go ahead and hate me, but that's a longer list so you'll be standing in a longer line.

Read More
Posted in entertainment, social stuff, twitter | No comments

Patching AutoCAD Civil 3D 2011 and 2012

Posted on 16:33 by Unknown

imageMost Autodesk patches are published as .exe files.  Many (most) of them contain embedded .msp "patch" files for the base MSI installation.  Occassionally, the accompanying "readme" documentation will describe how to properly (successfully) extract the .msp file.  Other times it does not. 

Fear not.

 

 

Download the update .exe file to your hard drive

  1. Open a CMD console and CD to the folder where the .exe file resides
  2. Extract the .msp using the following syntax:
    UpdateFileName.exe /e UpdateFileName.msp
  3. Then apply the patch using the following msiexec syntax:
    msiexec /p UpdateFileName.msp /quiet /norestart

And if you want to wrap update 1 and update 2 into a single operation, you can easily do that with a few lines of script code within a single script file.  The example below is only that: an example.  You should probably embellish it before using it.  For this example I named the extracted .msp patch files "c3d2011_win32_update1.msp" and "c3d2011_win32_update2.msp", if you have different names, then just modify the commands as needed.

I recommend grabbing a copy of my standard .bat/.cmd template (here), to help you get started.  If you already have your own, that's fine and you can just modify the example below to suit your needs.  This little snippet below doesn't use that template I posted, it's just a little snotty-nozed punk hanging around the alley and needs its ass kicked real bad.  Enjoy!

@echo off
setlocal
set LOG=%tmp%\Civil3d2011_update2.log
echo searching for civil 3d 2011 installation... >>%LOG%
if exist "%programfiles%\Autodesk\AutoCAD Civil 3D 2011\acad.exe" (
    echo installing update 1... >>%LOG%
    msiexec /p "%~dp0c3d2011_win32_update1.msp" /quiet /norestart
    echo exit code is %errorlevel% >>%log%
    echo installing update 2... >>%LOG%
    msiexec /p "%~dp0c3d2011_win32_update2.msp" /quiet /norestart
    echo exit code is %errorlevel% >>%LOG%
) else (
    echo installation not found >>%LOG%
)
endlocal
exit %errorlevel%

Read More
Posted in autocad, autodesk, network administration, packaging, scripting, software deployment, software packaging, updates | No comments

A Small Favor to Ask

Posted on 05:27 by Unknown
Now that Autodesk University 2011 early registration has begun (http://au.autodesk.com), I'd like to ask anyone who is planning to attend any courses this year, which are related to deployment or license management, a small favor:

I'm sticking my neck out a bit, but I really want to know if the content in my books holds up under comparison and scrutiny with material presented at AU. I'd like to ask if you would please post feedback on the Amazon site for whichever ebook I've published and give your honest opinion. Sales have been pretty good, but I haven't received much direct or indirect feedback on any of them.

I really want to know what you think and what I could improve upon. I don't want to just sell a book. I want to sell a usefull book.

Thank you!
Sent from my Verizon Wireless BlackBerry

Read More
Posted in | No comments

Tuesday, 30 August 2011

Package Scripting 101, with Fries and Coke

Posted on 17:25 by Unknown
Since I spend a fair amount of time developing, updating, troubleshooting, and managing the deployment of: scripted packages, I figured I'd try to apply some analytical voodoo and give my jaws something to work on that might be semi-useful.  There is quite a lot of forethought that goes into the decisions to:

A. Use a script to accomplish the task (as opposed to a simple command line, or a GPO)
B. Choose a particular sequence
C. Choose particular built-in or third-party utilities
D. Assess each step for consecutive steps, as well as the final outcome

Some of that comes with direct, hands-on "trial and error" discovery.  But more often it boils down to years and years of experience that rub my little brain cells together like two water-logged sticks on a desert island, desperately trying to start a fire to make a cup of coffee.

One thing I have noticed over the past few years, is that I spend more time thinking about the problem, the various ways the problem could be constrained, the various ways the constraints can be approached, the various probabilities of success or predictability for approaching each constraint, and aggregate probability of predictable outcomes and the gaps resulting against the desired outcome.  After years of developing API frameworks, I've always preferred drawing on paper before writing code.  Now I just do the math in my head and nod a lot and make people wonder if I'm losing my sanity as my eyes drift off into oblivion.

Let's get started...

What is a “Package”?

For the purposes of supporting my half-brained diatribe (ok, monotribe): a "package" shall be defined as a logical unit of software that can be deployed and executed in a single operation.  A package may (and often does) consist of multiple sub-tasks or steps, which are typically executed in sequential fashion, but all within the scope and context of a single executable entity (a file).

What is a “Re-Package”?

A "re-package" is (again, indulge my feeble intellect here) a special treatment applied to, or wrapped around, an existing "package".  A common example would be using a script to execute a vendor "setup.exe" or "setup.msi" to include additional parameters to control custom options during the execution.  Another example would be performing a snapshot "capture" and producing a new .exe or .msi installer file.  There are many other examples obviously.

What is a "Script"?

Oh my God.  After having the definition pounded into my puny skull for years in college, by professors, by visiting professors, technical fellows, DoD engineers, vendor architects, and text books, and 12 year old kids war-driving with iPods and six-packs of Red Bull, the current definition has been stolen and modified and put back on the shelf looking almost nothing like what we were told for twenty-odd years.

The "traditional" definition *I* was given was more or less, to paraphrase and regurgitate:  Software code which is human-readable and executed by an interpreter, rather than compiled into intermediary or bit-level machine code.  There is (was) no need to compile or otherwise prepare the source code to be executed.  There is (was) no need to decompile, or reverse engineer, in order to edit the code after execution.  The interpreter reads, parses, and executes the source code with only a temporary execution cache (stack, pipeline, queue, etc.).  After execution, there were no new compiled files, just the original source code files.

PowerShell changes that definition in a few ways. CmdLets. Then again, so do other contemporary languages which employ Kelvination, tokenization, pre-compilation, and dedicated processors (soft or chip-based).  I started on LISP and C/C++, and I hardly give a shit anymore about keeping up with trends.  The kids are in control now.  I am the old fart, making wise comments from the back corner of the room, laughing with my flapping lips while my dentures are soaking in a shot glass filled with cheap Bourbon.  Whatever. Where was I? Oh yeah...

I suppose in some ways, there are still parallels between PowerShell and LISP in that cmdlets are analogous to LISP engine constructs (pre-compiled components which backended elements and atoms in LISP code, such as mapcar(), apply() or assoc() ), even though some LISP implementations used hardware (firmware) to manage the constructs, allowing for faster retrieval and execution.  Oh geez.  As if I really care.  Why am I blabbering about this?  Whatever, let's move on...

Options to Consider

When you are faced with using (or making) a script to accomplish a multi-step deployment or "un-deployment", there are some common aspects to consider.  These will play a HUGE factor in what language(s) you choose, how many script files will work best, what built-in (operating system environment) commands to invoke, what third-party utilities to employ, and finally: how to architect and construct your script code.  It may even impact your decisions that guide resource planning (people, schedules, etc.)

The basic considerations are described below, but these are by no means a complete or comprehensive list.  Every day I am faced with a new deployment or un-deployment challenge that brings into focus new criteria and new approaches.  We never stop learning, do we?

Install -vs- Uninstall

Are you installing a software product?  Multiple products?  Are you uninstalling software products?  Are you combining both uninstalls and installs in the same package?  Does the installer take care of removing or upgrading the existing components for you?  Does the vendor even provide an easy "unattended" uninstall feature?  Or did they shoot up a gallon of heroin and package their code using their feet while hanging naked, upside down from trees?

Operating Systems

Are you deploying the same package to only one common operating system or multiple operating systems? (I'm assuming here we are talking about Windows since I can't name one corporate environment deploying something like Office to 80,000 Linux or OSX clients).  Windows XP?  Windows Vista (yuck!)?, Windows 7?  Are you deploying to Windows Servers also?

32-bit -vs- 64-bit

Are you deploying (or un-deploying) to 32-bit and 64-bit clients?  Have you compared the installation differences?

MSI -vs- EXE -vs- Custom

Are you deploying or un-deploying only MSI installation files? Only .EXE files?  Both?  Are you pushing down (or collecting) raw files and folders?  Are you extracting .CAB, .ZIP or .7Z files?

Registry Keys/Values

Are you creating new registry keys and/or values?  Are you modifying existing keys and values?  Are you deleting existing keys and values?  Do you need to verify the keys/values exist before performing other actions?  A common tool for this is Windows REG.exe.  However, keep in mind that REG.exe is slightly different on XP and Windows 7 clients (as well as Windows Server 2003 vs 2008 R2).

Registry Permissions

Do you need to modify security permissions on specific registry keys?  A common scenario is the need to relax permissions on keys under HKLM or HKCR for applications which are not Windows 7 compliant.  A common tool for this is REGINI.exe.  Some people say that I too am a common tool, but I'm not going there.

File/Folder Permissions

Do you need to modify security permissions on specific files or folders, or entire folder trees with all files?  A common scenario, like that described above, is relaxing permissions for non-administrators under the %ProgramFiles% folder, or other locations which require elevated rights.  Common tools for this are CACLS.exe and ICACLS.exe

DLL Registrations

Do you need to manually register or un-register DLL components?  A common tool is REGSVR32.exe

Services

Do you need to stop, start, restart or delete services?  There are quite a few applications that create their own services and often do not do a great job of removing them during uninstalls.  Two useful tools for this are the built-in SC.exe command, and the Sysinternals PSService.exe utility.

Processes

Do you need to stop or kill a running process?  The built-in TASKKILL.exe command is useful, as is the Sysinternals PSKILL.exe utility.  Incidentally, when uninstalls fail to delete certain files or folders, it quite often ties back to a running process that couldn't be terminated by the vendor's own uninstall process.  This happens with Services as well.  During complex uninstall package executions, it's not uncommon to find it necessary to stop services and kill processes at specific points before continuing in order to successfully remove all related components.

Restart

If your package manipulates DLL components, or services, you may want to execute a forced restart at the very end of your package execution.  Also, if any of your MSIExec exit codes return 3010, you should do a forced restart at the very end.  If you perform any modifications to the system which impact the Side-by-Side cache or modifying .NET system configurations, and things of that sort, you should consider a forced restart afterwards.

Conclusion

After you size up your objectives, and comb through this list (as a starting point, anyway), you should be able to quickly connect the dots and arrive at a rough idea of what you need to do.  In a future blog post I will dive into aspects that may help to decide which scripting languages/tools to employ for various tasks.
Read More
Posted in network administration, packaging, scripting, software deployment, software packaging, windows 7 | No comments

Monday, 29 August 2011

FLEXlm and your IT Department

Posted on 16:59 by Unknown

I really wish more people using FLEXlm would at least sit down and talk with their IT department and act like a "team".  You know: Act like they work for the same damn company.  One of the most common mistakes I've seen is when the CAD group and the IT department develop an animosity towards each other, and any hope of cooperative planning and execution is pretty much destroyed.  It puts the company in the position of setting the baby in the street waiting for a truck to come along and run it over.

When you involve your IT department, you gain the advantages of expanded resources, greater oversight, and better fault tolerance.  I mean REAL fault tolerance.  One example is backups, especially backing up the FLEXlm license files, but also option files, service configurations, and so on.  More than that, you gain the advantages of putting the entire server into a virtual environment (Hyper-V or vSphere, for example).  One of the most common risk scenarios I've seen is running all your licenses on ONE physical server.  Even two physical servers is not a good idea.  Sure, it works.  But when it fails, it means a lot of unnecessary work ahead of you.

When servers are virtualized properly (e.g. distributed, SANs, failover, etc.) you make your license availabilty resilient.  That word has been overused and burned out by marketing pukes after a few too many Martinis and golf course sunburns, but the word has a real meaning to IT architects and engineers.  It means that your systems can bounce back from potential failure.  When all licenses are on one physical server, not only are you facing the task of rebuilding a failed box, but reinstalling the licenses and dealing with hardware changes (i.e. a failed NIC or hard drive).  In the virtual world those things remain portable and tied to the virtual guest.  But WAAAAAAAAY more important than that is the ability to use VMotion or Live Migration, which automatically, and seamlessly moves a virtual guest to a different physical host node when problems occur.

Most small engineering shops don't often bother with network licensing, so it's usually medium to large shops that have a real "IT department".  If you have "servers", hopefully some are "virtual" (if none of your servers are virtual, it may be time to have a discussion with your IT staff), and if you have virtual servers, you should be considering that approach for your FLEXlm servers.

Read More
Posted in flexnet, hyper-v, infrastructure, network administration, servers, services, virtualization, vmware | No comments

PowerShell vs VBscript: Part 2

Posted on 12:44 by Unknown
I was asked an interesting question regarding my blog post on the tests that compared ADO and ADO.NET from VBscript and PowerShell:  Was it using native PowerShell ISE or "cold start" execution?

The answer:  Native shell execution

I ran the VBscript code in a standard CMD shell.  I ran both of the PowerShell code examples in the PowerShell ISE shell.

When I ran each script using a "cold start" process, it added a half-second to VBscript and 1.5 seconds to the PowerShell tests.  That tells me that the PowerShell "engine" is slower to initialize from a cold launch request, which could be a combination of many factors from .exe size, thread starts, API requests, and so on.
Read More
Posted in powershell, scripting, vbscript | No comments

Google+

Posted on 05:54 by Unknown
Do you use Google+? If not, do you want to give it a try? If so, post a reply and I'll send you an invite.
Sent from my Verizon Wireless BlackBerry
Read More
Posted in | No comments

Saturday, 27 August 2011

Hurricane Irene

Posted on 21:43 by Unknown
I'm posting this from my Blackberry douchephone sitting on my couch surrounded by candles with no power. The hurricane is almost gone from Virginia Beach now, only a few gusts here and there. The streets in my subdivision are under water everywhere that leads in or out. My street is fairly "dry" relatively speaking.



Comparing this to other storms and hurricanes, this one ranks well behind Camille, Isabelle, Floyd and comes closest (but still behind) the 2009 Nor-Easter. We had plenty of rain, but the winds didn't reach the strength hyped by the Weather Channel cheerleading squad. My unofficial guess, for my immediate area only, was 20-25mph sustained and gusts up to 45mph. A few tail-end gusts might have reached 50 or 55mph. A few tree limbs down, but far less damage overall than 2009.



So, we heard 750,000 are without power in the area of Northeast North Carolina into Hampton Roads (Norfolk, Portsmouth, Virginia Beach, Chesapeake, Hampton, Newport News, Williamsburg, Yorktown, etc.) Or roughly 3/4ths of the area. That includes our street too.



We have food, water, propane tanks, charcoal, and plenty of beer. Our water service is functioning also, so we aren't anywhere close to being Somalia. My dog picked a perfect time to have gas. Windows have been closed to fend off the humidity, but now they're all open. Thanks dog!



Anyhow, we're ok. I hope everyone else is ok too. For now: lots of family bonding, talking, playing acoustic guitar and tweeting. Cheers!

Sent from my Verizon Wireless BlackBerry
Read More
Posted in | No comments

Friday, 26 August 2011

What I'm Using

Posted on 20:38 by Unknown
Every now and then I get asked what I'm using at work and at home.  I can't elaborate on which is which, because I'm a consultant and "work" can vary.  But to aggregate all of it into a single list, this is what I typically login to and use:

  • Windows 7 64-bit, SP1

  • Windows Server 2008 R2

  • Office 2010 SP1

  • IE9

  • Google Chrome 15 (dev channel)*

  • TextPad 5

  • VMware Workstation 7

  • WinImage 8

  • Wise Package Studio 8 **

  • Paint.NET 3.5.x

  • Microsoft Security Essentials

  • Windows Live Essentials 2011

  • FileZilla

  • 7-Zip

  • SQL Server 2008 R2

  • System Center Configuration Manager 2007 R3

  • WSUS 3.0 SP2

  • TweetDeck

  • Google Earth

Web:
  • Google+ (and Docs, Reader, Calendar, Gmail, Blogger, Picasa, YouTube)

  • GrooveShark

  • Twitter

  • VeeHD

  • Vimeo

  • StackOverflow

  • MyITForum

  • Amazon

  • Newegg

* primary browser
** soon to be replaced with AdminStudio
Read More
Posted in applications, web sites | No comments

Hurricane Games

Posted on 08:56 by Unknown

When the winds finally arrive, you can entertain yourself in various ways to help pass the time:

Required Ingredients:

  • Plastic lawn chairs
  • Cooler filled with ice and a variety of beers
  • A bottle opener
  • Bonus:
    • A garage with the door opened where you can sit to play the games
    • A bullhorn

Rules:

  • Guess the first tree to fall
  • Guess the first house to get damaged
  • Guess the first car to get damaged
  • Guess the first small animal to become airborn
  • Guess how long the electricity will be out
  • Guess who will have the most signal bars on their phone

Winning and Losing:

  • Winner gets a beer from the cooler
  • Loser has to open bottles for the winner and put underwear on his/her own head

bullfight

Read More
Posted in fun, games, people, social stuff, weather | No comments

Wednesday, 24 August 2011

Expiration Date

Posted on 04:31 by Unknown

We all have one.  All of our food (aside from Twinkees) has one too.  This blog has one.  I've decided that since the first post was on December 24, 2007, then my final post will be on December 24, 2011.  That will make it four years of blabbering without any sense of purpose or reason.  In a way, this is giving me a "goal" of sorts.  A point of catharsis.  Something to aim for.  If you've been reading my ramblings then you may want to stick around to see what happens between now and then.  Then again, you may decide this is all too stupid and move on.  It could also end earlier if something should happen to me (always an option), but hopefully that doesn't happen.  2011 has been an interesting year.  I'm sure it will have more interesting twists in store for us all.  We'll find out.

Read More
Posted in blogs | No comments

Tuesday, 23 August 2011

Dave's Hurricane Survival Guide

Posted on 19:13 by Unknown

Living here in Virginia, I've experienced my share of hurricanes and Nor-Easters (quite often more damaging than hurricanes actually).  Every time they announce a new name and show that dreaded "cone" of destructive fate, my inlaws and siblings start e-mailing and calling, making sure we're taking it seriously and are ready for the "event".

First off, yes.  Living here, we have eyeballs like Iguanas that can focus one eyeball on what we're doing, with the other on the TV or computer screen.  It can be confusing. For example, when having sex, it's not uncommon to scream out "Category 5!!!!!" when reaching climax.  At this point, you partner might instinctively jump to grab a sheet of plywood and a cordless electric screw-driver.  You get used to it after a while.

So, what exactly should you gather in preparation for a hurricane?  I'm glad you asked, even if you really didn't, but I pretended that you did, in which case, I'll entertain the voices in my head.  Shhhh, it'll be ok.

Quite often, folks who aren't familiar with the "Hurricane way of life" will ask "are you going to evacuate?"  This has to be one of the funniest jokes ever. I wonder if anyone really believes it's possible to do that in this area?  We can't move traffic on our roads on ANY normal day, so what do you think will happen when they smile and say "now, calmly pack everything you own and evacuate to avoid absolute destruction." ?  Take my professional advice: stay home and seek entertainment.

Batteries? Water? Flashlights?  Canned foods?  Propane tanks?

Not really.  Those are ok if you intend on "surviving", but if you want to truly "enjoy" your rare hurricane experience, you need to modify your list just a little:

  • Propane - for cooking dead things on your cheap, rusty grill
  • Beer - LOTS and LOTS of beer
  • Chain Saw - for cutting down fallen trees, fighting off zombies, and attacking your neighbors when you run out of supplies and they begin taunting you
  • Canned Food - ignore the fat content, focus on the protein and carbs
  • Exedrin - for the hangovers you get from washing down your grilled pork and squirrel meat with cases of warm beer
  • Baseball Bat - to fend off roaming gangs of pillagers, and tenderizing small furry animals for grilling
  • Gasoline Can - for the chain saw and lighting shit on fire when you get bored after five days without power
  • A Gun - for whatever.  after a case of beer you'll find creative things to do with it.  For example, shooting at your half-empty propane tank on your driveway
  • A Smartphone - to surf the Internet while you wait for power to come back on.  Don't forget to buy one of those cigarette lighter power adapters to keep it charged from your car or truck (every self-respecting man has a truck anyway)
  • A Bullhorn - this is probably THE single most important item to have on hand.  After your second case of beer is consume, you'll understand completely

Enjoy!  And stay safe!

Read More
Posted in nature, society, weather | No comments

Monday, 22 August 2011

Proper Use of Capital Punishment

Posted on 13:58 by Unknown

If I were voted emperor of the Universe, the following crimes against humanity would be punishable by immediate and painful death:

  • Rubber-necking in traffic
  • Debating which operating system is "superior" in the workplace
  • Hogging the left lane and driving below the posted speed limit
  • Failing to use a turn signal when turning
  • Driving with a dog or child in your lap behind the wheel
  • Making comments about legislation for which you have not read the actual Bill
  • Hit and run
  • Bumper stickers that aren't funny
  • Serving "lite" beer in a drinking establishment
  • Watching Hardees commercials
  • Debating politics in the workplace
  • Debating religion in the workplace
  • Soliciting on private property
  • Bad acting
  • Playing the same song more than once per day on any radio station
  • Opening a vehicle door into passing traffic without looking first
  • Letting your kids get as fat as you before they turn 10
  • Letting your Pit Bull roam without a leash around childrens playgrounds

Lesser Punishment Crimes

  • Breaking the laws of uniqueness:
    • Joining a group of similar vehicles in traffic (same make and model and color)
    • Joining a group of similar vehicles wearing identical apparel (the same leather vest, Nazi helmet and same tattoos)
    • Punishable by stamping a serial number on your forehead to clearly indicate your intentions are to follow the lead of every other idiot around you.
Read More
Posted in culture, legal, people, society, stupidity | No comments

Sunday, 21 August 2011

Autodesk Scripts: TKO

Posted on 19:25 by Unknown

Maybe I'm drinking the wrong Kool Aid.  Maybe I'm just being paranoid?  Maybe I'm giving myself waaaaaaaay too much credit.  But it seems that lately when I post some script code for doing something with respect to deployment (or "un-deployment", one of my favorite words to chuckle over), Autodesk publishes their own version and trumps me soundly.  I dunno. 

Whatever the case, my focus has always been on making it possible to run "unattended" for massive scale environments (read: Microsoft System Center Configuration Manager, or Altiris, or whatever), while Autodesk is focused on making a thorough script (or KB/support article) that is designed to work interactively (someone runs it, not via an automated agent or scheduled task).  Case in point: KB Article TS45252.

Rather than try to "compete", or engage in some sort of "race", I'm bowing out.  Autodesk wins.  They have battalions of younger code monkeys with infinite more time to accomplish more in less time.  They have the means to do a better job than do I.  My resources, time and enthusiasm are much lower.  Call it "Low-T" or whatever, but as I approach 50 I'm starting to rethink my priorities.

As a tip for anyone still interested in (more-or-less) "porting" Autodesk deployment and removal scripts for use in an unattended scenario:

  • Look for MSIEXEC statements that use /qb! and replace with /quiet /norestart
  • Look for instances of "WindowsInstaller.Installer" that use the ConfigureProduct method, and modify the UILevel property from msiUILevelBasic to msiUILevelSilent (note that msiUILevelBasic = 3, and msiUILevelSilent = 2)
  • Look for MsgBox() statements and replace them with Wscript.Echo
  • If the MsgBox() statement is used in the Function form (returns a value) force the return value by hard assignment (e.g. intChoice = MsgBox("Continue?", vbYesNo, "Caption"), just set intChoice = vbYes)
  • Add error checking throughout and make sure to "raise" errors using Wscript.Quit(err.Number).  If you are running the .VBS from a .BAT or .CMD script, be sure to raise the error again from there user the DOS "EXIT %errorlevel%" statement.
  • It helps to add secondary condition checking and raise forced errors if needed. This is helpful for things like making sure folders are deleted, registry keys are removed, and so on.
  • Follow the MSIEXEC error code advice I posted a few days ago here.

Finally, I'm not saying that I won't ever post relevant code here again.  I'm just saying that unless it's something truly unique and provides added value, I'll let it go by the wayside.  I should have learned my lesson when AutoLISP was left out in the cold to starve and die slowly.  I guess I've been too nostalgic and sentimental about it all.  Time to grow up.

Read More
Posted in articles, autodesk, automation, installation, network administration, scripting, software deployment | No comments

American Society

Posted on 08:35 by Unknown

If you are older than, say, twenty, do you recall the feeling you had during the two weeks after September 11, 2001?  Every person I have asked says the same thing: That most everyone, in public, was noticeably, and significantly "nicer" to everyone else.  The frequency and sincerity of the following actions was at a MUCH higher level:

  • Holding doors open for others
  • Letting others cut in line (on foot and in traffic)
  • Verbally greeting strangers with a smile (e.g. "good morning!")

After those two weeks are done, we gradually, but quickly, slipped back into our usual rude, inconsiderate shells.  Is that too pessimistic?  Too negative?  I'm just commenting on what more than three dozen people I've asked have all concurred.  But I have to admit that I too feel this way.  I remember that week very well.  Maybe it was affected by a concentrated environment of military and defense activity (the area I live in is arguably the single most concentrated location of all branches of the military, intelligence, government and contractor presence on the planet).  That's entirely possible.  But "talking" with others in other locations around the U.S. it seems that it was pervasive and consistently "nicer" to be out in public.

Fast forward to August 2011, and the current onslaught of political fighting, diametrically opposed views on economy, foreign relations, national defense, education, taxation, environment, health care, and so on, and it seems like we stabbed the old America in the heart and killed it, trampled it into the ground and stand proudly on top of the dead carcass waiving a new flag of "I refuse to compromise - it's all about ME now!"  I'm not just talking about politics either.  I'm also referring to how we act in public.  Traffic behavior is even more aggressive and inconsiderate.  Our behavior when standing in lines is also more guarded and defensive.  Men, women, all races, all religions, are guilty.  The only exceptions I've seen:

  • The elderly seem saddened by this and often are the only ones still clinging to the hope of considerate behavior
  • Certain nationalities of foreign tourists seem to be appalled at our outward aggression and rudeness.
  • Today's parents do not seem concerned about teaching their children the same social empathy as our parents and grandparents.

The third bullet is obvious when you ask most eight year olds who they should hold a door for, or help cross a street. I've seen more kids than ever let doors slam in the face of an old person, or a mother with a stroller, or a person in a wheelchair, than ever.  I've seen more kids than ever jump into seat on a bus or train, even when they see someone approaching the same seat (an old woman, a mother with a baby, an old man, etc.).  Children don't know how to behave in these situations without parental guidance.  When I see these things occur, and their parents do nothing to correct them or set an example, I can see it's the parents that are failing.

This tells me that this current standard of behavior isn't globally consistent, and certainly not age-consistent either.  I'd bet that if another major tragedy were to occur on our soil, that our focus on considerate behavior would improve again.  I think it's "there", inside, waiting to come out, but we've suppressed it with a new set of priorities.

I don't have a solution to offer.  No cure or fix.  Just an observation.

baby-holding-fathers-hand

Read More
Posted in people, social stuff, society | No comments

Saturday, 20 August 2011

Book Pricing Announcement

Posted on 20:41 by Unknown

Since I've decided to retire from writing books on Autodesk products and technologies, I'm going to be making some adjustments to pricing for them as well.  The following Kindle E-Book titles will be re-priced immediately:

The AutoCAD Network Administrator's Bible, 2012 Edition (was $7.99, now $6.99)

The AutoCAD Network Administrator's Bible, 2011 Edition  (was $4.99, now $3.99)

The Visual LISP Developer's Bible, 2011 Edition  (was $7.99, now $6.99)

The Visual LISP Developer's Bible, 2003 Edition  (was $4.99, now $3.99)

The Packagers Pocket Reference  (still only $2.99)

These price changes were submitted very recently, and may not have updated in Amazon's database yet.  If the prices are still the "was" price shown above, visit the Amazon page again after a few hours or a day to allow time for it to update.  As always: Thank you for supporting my work and purchasing my books.  It has really meant a lot to me and has helped me through some tough times.

Read More
Posted in amazon, autocad, autodesk, books, network administration, publishing, software deployment, software development, software packaging, visual lisp, writing | No comments

Light Rail in Hampton Roads

Posted on 15:06 by Unknown

I took my son to ride the Tide today.  It's only the second day of it's operational debut.  There were some minor hiccups, congested crowds, idiots getting in the way, and so on, but it was worth it.  It was worth every second of waiting in line, boarding and riding it from end to end.

Afterwards, I thought about some of the discussions overhead at the stations and on board.  Many were complaining about what it doesn't do, where it doesn't go, who it doesn't help, and blah blah blah.  It's a start.

But I thought I'd try to respond to some of the views I heard spoke out.

IMG00031-20110820-1445

How will it help Virginia Beach residents?

It won't.  They voted to skip out on the offer to join in.  So they don't count.  They have no voice.  They can STFU - or VOTE to change things.  It would help if they showed up at any of the three or four public forums, but only the blue-haired whiners showed up, and ran their mouths against any suggestions to improve traffic congestion.  Why? Because they don't deal with traffic congestion. They stay home, watch TV all day, and get a ride to show up at public forums to bitch about keeping things the way they've been for 50 years.  Progress is evil.

So, none of the other cities wanted to pitch in.  Norfolk decided to go it alone.  They did.  Norfolk has balls.  The other cities do not.  So other city residents have NO rights to complain or even debate what Norfolk decided to do.

Don't like the route?  Tough

Don't like the design? Tough

Don't like the fare system and schedules?  Tough

Why didn't they run it down the center of I-264?

I can't believe I actually heard people argue this in public.  They might as well have yelled out "I'm a complete fucking idiot! Listen to me make a fool of myself!"  Ok, for those folks, here goes:

A. 264 is owned by the State of Virginia, not the City of Norfolk

B. How would stations get access to the rail line and to the adjacent parking areas?  How would that huge "gap" be bridged?  For how much money?  paid for by whom?

C. Who cares.  It's done.  If you can't figure this out on your own, you're just too stupid.

Why didn't they run it on an elevated monorail?

A. Money

B. Lack of Money

C. Norfolk had to go it alone on this

Whatever.  It's a start and I'm excited to see SOMEONE have the balls to try it out after so many decades of being gone from our environment.  Yes, there used to be a public transit rail system in this area back in the day of our grandparents.  But our generation prefers sitting in traffic jams for hours and hours and then coming home late to complain to our family, neighbors, and friends about how bad the traffic is getting.  Yet, when the votes come around they give any alternative a thumbs down.  For you folks: Suck it.

Read More
Posted in government, hampton roads, traffic, transportation, travel | No comments

Friday, 19 August 2011

Dumbest Roads in Hampton Roads

Posted on 14:08 by Unknown

Based on a criteria “set” of renaming, routing so on, the following roads are hereby declared as the most stupid in Hampton Roads.  We should rename it "Hamp-dumb Roads" in my insignificant opinion. 

Lost and Confused SignpostEnjoy:

  1. Princess Anne Blvd (Norfolk and Virginia Beach)
    • Pay special attention to not only the breaks and renames, but the "East" and "West" parts as well.
  2. Southern Blvd (all nine of them)
  3. London Bridge / Greak Neck / Drakesmile Rd
  4. Providence / Plaza Trail / Little Neck Rd
  5. Nimmo Parkway
  6. Great Bridge / Kempsville / Witchduck Rd / Pembroke Blvd
  7. Lynnhaven Pkwy vs Lynnhaven Rd
  8. Haygood Rd / Wishart / Weslyan Dr
  9. Waterside / Bousch / Llewellyn Dr
  10. Newtown / Diamond Springs Rd
Read More
Posted in hampton roads, stupidity, traffic, transportation, virginia, virginia beach | No comments

Thursday, 18 August 2011

Which PowerShell?

Posted on 15:15 by Unknown

Confused?  Good.  You're not alone.  Microsoft is a bit confused as well. 

If you happen to be running Windows 7 64-bit and you haven't looked at PowerShell yet, you may be a little surprised to see there are two sets of shortcuts on the "Start" menu.  One set for x86 and the other for x64 (unlabeled).  So, what's the difference?  Aside from how each is managed in the Windows memory and process stack environments, they do behave differently.  I haven't begun to map out all of the possible deviations betwixt the two (I never get to use the word "betwixt", but now I can!  moo-ha-ha-haaaa!), however, I have run into one in-the-face obvious difference:

ENVIRONMENT variables on 64-bit Windows

If you open each console (yes, you can run them both at the same time), and type the following statement in and hit Enter, you may notice the output results are not the same:

get-childitem env:

Here's a screen shot of each:

ps1

ps2

I highlighted the key differences in red for the visually and mentally impaired (like me).  Can you spot them?  Have you played "Where's Waldo?"  I have to pause for a second to say that "x86" is a stupid-ass name.  Why not "x32"?  The "x64" is still based in large part on the "x86" architecture, so maybe they should be "x86/32" and "x86/64"?  Whatever.  I'm on my third beer, so I really don't care.  It's all stupid.  And making two versions of the same script interpretor on the same operating system is also stupid as shit and makes no sense at all.  Why even make a 32-bit version on a 64-bit machine?  Is there a 64-bit version of VBScript?  CMD?  Explorer?  Feh.

So, basically, if you're writing PowerShell scripts that will run on 64-bit clients, be careful to test the differences before unleashing it in production.

Read More
Posted in microsoft, powershell, programming, scripting, software development | No comments

Script for Removing Civil 3D 2011 with Configuration Manager

Posted on 03:30 by Unknown

Script for uninstalling Autodesk Civil 3D 2011 and cleaning up leftover goodies.  I used this for removing it from a batch of computers using Microsoft System Center Configuration Manager.  I hope it helps...

@echo off
rem ****************************************************************
rem Filename..: uninstall.cmd
rem Author....: David M. Stein
rem Date......: 08/17/2011
rem Purpose...: uninstall AutoCAD Civil 3D 2011 and cleanup junk
rem ****************************************************************
CLS
SETLOCAL
SET APPNAME=Civil3D2011
SET LOG=%TMP%\%APPNAME%_uninstall.log
echo %DATE% %TIME% installing... %APPNAME%... >%LOG%
echo %DATE% %TIME% source....... %~dps0 >>%LOG%
echo %DATE% %TIME% target....... %COMPUTERNAME% >>%LOG%
echo %DATE% %TIME% windir....... %WINDIR% >>%LOG%
echo %DATE% %TIME% progfiles.... %PROGRAMFILES% >>%LOG%
echo %DATE% %TIME% temp......... %TMP% >>%LOG%
echo ----------------------------------------------- >>%LOG%
if exist "%ProgramFiles%\Autodesk\AutoCAD Civil 3D 2011\acad.exe" GOTO UNINSTALL
GOTO NOTFOUND

:NOTFOUND
echo %DATE% %TIME% info: application was not found on this computer >>%LOG%
GOTO END

:UNINSTALL
echo %DATE% %TIME% info: autodesk civil 3d 2011 >>%LOG%
msiexec /x {5783F2D7-9000-0409-0002-0060B0CE6BBA} /quiet /norestart
echo %DATE% %TIME% info: exit code is %errorlevel%... >>%LOG%
rem
echo %DATE% %TIME% info: autodesk civil 3d 2011 language pack >>%LOG%
msiexec /x {5783F2D7-9000-0409-1002-0060B0CE6BBA} /quiet /norestart
echo %DATE% %TIME% info: exit code is %errorlevel%... >>%LOG%
rem
echo %DATE% %TIME% info: civil 3d 2011 material library >>%LOG%
msiexec /x {9DEABCB6-B759-4D52-92F8-51B34A2B4D40} /quiet /norestart
echo %DATE% %TIME% info: exit code is %errorlevel%... >>%LOG%
rem
echo %DATE% %TIME% info: civil 3d 2011 material base image library >>%LOG%
msiexec /x {CD1E078C-A6B9-47DA-B035-6365C85C7832} /quiet /norestart
echo %DATE% %TIME% info: exit code is %errorlevel%... >>%LOG%
rem
echo %DATE% %TIME% info: design review 2011 >>%LOG%
msiexec /x {8D20B4D7-3422-4099-9332-39F27E617A6F} /quiet /norestart
echo %DATE% %TIME% info: exit code is %errorlevel%... >>%LOG%
rem
echo %DATE% %TIME% info: directx 9 for civil 3d 2011 >>%LOG%
msiexec /x {0B8F69E3-5983-4B2B-B464-5D833C76773D} /quiet /norestart
echo %DATE% %TIME% info: exit code is %errorlevel%... >>%LOG%
rem
echo %DATE% %TIME% info: faro ls >>%LOG%
msiexec /x {951B0F30-9F1A-4BF6-B3DA-99EB0E917B1C} /quiet /norestart
echo %DATE% %TIME% info: exit code is %errorlevel%... >>%LOG%
rem
GOTO CLEANUP

:CLEANUP
echo %DATE% %TIME% info: cleaning up leftover files and folders... >>%LOG%
del "%ProgramFiles%\Autodesk\AutoCAD Civil 3D 2011\*.*" /s /f /q
rd "%ProgramFiles%\Autodesk\AutoCAD Civil 3D 2011" /s /q
rd "%ProgramFiles%\Common Files\Autodesk Shared\Materials2011" /s /q
echo %DATE% %TIME% info: cleanup completed >>%LOG%
GOTO END

:END
echo ----------------------------------------------- >>%LOG%
echo %DATE% %TIME% uninstall completed / exit code: %errorlevel% >>%LOG%
ENDLOCAL
if %errorlevel%==3010 (
rem force a zero return if success and reboot needed
exit 0
) else (
if %errorlevel%==1605 (
rem force a zero return if msi packages not found
exit 0
) else (
exit %errorlevel%
)
)
Read More
Posted in autocad, autodesk, config manager, network administration, sccm, scripting, software deployment, software packaging | No comments

Uninstall AutoCAD 2011 via Configuration Manager

Posted on 03:21 by Unknown

Whilst trying to fix a problem with a System Center Configuration Manager (aka "ConfigMgr") deployment package for a customer, I ended up building a new machine.  The package now consists of two-scripts for removing AutoCAD 2011, one of which is the "unsupported" script from Autodesk.  Since their script works just fine, but isn't built to run "silent" or "unattended", I had to do some minor modifications, and rather than be greedy and horde it for myself, I decided to post it for anyone else that still reads my blog.

https://sites.google.com/site/skatterbrainz/downloads/Uninstall_ACAD_2011.zip?attredirects=0&d=1

Some useful explanation:

  • I use two scripts: a .CMD and a .VBS. 
  • The .VBS is modified from the original provided by Autodesk (at the URL in the first paragraph above).
  • The changes to the .VBS are:
    • I cleaned up the code to use consistent Pascal-case formatting
    • I cleaned up the indention to be more consistent
    • I changed the "basic" UI level to "silent"
    • There is NO warranty or guarantee, etc. provided by myself - do not call me if you hit a problem unless you want to share a correction I can roll back into it for everyone to benefit from (I always give due credit to such changes)
  • The .CMD file calls the .VBS and then performs additional tasks not performed by the .VBS:
    • Removing Design Review 2011
    • Removing leftover material and image libraries, and FARO
    • Cleaning up leftover files and folders

A few thoughts on "backing up custom files":

  • I firmly believe that backing up user-custom files is not the responsibility of IT folks.  We have enough stupid crap to deal with (don't even get me started with "stupid user" stories).
  • If you have custom files on your desktop computer, and you are made aware of a forthcoming upgrade roll-out that will likely blow out those custom files: too bad.
  • I prefer uninstalls that clean all the shit out.  Period.  Leave nothing behind.  Kind of how the Romans dealt with cleaning up, during their good times.  After 15 years of dealing with issues arising from conflicts with leftover crap, I realized that I wasted more time trying to mend those conflicts than when I simply wiped it all and re-installed the new version from scratch.  The amount of time saved has, so far, been roughly 50 percent.
  • If users want to restore/retain their cute little ribbon buttons, toolbars, paletts and whatever, fine.  They can do it.
Read More
Posted in autocad, autodesk, config manager, network administration, sccm, scripting, software deployment, software packaging, system center | No comments

Wednesday, 17 August 2011

Semi-Showdown: VBscript, PowerShell / ADO, ADO.NET

Posted on 17:11 by Unknown

Ok, so I got REALLY REALLY REALLY bored one day and had to settle a nagging question in my head (I have another nagging question involving the medical/scientific analysis of whether the metabolic rate change incurred by the caffeine in a cup of strong coffee burns off enough calories to offset a tablespoon of sugar in the coffee itself, but that's for another day). 

I posted an article on this subject a long time ago, but without any analysis, just a question about why 99.9 percent of all the PowerShell "database" examples on the Internet use ADO (via COM InterOp) rather than pure/native ADO.NET.  Since then however, the ratio of PowerShell+ADO.NET examples has grown significantly, which is a good thing.  Nothing like trying to impress a consumer with a spiffy new sports car than by showing you how well it can sit idle in a traffic jam.

The Goal:

  • Measure the performance variations between VBscript+ADO, PowerShell+ADO, and PowerShell+ADO.NET.

The Setup:

  • Query a remote SQL Server database table, for one column only
  • Query: Select one column, of type VARCHAR(255), from approximately 5,300 rows
  • The column being queried is indexed
  • The table contains four columns, of types: INT, SMALLDATETIME, VARCHAR(255) and VARCHAR(50)

The Server:

  • Hyper-V 2008 R2 SP1 guest:
    • Windows Server 2008 SP2
    • 20 GB RAM
    • 4 CPUs
    • SQL Server 2008 R2
  • Client:
    • HP 7900 Desktop
    • Windows 7 SP1, 64-bit
    • 12 GB RAM
    • Dual Core CPU

The Code:

[VBSCRIPT]
query = "SELECT ProductName FROM SoftwareExclusion ORDER BY ProductName"
Set conn = CreateObject("ADODB.Connection")
Set cmd = CreateObject("ADODB.Command")
Set rs = CreateObject("ADODB.Recordset")
conn.Open sqlConnectionString
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockReadOnly
Set cmd.ActiveConnection = conn
cmd.CommandType = adCmdText
cmd.CommandText = query
rs.Open cmd
If Not(rs.BOF And rs.EOF) Then
Do Until rs.EOF
wscript.echo rs.Fields("ProductName").Value
rs.MoveNext
Loop
Else
wscript.echo "error: no records found"
End If

rs.Close
conn.Close
Set rs = Nothing
Set cmd = Nothing
Set conn = Nothing

wscript.echo Timer-t1 & " seconds"
[/VBSCRIPT]


[PS_ADO]
$t1 = Get-Date

$query = "SELECT ProductName FROM SoftwareExclusion ORDER BY ProductName"

$adoOpenStatic = 3
$adoLockOptimistic = 3

$adoConnection = New-Object -ComObject ADODB.Connection
$adoRecordset = New-Object -ComObject ADODB.Recordset

$adoConnection.Open($sqlConnectionString)
$adoRecordset.Open($query, $adoConnection, $adoOpenStatic, $adoLockOptimistic)
$adoRecordset.MoveFirst()
$rows = $adoRecordset.RecordCount

do {
write-host $adoRecordset.Fields.Item("ProductName").Value
$adoRecordset.MoveNext()
} until ($adoRecordset.EOF -eq $TRUE)

$adoRecordset.Close()
$adoConnection.Close()

$runtime = New-TimeSpan $t1 $(Get-Date)
write-host "Runtime: "$runtime.Seconds" seconds"
[/PS_ADO]


[PS_ADONET]
$t1 = Get-Date

$SqlQuery = "SELECT ProductName FROM SoftwareExclusion ORDER BY ProductName"

$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = $SqlConnectionString

$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandText = $SqlQuery
$SqlCmd.Connection = $SqlConnection

$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $SqlCmd

$DataSet = New-Object System.Data.DataSet
$SqlAdapter.Fill($DataSet)
$SqlConnection.Close()

#output the data
$DataSet.Tables[0]

$runtime = New-TimeSpan $t1 $(Get-Date)
write-host "Runtime: "$runtime.Seconds" seconds"
[/PS_ADONET]


The Results:




  • 10 successive execution runs each


  • Average Run Times:



    • Test 1 = 1.6 seconds


    • Test 2 = 22.21 seconds


    • Test 3 = 3.9 seconds


Read More
Posted in databases, microsoft, powershell, programming, projects, scripting, software development, sql server, testing, vbscript | No comments

Autodesk Design Review 2011 - Uninstall Notes

Posted on 08:32 by Unknown
If you attempt to run the Design Review 2011 uninstall via msiexec using a silent switch and it fails with 1603, chances are if you run the uninstall interactively it will show you what's really wrong: The client is missing the Visual C++ 2005 SP1 runtime components.  To remedy this, reinstall VC++ 2005 SP1, then uninstall Design Review 2011 and it should work fine.  That is all.
Read More
Posted in autodesk, software deployment, unattend | No comments

An Official Apology about my comments on VBscript and PowerShell

Posted on 06:07 by Unknown
Over the past year or so, I've posted several times that there is a "bug" in VBScript and PowerShell that affects how the code interprets the Windows environment variable %PROGRAMFILES% on x64 clients.  This is incorrect.  The root cause of this statement was derived from my use of a particular code editor, TextPad, which appears to have a small, but troublesome, bug.  However, regardless of that, I should have verified my findings outside of the code editor interpreter, which I failed to do.

For my shortcomings in that area:

I apologize to the folks that work on, or have worked on, VBscript, Windows Scripting Host, and PowerShell (among any others I may have blamed).

Here's a post of what I'm talking about: http://forums.textpad.com/viewtopic.php?p=37715#37715
Read More
Posted in powershell, scripting, vbscript | No comments

Monday, 15 August 2011

MSIExec Exit Codes in Script

Posted on 19:53 by Unknown

I could have left off the "in Script" part, but whatever.  Since I'm talking about this in the context of scripting I suppose it fits.  If you do any packaging (or more accurately: re-packaging) of software installations, you should bookmark Microsoft Support Article 229683.  This article provides a useful index of MSIEXEC exit codes and what they represent.

There are a few that should look familiar, but some of you may not be aware of them.  The longer you work with deploying software (and software uninstalls), especially via script, the more likely you will encounter these particular exit codes at some point.  There are others that pop up, but these tend to be the most common...

0 (zero) - represents "good", or "no errors".  In general, an exit code of zero indicates a successful completion.  Does this mean that the task REALLY completed successfully?  No.  It means that whatever was the last step of the task returned an exit code of 0 to whatever was watching it (i.e. the Configuration Manager client).  I have seen plenty of crappy vendor installation packages fail and return a zero code.  I've also seen respectable vendor packages do this (a major CAD vendor's network deployment which fails when trying to install .NET 4 and DirectX in the silent bundle, in a particular version of their product line, would return 0).  For most simple tasks (an individual msiexec or setup.exe operation) a zero exit code is fairly reliable, but as I always say: TEST, TEST, TEST, and then TEST AGAIN.

3010 - "a restart is required to complete the install"

This is similar to zero, except that it also indicates that a system restart is required in order to complete the task successfully.  If you are running multiple step tasks, and any one of the tasks returns a 3010 exit code, and you are suppressing restarts throughout, make SURE you execute a restart at the very end.  In addition, if you are using a product like Microsoft System Center Configuration Manager, you need to modify the Program to indicate that the program will restart the computer when finished running.  This is especially important if the program is a script.

1605 - "this action is only valid for products that are currently installed"

This exit code applies to uninstalls and indicates that the .MSI or GUID specified in your script to run as an uninstall (e.g. /x) is not actually installed.  It may also indicate a corrupted installation, whereby there are in fact bits of the product installed all over the place (files, folders, shortcuts, registry entries, DLL registrations, .NET assemblies, etc.) but the required references to tell Windows that the product is in fact installed are broken or missing.  If you are building this into your script, make sure that if you fire off an "msiexec /x blah-blah-blah" statement that returns 1605, to also follow behind that with additional checks for remaining pieces to clean-up.

1633 - "this installation package is not supported on this platform"

As you might have guessed, this means that an attempt was made to install an MSI package on a non-supported platform (i.e. operating system version or service pack level).

1632 - "the temp folder is either full or inaccessible"

I've seen this error when an overzealous sys-admin ran a scheduled task/script to clean out "temp" folders and also removed the temp folder itself.  I've also seen it (less often) when the security permissions on the temp folder are changed from their default configuration (whether it be the Windows\Temp folder, or the user's individual temp folder).

As a follow-up on 1605: if you are creating a script to run via Configuration Manager to uninstall an application, and you get this exit code, you might want to override the return value.  As an example, rather than raising the %errorlevel% value (option [1] below), return an explicit zero (option [2] below)...

[1] exit %errorlevel%

[2] exit 0

Someone asked me recently about why I would recommend this. It's simple: if you are deploying an advertised uninstall program, and it runs on a client that doesn't have the installed application, it may return 1605, which means "not installed, move along", which technically isn't a failure and should not return a "failed" result to Configuration Manager.  If it runs on a client where it isn't applicable, it should bail out and say it was successful, or you can use another explicit exit code and have a better/clearer picture of how many actually ran the uninstall.

1622 - "error opening installation log file"

If you like to use logging options with MSIEXEC, make sure the log output path is valid, and that the permissions allow for creating and updating the log file under the context by which the package is installed (or uninstalled).  This will often return a 1622 exit code.

1608 - "unknown property"

This exit code indicates an invalid property parameter was passed in the command line.  The most common cause of this is fat-fingering.  For example, when specifying "INSTALLLEVEL", but you leave out one of the "L" characters (e.g. "INSTALLEVEL") it will blow up with a 1608 exit code.

The single most important takeaway from this is that if you use scripts with deployment systems like Configuration Manager, you need to be careful to not only watch for exit codes, but watch for how you are raising the results up to the Configuration Manager agent.  In most cases, raising the explicit exit code is best, but there are times where you may want to override it (such as 1605).  Scripting is like a giant box of Lego(R) blocks, allowing you to build incredible things.  But you need to make sure the towers and bridges you build with them don't crash under their own weight.

Read More
Posted in config manager, deployment, network administration, packaging, sccm, scripting, software deployment, software packaging, system center | No comments

Saturday, 13 August 2011

Bullshit Monopolies

Posted on 21:58 by Unknown

Thinking back from the 1990's to now...

Who FORCED anyone to buy Windows over other operating systems?  Did we not have access to buying OS/2, Mac, UNIX (one of a hundred flavors) or Linux?

Who FORCED anyone to buy Office?  Did we not have WordPerfect and later: OpenOffice?  Star Office?

Who FORCED anyone to use IE?  Did we not have Netscape, AOL, Firefox, Opera, Chrome and Safari?

Who FORCED anyone to use Google?  Did we not have Alta Vista, Excite, Lycos, Ask Jeeves, BigFoot, Web Crawler, Yahoo!, AOL and Bing?

Where the hell do these lawyers fish up people to file major law suits claiming they had no choices?  I don't get it.  I see Microsoft is building a consortium to file suit against Google search as being an unfair monopoly.  Wow.  So, apparently they've thrown in the towel on Bing having what it takes to draw customers away from Google.  I especially love it when my "free market" colleagues argue in favor of this practice, effectively admitting that a "free market" can't decide on its own and therefore requires government/legal intervention to correct bad behavior.  My how times have changed.

Read More
Posted in apple, business, chrome, firefox, google, government, markets, microsoft, openoffice, opera, operating systems, osx, safari | No comments

Friday, 12 August 2011

Society

Posted on 12:27 by Unknown
If you've never paused even once to ponder some of the bizarre shit we do every day as a society, well, you're brain dead.  If you don't pause at least once a week to ponder it all, you semi-brain dead.  Sometimes, even though it can push you to the edge of anxiety meltdown, it's good to think like a 4 year old and just look at everything as if you'd NEVER seen or heard it before.

Why do women wear panty hose?  Makeup?  Why do we spend so much time grooming hair and beards and mustaches and side burns, etc.?  Why do we spend so much time, effort and money on maintaining lawns?  Why do we say we're unique and "individual" yet almost everything we do is patterned from what others are doing, wearing, saying, etc.?  Why do we like it that radio stations repeat the same songs from the same artists for days, weeks, months, years, even decades?  Why are dogs, cats and fish kept as "pets", while fish are also eaten, yet dogs and cats are not? (in America, at least).  Why are dogs and cats ok as "pets", but chickens, rats, pigs, goats, opossum, and deer are not?  Why do we eat cows but not horses?  Why do we swear by privacy, yet flock to web sites to post what we're doing and where we're going?  Why do we whine about the status quo, yet fiercely resist change?  Why do we eat pizza with diet soft drinks?  Why is it ok to put an old dog to sleep but not an old person?  Why do we drink energy drinks when we know we need more sleep?  Why do we engage in debate about religion and politics when we know it will never convince the other side to change?  Why do we call killing "murder" or "defense" or "manslaughter" or "mercy"?  Why do we spend more of our lives working than with our families?  Why do we insist, regardless of race or religion, that "we are all alike" yet we "celebrate our unique differences"?

Why?

Enjoy your weekend
Read More
Posted in | No comments

Thursday, 4 August 2011

Scripts Calling Scripts, and So On...

Posted on 16:28 by Unknown

I tried to come up with a clever title, but I just finished a grueling bike ride in the heat and humidity, followed by cold beer and pizza, so my brain is not on the clever channel right now.  But here goes...

I recently got a few e-mails about my recent post about running script packages from Configuration Manager and how to handle return exit codes.  Rather than dive into the syntactical minutae, I think a conceptual overview is in order.

Basically, when one thing calls another thing, and that second thing calls yet another thing, there are a variety of issues that come into play when it comes to the calling thing getting a "result" from the thing it calls.

When you create a Package and Program in Configuration Manager (or Altiris, Tivoli, wtf), which runs a .MSI installation file, it automatically invokes msiexec to do the heavy lifting on the client.  When msiexec runs the .msi (and/or .msp, or .msi + .mst, etc.), msiexec handles the return value by evaluating the execution process as it progresses.  If it bombs out, you get back an exit code that is "non zero" (remember: in most cases, a zero value indicates "success").

When your package/program executes an .EXE, the CMD/explorer shell process handles the resulting exit code.

In both msiexec and .exe situations, the handlers (msiexec and cmd/explorer) pass the result exit code back to whatever called them (i.e. Configuration Manager agent).

When you call a script, it introduces a "sort of" proxy situation.  The script handler (cmd for .bat or .cmd scripts, kix32.exe for .kix or .kx scripts, powershell for .ps1 scripts, or wscript.exe or cscript.exe for .vbs or .js scripts, and so on...) does not automatically "raise" the exit code from a scripted task up to the calling process (Config Manager agent).  Instead, the handler will return an exit code based on whether or not the script itself completed or not.  If, within the script code, you forcibly raise an exit code, it will respect that and pass that value up the stack to the calling process.

So, let's give an example:

  1. You make a Config Manager Package and Program that calls a .CMD script
  2. Inside the .CMD script you execute a msiexec /I <filename.msi> /quiet /norestart
  3. The .msi installation fails with exit code 1604
  4. The .cmd script returns 0 to the Configuration Manager agent (e.g. "success")

Why?  Because the .cmd completed successfully even though the msiexec task failed.

What to do?

The specifics of how to "raise" an exit code depend on the scripting language being used.  For .cmd and .bat script, use the EXIT statement followed by the value you wish to raise to the calling stack.  You can give an explicit value, such as 33, or you can pass the %errorlevel% value, which will temporarily hold the value of the last error.  If you check for the %errorlevel% immediately after the msiexec execution, you can capture the value, and then raise it accordingly.

Here's a short example:

@echo off
msiexec /I "%~dp0fubar.msi" /quiet /norestart
if %errorlevel%==0 (
   echo installation successful >>%logfile%
) else (
   if %errorlevel%==3010 (
      echo installation successful [reboot pending] >>%logfile%
   ) else (
      echo installation failed [exit code: %errorlevel%] >>%logfile%
      exit %errorlevel%
   )
)

The 10th line is where the exit code is raised to whatever is calling this script.  So if the msiexec process fails with error 1619, it saves that value in the CMD %errorlevel% variable.  Then in the script, we pass %errorlevel% up using the exit command.  When it fails, and the script passes the value back to the Configuration Manager agent, it reports back to the site server that it failed with error 1619.  All is well in the Universe.

What happens when a vendor's wonderful setup.exe doesn't properly return an expected exit code when it fails?  What?!!!! (insert 1980's vinyl album scratch sound here)

Did I just say that vendors might actually have produced less-than-perfect installation packages?  Is this even possible?  OH NO HE DIDN'T!!  OH SHIZNIT!  OH SNAP-STICK!  What now?

Yes.  Unfortunately, the ugly, brutal truth is that there are many, many, many such pieces of fecal matter labeled as "installation" files or packages.  Some come from widely-known, huge, corporate vendors, while a larger number come from smaller shops where they feed chained wild monkeys bags of Skittles and Kegs of Mountain Dew and whip them with Chinese egg noodles until they produce installer files.

What to do?

You have to get creative and wrap their crap in some script to perform additional checks and double-checks, and raise your own custom errors.  I call this a "crap wrap", because it wraps crap.

FWIW: I have my own definition of "crap installer" >>> Any installer that is not a 100% pure MSI file is crap.  Period.  I f-ing hate setup.exe, and setup.exe bootstrap installers.  NullSoft is crap also (silent installations are ok, but silent uninstalls are horrifically f**ked).  And anyone who sells you a .zap file should be shot on site (I'm not including those of you that have to make your own .zap files, we share the same pain). 

I make one exception to this rule: self-contained applications.  Things like Sysinternals' PSTools, where you don't really "install" anything, you simply copy/download the .exe and it's ready to go.  I wish more apps were that well-packaged actually.  Imagine if Autodesk provided Inventor 2012 as a self-contained application that required NO installation process.  OMG.  I would need a Kleenex.  (don't even try to suggest App-V or ThinApp as being in this category, they are not).

In any case, back to the subject:

When one thing calls another, you need to examine what each down-level process returns up the stack, as it were.  Using a virtual machine environment is great for this, as is using the good-ole CMD shell to perform command line diagnostics along the way.

I'd go on longer, but I'm out of brain power right now... I need more pizza.

Read More
Posted in applications, deployment, installation, packaging, programming, scripting, software deployment, software packaging | No comments

Monday, 1 August 2011

Once Upon A Time, There was Imagination

Posted on 18:55 by Unknown

I've ranted about this before, but today marks the crossing of yet another milestone on the journey to pissedoffness.  I've about had it.  After driving around town doing errands today, and letting my brain do its usual blanking out of the mundane and the trivial, it suddenly decided to turn off the mundane-and-trivial-blocker service and let it all flood in.

It dawned on me a strange irony that is present-day American culture.  A dominance of corporatocracy and serfdom. Matching redundant duplication of replication redundancy.  Brands and logos everywhere.  Mass-produced "individualism" on sale for low downpayment and no payments for six months on approved credit.  Other terms may apply. See store for details.

The freedoms and personal latitude our forefathers and foremothers gave their lives to establish and defend are being squandered.  They fought to allow the individual to become an individual in this unique country.  No more.

The irony isn't the corporatocracy or the logos or the mass production, not even the massive bombardment of media marketing from all sides.  It's the fact that the brands and products and practices themselves were borne from the ideas of unique people trying desperately to be "different".

DIFFERENT.

Remember that word?

conformity3

The message in the caption above is what corporate America has driven home like a well-oiled machine.  It's wrong. Unique IS useful.  Unique is what built every landmark and monument to American ingenuity we now travel to visit and point at and gawk at and wonder how it was ever accomplished.  Every masterpiece of art.  Every masterpiece of music and poetry.

Jack Daniels wasn't trying to be like every other whiskey maker.

Bill Harley and Art Davidson weren't trying to make yet another common motorcycle.

Henry Ford wasn't trying to make the same truck everyone else was making.  Yes, you can argue he established the assembly-line concept of American manufacturing, but he wasn't following anyone else on the design of his vehicle lines.

The people the dreamed of huge skyscrapers, bridges, dams, canals, tunnels, trips to the Moon, satellites to other planets and beyond, all weren't focused on being like everyone else.

Jimi Hendrix was definitely NOT trying to copy anyone else.

Everything we defer to as being "original" was born from an original mind.  Not the mind of someone trying to be like everyone else.

After decades of gradual mental erosion, media branding and careful programming of TV, radio, movies, games and the Internet, we now have a generation successfully converted into obedient servants of corporate marketing.

Look around.  How many SUV's look alike.  Ford Mustangs.  Dodge Chargers.  Chevy Camaros.  "Rice-Rocket" motorcycles.  Cruising "Harley" style and chopper motorocycles.  How many bikers wear the same fucking retarded Nazi helmets, the same leather vests and boots, and how many people sport the EXACT same celtic pattern tattoos?  The same visor hats with the same sunglasses propped up on top.  The same shoes and flip-flops.  The same hair styles.

Individualism is dead.  Whenever I see some kid roll past looking really unique (blue/purple hair with half-shaved head, etc.) and the rest of the folks say "what's that?" and snicker, I want to say "that was the individual you should've been but will never be."  What was once the mighty marching song of an entire nation and way of life, heard around the world, is not a whimper with a catchy name stamped on the side of a fast-food marketed plastic cup.

With every Disney movie we drag our young kids to, and every stuffed movie character toy, plastic toy, drink cup, matching pajamas and Wii/XBox360/PS3 game, we deliver the same message to them: be like everyone else.

I'm as guilty as everyone else.  I dragged my kids through the Disney movies, the Chuck-E-Cheese parties, encouraged them to do the same things all the other kids were doing because that's what all the other parents at the time were doing as well.  I think it all started with smarter toys that began making their own sounds and doing their own talking.  Once children no longer felt compelled to make sounds for their toy cars, helicopters, trains, rockets, and dolls, the game began to change.  Then came cable TV and 24/7 programming.  Then came the Internet, and with each of these incredible inventions there is less time for everyone, especially kids, to just sit and let their minds wander and CREATE.  Everyone is too busy now.  Leave a kid in a room for 20 minutes now and they're anxious to find the nearest iPod, iPhone, or game controller and escape their boredom.

Even movies have slipped from building mock-ups and scaled models to computer graphics.  What effects and explosions used to impress us at the theater are now met with yawns and attention-diverted texting in the aisles.  Kids "know" it's fake, but when we were younger we at least knew that the models were built and explosions were setup and detonated and people really jumped from high places, not in front of green screens.  Kids know there's no Santa and no Easter bunny.

I have no idea where this rant is going.  Probably nowhere.  Probably making no meaningful or valuable point either.  But whatever, it's sad that the bikers I grew up with in the 1970's had built their bikes from spare parts and got their leather rags from a yard sale or a dumpster and lived on the road, while today suit-wearing attorneys step into their walk-in closet to drape themselves in the exact replica wardrobe purchased online, with the matching dew rag pirate cap, shortie helmet, and boots, then hop on their standard factor "custom" chopper to play pretend-biker for a weekend.  They sit at the traffic light next to three identical black or red Ford Mustangs or Chevy Camaros or Dodge Chargers.  Every arm has the same Celtic tattoo.  The same music blaring.

The infamous "red neck" trucks and SUVs are all the same.  Same lift kits.  Same window decals.  Same rebel flags.  Same stupid truck-nuts dangling.

Black folks are no better off than standard-issue white folks either.  Not even Asians or Hispanics are better off.  I see the same conformity in their circles too.  The same clothing styles.  The same custom tricks on their cars, bikes, scooters and skateboards.  Same tinted windows with the same chrome wheels.  Same music blaring from the open windows.

Same - same - same - same - same...

Wash. Rinse.  Repeat.

We are slowly sinking into the same blender, from multiple holes in the top, only to end up in the same chum bucket in the end.

RIP Indivuality - it was nice to have known you.

Read More
Posted in culture, people, society | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

Categories

  • a
  • activation
  • active directory
  • advertising
  • agile
  • agility
  • amazon
  • american
  • apple
  • application virtualization
  • applications
  • art
  • articles
  • asp
  • augi
  • authors
  • autocad
  • AutoCAD Autodesk
  • autodesk
  • autolisp
  • automation
  • automotive
  • backups
  • batch
  • beer
  • beta
  • blackberry
  • blogs
  • bongloads
  • book
  • books
  • Books writing kindle amazon technology business projects
  • browsers
  • business
  • cad
  • career
  • certification
  • chrome
  • city government
  • civilization
  • cloud services
  • cmd
  • cmmi
  • comedy
  • command
  • community
  • computers
  • conferences
  • config manager
  • consultants
  • consulting
  • contracting
  • cranium drainium
  • crapware
  • culture
  • data center
  • data mining
  • databases
  • deployment
  • directx
  • DLL
  • domains
  • dumb
  • earth
  • economy
  • editor
  • education
  • election
  • elections
  • employment
  • engineering
  • entertainment
  • environment
  • error monitoring
  • events
  • exchange
  • facebook
  • family
  • firefox
  • flexnet
  • fud
  • fun
  • funny
  • games
  • gary vaynerchuk
  • gmail
  • google
  • government
  • group policy
  • hampton roads
  • health
  • history
  • holidays
  • home
  • html5
  • humor
  • hyper-v
  • iis
  • industry
  • infrastructure
  • installation
  • installshield
  • internet
  • internet explorer
  • interviews
  • jobs
  • jtbworld
  • kindle
  • kixtart
  • lab setup
  • languages
  • ldap
  • learning
  • legal
  • licensing
  • life
  • lifecycle
  • linux
  • lisp
  • logging
  • management
  • manufacturing
  • marketing
  • markets
  • mdop
  • mdt
  • medical
  • messaging
  • microsoft
  • microsoft access
  • military
  • mountains
  • movies
  • mozilla
  • music
  • nature
  • network administration
  • news
  • nook
  • nothing
  • office
  • open source
  • openoffice
  • opera
  • operating systems
  • oracle
  • osx
  • packaging
  • patches
  • people
  • photos
  • podcasts
  • policy
  • politics
  • powershell
  • predictions
  • process automation
  • products
  • programming
  • projects
  • psychology
  • publishing
  • rail
  • reading
  • registry
  • religion
  • reporting
  • reviews
  • rsat
  • rss
  • safari
  • safety
  • sales
  • satire
  • sccm
  • scheduling
  • science
  • scripting
  • search
  • security
  • servers
  • services
  • sharepoint
  • shopping
  • sms
  • social stuff
  • society
  • softgrid
  • software assurance
  • software deployment
  • software development
  • software packaging
  • sony
  • speaking
  • sports
  • sql express
  • sql server
  • statistics
  • Statistics news marketing
  • steve jobs
  • stories
  • stuff
  • stupidity
  • symantec
  • sysinternals
  • system center
  • systems architecture
  • t-sql
  • taxes
  • technet
  • technical support
  • technology
  • TED
  • ted talks
  • testing
  • textpad
  • thoughts
  • traffic
  • training
  • transportation
  • travel
  • troubleshooting
  • tutorials
  • twitter
  • ubuntu
  • unattend
  • unemployment
  • updates
  • upfront ezine
  • utilities
  • vacation
  • vba
  • vbscript
  • video
  • virginia
  • virginia beach
  • virtualization
  • visual lisp
  • vmware
  • vmware server
  • voting
  • war
  • weather
  • web
  • web browsers
  • web development
  • web sites
  • windows
  • windows 7
  • windows live
  • windows server
  • windows server 2012
  • windows8
  • winpe
  • wise
  • wmi
  • work
  • writing
  • ws08
  • wsus
  • wwa
  • x64
  • xml
  • ze frank

Blog Archive

  • ►  2013 (37)
    • ►  October (1)
    • ►  September (5)
    • ►  August (8)
    • ►  July (2)
    • ►  June (4)
    • ►  May (4)
    • ►  April (2)
    • ►  March (2)
    • ►  February (8)
    • ►  January (1)
  • ►  2012 (120)
    • ►  December (14)
    • ►  November (12)
    • ►  October (10)
    • ►  September (7)
    • ►  August (3)
    • ►  July (2)
    • ►  June (6)
    • ►  May (6)
    • ►  April (20)
    • ►  March (16)
    • ►  February (18)
    • ►  January (6)
  • ▼  2011 (343)
    • ►  December (15)
    • ►  November (23)
    • ►  October (27)
    • ►  September (35)
    • ▼  August (29)
      • My Favorite Tweeters
      • Patching AutoCAD Civil 3D 2011 and 2012
      • A Small Favor to Ask
      • Package Scripting 101, with Fries and Coke
      • FLEXlm and your IT Department
      • PowerShell vs VBscript: Part 2
      • Google+
      • Hurricane Irene
      • What I'm Using
      • Hurricane Games
      • Expiration Date
      • Dave's Hurricane Survival Guide
      • Proper Use of Capital Punishment
      • Autodesk Scripts: TKO
      • American Society
      • Book Pricing Announcement
      • Light Rail in Hampton Roads
      • Dumbest Roads in Hampton Roads
      • Which PowerShell?
      • Script for Removing Civil 3D 2011 with Configurati...
      • Uninstall AutoCAD 2011 via Configuration Manager
      • Semi-Showdown: VBscript, PowerShell / ADO, ADO.NET
      • Autodesk Design Review 2011 - Uninstall Notes
      • An Official Apology about my comments on VBscript ...
      • MSIExec Exit Codes in Script
      • Bullshit Monopolies
      • Society
      • Scripts Calling Scripts, and So On...
      • Once Upon A Time, There was Imagination
    • ►  July (17)
    • ►  June (23)
    • ►  May (20)
    • ►  April (38)
    • ►  March (61)
    • ►  February (54)
    • ►  January (1)
Powered by Blogger.

About Me

Unknown
View my complete profile