Windows Tech Support

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

Saturday, 29 September 2012

Publishing Your Own E-book

Posted on 12:14 by Unknown
Someone asked me how hard is it to publish your own e-book.  The answer is: It's easy.

The hardest things about it are (A) deciding on what to write about, and (B) spending the time writing and editing.  Besides that, the technical part is amazingly simple, but there are a few small things to watch out for. Ultimately however, this is an exciting time to try on your author hat and see where it can take you!

Tools

You can use all sorts of software products to "author" or write your e-book.  I prefer Microsoft Word, but some authors find that absurd.  However, you can make some adjustments in Word to avoid the pitfalls that many Word-haters cite as reasons to avoid using it.  I'll touch on that under "Tricks" later in this article.

The other "tool" you'll need is something to convert from the writing/editing output into the publishing format. Most e-book readers can open EPUB and MOBI files, however, Amazon Kindle won't open EPUB.  There are quite a few other formats as well, but EPUB and MOBI are the most common.  (for a comparison/explanation, check this out).

Amazon actually converts your content into their own AZW if you choose to lock down the digital publishing rights (something you should do if you don't want people making copies of your book and sharing it for free).  I have tried several such products, even Amazon's own KindleGen, but I've settled on Calibre, which is a free converter and library manager for Windows, Mac and Linux.

KindleGen is also nice, but it's a bare-bones converting tool.  In fact, it has no graphical interface (GUI), it's a command-line tool, but fortunately it's not difficult to use.  The download from Amazon is a .ZIP file, so you need to extract the kindlegen.exe file out from the .ZIP file in order to use it.  After you extract it to a folder, right-click on that folder while holding down your SHIFT key, and select "Open Command prompt here".  You can also click the Start button, and type CMD and press Enter, then use the age-old DOS command "CD" to switch to the folder, then type "kindlegen" to view the usage information. I figure if you can suffer through my idiotic ramblings this far, you're probably capable of figuring out the rest from here. :)


Tricks

As I mentioned above, if you want to use Microsoft Word to write your book, you'll want to make a few changes to formatting to avoid problems during the conversion process.  For Word 2010, click the "File" tab, click "Options", select "Proofing", and click the "AutoCorrect Options..." button.


Select the "AutoFormat As You Type" tab, and de-select (disable/un-check) the following options:

  • "Straight quote" with "smart quotes"
  • Fractions (1/2) with fraction character(1/2)
  • Hypens (--) with dash (--)
  • *Bold* and _italic_ with real formatting


Other things to be careful with are the use of borders and tables, and nested indenting.  E-book readers tend to apply their own formatting voodoo on top of the final output, and these objects tend to confuse some of them pretty badly.\

Tips

I don't recommend trying to write an e-book if you don't already have an e-book reader.  The good news is that today (in 2012), you can read e-books in a web browser, on your phone, in a dedicated reader application, as well as on smartphones, and physical reader devices and tablets.  The array of options is pretty amazing actually.

If you don't own (or borrow) an Amazon Kindle or Kindle Fire, or a Barnes & Noble Nook, or a Sony Reader, or whatever, I strongly recommend you go buy one first.  Why?  Two reasons:
  1. You need to become familiar with the end-user experience.  It helps to understand what your readers (customers) will see when they pay hard-earned money for your works.
  2. You need a means for testing the output prior to publishing it for purchase.  You'd be surprised how many times you will copy and re-copy your e-book to the device to fix formatting errors, and make corrections that you only happen to see on the reader device.
While the "cloud" readers are fine, most of your customers are likely to read your works on a dedicated reader device.  If you plan on publishing through Amazon, I recommend getting a Kindle or Kindle Fire.  Each market tends to favor a certain class of device however, so make your choices accordingly.

The Business End Low-Down

Each publisher has their own particular set of rules and guidelines, so I strongly urge you to review each of them, and weigh the potential marketing prospects, to decide which you intend to use.  Some will actually place limits on whether you can publish a particular work through other sites or publishers. Be careful!

I've used Amazon, Barnes & Noble and Google Play.  Of the three, I prefer Amazon.  Amazon offers two royalty rate options, and a variety of tools such as Lending, and Kindle Select, as well as control over free "offers" to help you tailor your marketing goals to suit your needs.

Basically, the way the "model" works is you upload and publish for "free".  Amazon earns revenue off of a percentage of each sale.  You can choose a 70% or 35% royalty rate, where each has its unique limitations and benefits.  For details about Amazon's KDP pricing options, go here.

Royalty payments are disbursed at the end of each sales period, or roughly every 30 days.  They will also send you an e-mail to let you know in advance what will be deposited into your bank account (if you choose direct deposit).

Unless your book is a major "hit", don't expect to retire from our day job (unless your day job happens to be writing e-books).  I will admit my book sales don't come anywhere close to those of Dan Brown or J.K. Rowling, but I earn enough to cover lunch costs and fill my gas tank most of the time.  Is that bad?  Not really.  I fully realize the niche market my books are aimed at, so I don't expect high volume sales.  But every bit helps.  As for taxes: Amazon, like all the others, sends you a 1099 form to help you file your tax return appropriately.

Conclusion

If you've been putting off writing a book, maybe now is the time to reconsider.  It has never been easier (and more affordable) to get your material out into the world, and earn a little income from it as well.  Anyone who has a little creative spark for writing stories, or writing about their own experiences, or skills or ideas, or whatever, can now produce their own e-books to a thriving market with the potential to do very well.  The traditional approach to getting a printed book published is becoming increasingly more of a challenge, and more costly.  E-book publishing makes it possible to do it yourself and with greater control over the process and the content as well.
Read More
Posted in amazon, books, publishing, thoughts, writing | No comments

Thursday, 27 September 2012

VMWare vs. Hyper-V on the Desktop

Posted on 19:11 by Unknown
This is a "review" in my own words, based entirely on my own personal experiences.  I have not been compensated or rewarded in any way whatsoever by anyone for what I write (although, I sure wouldn't mind it if someone wanted to compensate me for my stupid ramblings).  So, here goes...

I upgraded my computer to Windows 8, and decided to add the Hyper-V "role" because my CPU supports Second Level Address Translation (SLAT).  There were (ok, ARE) two main reasons I wanted to try out Hyper-V 3.0:

  1. Hyper-V is included with Windows 8 at no additional charge
  2. VMware Workstation 8.x has been annoying as shit to me for too long

Annoying?  Really?  Yes!  I run VMware Workstation 8.x on a Windows 7 SP1 64-bit machine with 16 GB of memory, and a separate, dedicated internal hard disk for my guest machines.  Even so, I've been dealing with problems such as hanging when trying to power-down guest machines (especially 64-bit guest machines), and issues with guest machines not opening after installing incremental updates such as 8.0.4, etc.

So, after reading articles like this one on TechNet, this one on Windows IT Pro, and this one on 4SysOps, and hearing podcasts give glowing reviews about how awesome Hyper-V 3.0 is, I decided I have to give it a try.  I have been using VMware Workstation since the first public release.  I've also used GSX Server, VMware Server, VMware Player, ESX Server, but never used any of the vSphere product line.  I've never used Virtual Server or Hyper-V either, so I've been kind of immersed in the world of VMware for a long time.

When I finished loading up and configuring my Windows 8 desktop, I added Hyper-V and started kicking the tires.  By the way, if you want to run Hyper-V 3.0 and VMware Workstation 8.x "side by side" on Windows 8, it can be done, but you need to configure a few things.  Here's a rather good rundown on how to do that.

A Little Background

Keep in mind that one of my primary job functions is software "packaging", "re-packaging" and testing software installation and configuration "deployments".  These are basically fancy terms for preparing some crappy software from a half-assed software vendor so that it can be installed "silently" on thousands of computers over a single night.  By "silent" I am referring to making a pre-configured installation that doesn't display any dialog forms or require any user input.  They just install quietly and hopefully all is well on the other end when the user shows up and double-clicks the shiny new shortcut in the morning.

A fairly typical "setup" for doing this sort of work involves building several virtual machines (aka "guest" computers), or "VM's" to suit a variety of environmental conditions to support the packaging process.  This often includes having one VM that is set for "host-only" networking (can't connect to any outside resources, remote servers, the Internet, nothing at all), another that is set for NAT, and another set for Bridged mode, which mimics being a "real" computer directly on the network LAN with it's own IP address.

The "host-only" VM is helpful for ensuring the desktop environment within the VM is isolated and protected from outside influences and manipulation.  This includes anti-virus scanning, firewall issues, Group Policy, outside scripts and programs, unplanned remote connections, and pretty much anything that could possible interfere with a "clean" state analysis and state capture. (note: a "state capture" is when you capture two states of the configuration and compare them to identify every single change that occurred in between).  Outside influences and ruin attempts to capture a clean system state when dealing with complicated software installation and configuration analysis.

The "NAT" or "Bridged" VM is helpful for testing the final deployment package to ensure it (A) installs properly on a computer that is configured identical to a "real" production computer, and (B) provides a non-production target that won't impact anyone else if it crashes, fails or needs to be rebooted multiple times.

Absolute Essential Features

There are some basic features that are critical to have available within each of these VM configurations:

  • Snapshots
  • Client/Host Integration (i.e. clipboard, shared folders, etc.)
  • Dynamic ISO mounting
Both VMware Workstation 8.x and Hyper-V 3.0 support all three of these features, however, there are some HUGE differences that really surprised me.

Snapshots

A "snapshot" is simply a captured state of a virtual guest machine that allows you to return to it at a later time, after, say, you've hosed it up really bad and need to get "back" to a point where it was in good shape.  VMware Workstation supports making multiple (read: limited only by available disk space) snapshots.  Hyper-V 3.0, as far as I can tell, only allows you to maintain one snapshot per virtual guest machine.

VMware Workstation gives you a fairly decent little GUI dialog form to browse your library of snapshots to help you organize and decide which to use at any given point in time.  It also makes it easier to "clone" a guest machine to create another by selecting a particular snapshot to make the clone from.

As far as I can tell, Hyper-V 3.0 not only limits you to one snapshot per guest machine, but provides no GUI interface for dealing with the snapshot, nor does it provide a "cloning" feature.


Client/Host Integration

One of the features I rely upon heavily is the ability to copy objects (files, folders, etc.) from my physical computer environment into my virtual guest machines, and do the same in reverse.  This isn't just a "nice feature".  This is a MUST.  I need to quickly copy files into my "host-only" virtual guest in order to perform installations, run configuration changes, collect diagnostic and state information, and extract the results back out to other environments to support the repackaging process and the testing process.

VMware Workstation provides two features to help with this:  Guest Isolation and Shared Folders.  Hyper-V 3.0 offers a "text-only" clipboard, and only in one direction:  Host-into-Guest.  Not useful for my needs at all.


The "Shared Folders" feature is a feature in VMware Workstation that lets you connect a network location inside the virtual guest machine to a physical folder or share, either on the physical host (the computer running VMware Workstation), or a UNC share path on a remote server.  Hyper-V 3.0 does not offer this feature.

Mounting ISO Files

This term refers to controlling the use of the CD/DVD drive within a virtual guest computer by configuring it to open a .ISO file rather than connect to the physical CD/DVD drive on the physical host computer.  Both Hyper-V 3.0 and VMware Workstation (and the "free" VMware Player product) support mounting .ISO files to the virtual CD/DVD drive.

Conclusion

We've all heard the Microsoft gets things right by version 3.0, but not in this case.  Yes, it's "free", sort of, but does not kick VMware Workstation off the playground?  Maybe if you just like to play around in virtual machines, which it handles just fine.  But if you do serious work that requires any of the features I've discussed above, the answer is NO.  I simply cannot dump VMware Workstation right now, it does what I need, while Hyper-V 3.0 does not.  In fact, I may have to consider upgrading to VMware Workstation 9.

Am I giving up on Hyper-V 3.0?  No.  I will keep using it, because I want to gain familiarity with it and learn some new tricks (I'm not dead yet, after all).  I may follow-up on this as I learn new things along the way.

What would change my mind?  If Hyper-V 3.x (or 4.x) were to provide the following features I would probably switch over:
  • Drag-and-Drop clipboard between host and guest
  • Shared Folders
  • Multiple Snapshots
  • A GUI snapshot manager
Until that happens however, I will continue to play around with Hyper-V but I can't rely on it for getting my daily work done on time.
Read More
Posted in hyper-v, network administration, operating systems, software deployment, software packaging, virtualization, vmware, vmware server, windows8 | No comments

Saturday, 22 September 2012

Notes from the Lab: Migrating to Windows 8 / Windows Server 2012

Posted on 15:37 by Unknown
My home lab is a Windows Server 2008 R2 Active Directory domain with a few Windows 7 clients.  The domain is hosted entirely on one domain controller, which also hosts quite a few other roles and features.  Windows 7 clients are all Service Pack 1 with the latest updates installed.  The server was also on the latest Service Pack and latest updates.  All computers are physical hardware.  None were/are virtual machines.  The "server" is a Dell Precision 390 workstation.  The desktops are a mixture of various Dell Inspiron and OptiPlex models.
(not really my lab, but I wish it was this sophisticated and cool looking!)

Preparation

I captured full System backups of my primary desktop and my domain controller server prior to embarking on this adventure.

Migrating the Desktops

I started by running the in-place upgrade on one of my Windows 7 64-bit clients to Windows 8.  The Windows 8 setup checker warned that I had to uninstall a few apps before it would allow me to continue, due to reported compatibility issues.  Namely, ATI Catalyst Install Manager, and the WSUS Admin Console, but it also warned I need to de-authorize my computer within iTunes.

After doing this, I had to reboot, and then kick off the Windows 8 setup again.  It ran through just fine and everything appeared to be in good shape on the other end.  Total time: about 1 hour.  Media: USB thumbdrive.

The applications I had installed and working fine on Windows 7:

  • Office 2010
  • iTunes 10.7.0.21
  • Adobe Reader X  10.1.4
  • Google Chrome 21.0.1180.89
  • Google Picasa 3.8
  • Paint.NET 3.5.10
  • TextPad 6.1.3
  • VMware Workstation 8.0.4
  • LogMeIn (free version)
  • Citrix Receiver
  • 7-Zip 9.20
  • WMI Code Creator (WMICC)
VMware Workstation 8.0.4, and VMware Player 4.0.4 both had issues when I tried to launch my guest virtual machines.  The error said I have an incorrect version of vmci.sys. (see image below).  So I re-ran the latest installer package for 8.0.4, which uninstalls the current setup and then installs it all again.  After doing this, both VMware Workstation and VMware Player worked just fine and were able to power on and support my guest VM's. (note: I know that the vendor says 9.0 supports Windows 8 as a key feature, but I wanted to see how 8.x would work out).


Migrating the Server

Next, I ran the Windows Server 2012 (Standard Edition) upgrade on my 2008 R2 domain controller.  I did this via RDP with a different USB thumbdrive.  It's worth noting that this is a workhorse server and hosts quite a few roles and features, which pretty much violate "best practices" guidelines, but hey, I know for a fact I'm not alone when it comes to having to "make do" with limited hardware budgets.  This server hosts:

  • Active Directory Domain Services (domain controller)
  • Internet Information Server (IIS) for both WSUS and software development
  • File and Print shares
  • WSUS 3.0 for managing patches and updates
  • Automation Server: scripts and scheduled tasks for managing all sorts of daily/nightly chores
  • Backup Services: backups from clients and the server to an external drive

Again, the Windows Server 2012 setup checker ran through and checked my system for potential issues prior to letting do the actual upgrade.  It warned me to uninstall WSUS 3.0 and verify "third-party applications compatibility", but didn't explicitly name any.  The only thing I could figure was my APC "PowerChute" UPS software, but I left it as-is.

It also said I had to run ADPREP /FORESTPREP and then ADPREP /DOMAINPREP before continuing.  You can find ADPREP.exe on the installation media under \support\adprep.  After uninstalling WSUS (content, logs and database) I rebooted, and started Windows Server 2012 setup process again.  After it warned me about the "third-party" issues, it allowed me to continue, so I took a deep breathe and pushed the button.  Total time: about 1 hour 20 minutes.

Afterwards, I went into the Server Manager console, went into Roles and Features, and added the Windows Server Update Server role.  Then I ran the post-install configuration tasks to setup the options to function as my domain WSUS server.

Interesting Notes

Some things I found that needed to be resolved after the server was migrated, some were quick and easy, some took a little digging around:

Group Policy Objects

I have a GPO named "Drive Mappings" that has drive letters mapped to shares on my server for user documents, photos, videos, and software utilities.  Each of them are configured via Group Policy Preferences, and each drive is mapped via "Replace" and the "Reconnect" option was checked.  This DID NOT WORK on ANY of my Windows 8 clients.  But after researching this a bit (see link1 and link2), I found it was due to two things:
  • I was logging on with an account that has local Administrator rights (this reportedly does not occur with users who do not have local administrative rights, but I didn't have time to test this yet)
  • The "Reconnect" option was checked
After, un-checking the "Reconnect" option, the drives began mapping correctly.

WSUS

After letting WSUS bake-in for 30 minutes or so, I was concerned about not seeing any computers reporting in.  I ran GPUDPATE /FORCE on several of the clients, as well as WUAUCLT /DETECTNOW, but still none were reporting in to the WSUS server.  After reading through the WSUS configuration notes for 2012, I discovered that it had reconfigured the web service to respond on port 8530 (HTTP) and/or 8531 (HTTPS), but I was only using HTTP.

So, I went into my GPO settings, and edited the setting "Specify intranet Microsoft update service location" to append ":8530" onto the existing URL entry.  The setting is found under Computer Configuration / Policies / Administrative Templates / Windows Components / Windows Update.
After saving the changes, I went back to some clients and ran GPUPDATE /FORCE, and then WUAUCLT /DETECTNOW.  Within two minutes the clients started appearing in the WSUS console.

The Dreaded Start Screen

I tried REALLY REALLY hard to warm up to the Windows 8 Start Screen, but I can't do it.  It makes sense for a tablet (e.g. touch-screen) interface, but for a mouse and keyboard I cannot find ANY rationale that it can be "as" efficient to use the Metro tiles rather than the traditional Desktop.

My friend and co-worker Chris DeCarlo pointed me to the ClassicShell application on SourceForge, which suppresses the Start Screen and installs a Windows 7-ish Start Menu.  With that in place I find Windows 8 to be pretty nice, but I still am forcing myself to try the tile interface as often as I can just to give it a fair trial. ClassicShell is impressively built, and has a lot of attention to detail.  However, I doesn't seem to show a "Computer" link on the right-hand side, nor does it apply the "Pin to Start Menu" feature consistently (trying to pin Internet Explorer to the Start Menu only adds repeated shortcuts on the "Programs" fly-out menu).  All in all, however, it's a gotta-have for my needs and I really like it.

Miscellaneous

If I were asked to rank the applications I use most often, on a typical day, it would probably look like this...
  1. Internet Explorer and Google Chrome (a tie)
  2. SQL Server Management Studio
  3. TextPad
  4. Microsoft Outlook
  5. WMI Code Creator
  6. Windows PowerShell ISE
  7. Snipping Tool
  8. Paint.NET
One that might be easily overlooked is number 5 (WMIC).  But I live in that application quite often as I do a fair amount of work with WMI and WBEM scripting.  One thing I noticed immediately as that the CIM namespaces list continues to grow with each major Windows version release.  In fact, it took about a full minute for the list to fully populate the first time I opened the application. Not a huge deal obviously, but something I found interesting (and nice!)


Windows.old

As with previous Windows version "in-place" upgrades, the original environment is backed up into the "Windows.old" folder located in the root of the system drive.  If you try to delete this folder, you will be smacked in the face with a cold, wet, dish rag that has the phrase "Access Denied!" embroidered across it.  That's true whether you try to delete it as an Administrator account, opening a CMD console using "Run as Administrator" or by running a script under an elevated user context.

The solution is to run the Disk Cleanup utility provided with Windows 8.  Be sure to click the "Clean up system files" button, otherwise you won't see the option to check "Previous Windows Installations".



Conclusion

The only thing I really miss right now is not having a CPU that supports SLAT, so I can't run HyperV 3.0.  At work I have a computer that does, and it runs HyperV 3.0.  I'd really like to expand my horizons and learn more about the Microsoft side of virtualization and "now" seems like the right time to do so.  For now, I'm using VMware Player and it seems to work very well on Windows 8.

As for "Metro" (or whatever Microsoft decides to call the Windows 8 UI/UX), I like it.  I've always like the flat, spaceous, simplified look over the Aero or XP motif.  What some people don't realize is that Google was actually putting a "metro"-ish UI on much of their web applications like Gmail, Docs, and so on.  I'm talking about the now-familiar 2D motif, fat-border outlined regions and tables, padded flat buttons, and ample use of white space to achieve a simplified look. As to who came up with that concept first is anyone's guess.  I assume it was "invented" years ago and simply rediscovered, as is often true with many "new" things these days.

In any case, Windows 8 is growing on me and I intend on keeping up with it.  Not simply because I work in the IT field, but because I kind of like shiny new things.
Read More
Posted in active directory, group policy, lab setup, network administration, testing, windows server, windows server 2012, windows8 | No comments

Monday, 17 September 2012

Windows Scripting Host Sucks on 64-bit Windows

Posted on 19:47 by Unknown
Here's an example of something I've known about for years, but somehow forgot, and at the most inconvenient time: Windows Scripting Host SUCKS on 64-bit Windows.  I'm almost ready to dump VBScript for good and move on with PowerShell after this.  There is a workaround for this, but it's stupid.  It's beyond stupid.  It's pathetic.

The code below looks for the Uninstall key value named "DisplayName" for 7-zip 9.20 on a Windows 7 64-bit computer.  The first key path returns "null".  The second key path returns the appropriate version "9.20.00.0"

[CODE]

Set objShell = CreateObject("Wscript.Shell")

Const HKEY_LOCAL_MACHINE = &H80000002
Const appGUID = "{23170F69-40C1-2701-0920-000001000000}"
Const vName = "DisplayName"

kPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
kPath2 = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"

wscript.echo RegValue(kPath1 & "\" & appGUID, vName)
wscript.echo RegValue(kPath2 & "\" & appGUID, vName)

Function RegValue(key, v)
Dim objRegistry, strValue
Set objRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}" & _
    "!\\.\root\default:StdRegProv")
  objRegistry.GetStringValue HKEY_LOCAL_MACHINE, key, v, strValue
RegValue = strValue
End Function

[/CODE]

The screen capture below shows the Registry key and its values.  Note the path shown in the Status Bar along the bottom.  This is the default location under HKLM\Software\Microsoft.


When you install most 64-bit applications, this is where they will record their Uninstall information.  If you install a 32-bit application however, it puts the information under HKLM\Software\WOW6432Node\Microsoft\...


Note that the Uninstall GUID for 7-Zip 9.20 doesn't exist under the Wow6432Node tree.  It only resides under the default tree.  This can get really messy when you start installing 32-bit applications on 64-bit Windows 7.  And before you think that's easy to avoid, think again.

The problem is that CScript under the C:\Windows\SysWOW64 path only looks under the Wow6432Node tree for anything.  Even when you use the ExpandEnvironmentStrings method of the Shell object, it will expand the variable using what it finds here.

For example, if you execute the following VBScript code on a 64-bit machine...


[CODE]

Set objShell = CreateObject("Wscript.Shell")
wscript.echo objShell.ExpandEnvironmentStrings("%programfiles%")
wscript.echo objShell.ExpandEnvironmentStrings("%programfiles(x86)%")

wscript.echo objShell.RegRead("HKLM\SOFTWARE\WOW6432Node\" & _
  "Microsoft\Windows\CurrentVersion\CommonFilesDir")
wscript.echo objShell.RegRead("HKLM\SOFTWARE\Microsoft\" & _
  "Windows\CurrentVersion\CommonFilesDir")

[/CODE]

Notice the path of CScript.exe I invoke in the output capture below.  Note the impact each has on the output also...







Compare the two Value collections under each Registry key path.  The path is shown in the Status Bar along the bottom of each window...









One more example, and this is where it shows it's 2:00 AM beer goggles ugliness...



Consider the following two Registry keys:



HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Dave

HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Dave



Both keys have a Value named "DisplayName", but key1 is assigned "Dave123", while the same Value under key2 is assigned "Dave456" (both are type REG_SZ).



[CODE]

Set objShell = CreateObject("Wscript.Shell")
key1 = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Dave"
key2 = "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Dave"
wscript.echo objShell.RegRead(key1 & "\DisplayName")
wscript.echo objShell.RegRead(key2 & "\DisplayName")

[/CODE]

If you execute the above code using CScript.exe from both locations on a typical Windows 7 64-bit computer, this is what you'd see...
Conclusion
I promised you a "workaround" at the beginning of this article, and here it is:  On 64-bit Windows 7 systems, to ensure you get accurate results, you absolutely HAVE to invoke the CScript.exe from C:\Windows\System32.  However, if you are are looking for installed Applications you need to invoke BOTH of them.  That's right, both of them.  Why? Because you can't get a complete picture without poking into both "sides" of the Registry of a 64-bit Windows 7 computer.
And I haven't even mentioned crawling through HKCU to find installed apps.  Some of you may be making a funny face right now, thinking "there's no application uninstall keys under HKCU" and then you check and realize that there are.  Most ClickOnce application installations, and pretty much any "per-user" installations for that matter, will hide their Registry stuff under HKCU.  So to really see what's "installed" on a 64-bit client, you need to look under the following places...

  • HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
  • HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
  • HKEY_USERS (crawl every SID tree beneath it)
  • probably other locations that I'm just too lazy to dig up right now

Is this retarded?  Yep.  Could Microsoft remedy this 64-bit issue with a patch for WSH and Wscript.exe/CScript.exe?  Yep.  Will they?  Don't bet on it.  
Note:  Wrapped code lines in the above examples are for formatting only.  The actual script code used for the examples does not have the lines wrapped.

Read More
Posted in crapware, microsoft, scripting, vbscript, windows 7, x64 | No comments

Saturday, 15 September 2012

Why Comparing Visual LISP to VBA is a Waste of Time

Posted on 19:26 by Unknown
Warning: This post is going to go so nerdishly geeky - that even I might have to put new tape on my glasses.

Jimmy Bergmark posted a really cool (and useful) tabular comparison of functions/methods between Visual LISP and VBA as of AutoCAD 2013.  It stirred up some thoughts, and emotions, in me about the path each language has taken (or not taken).

As I scanned my eyeballs down each row, the three functions that caught my eye were: (apply), (lambda) and (mapcar).  I will get to (defun) later.  And (cond) makes (select/case) look like a kid's toy.  I won't even dive into (eval), (quote) or (read).

If you're not familiar with LISP (of any flavor) these probably mean nothing.  I spent many years working with that language, even when idiots snickered and made their usual stupid acronym jokes about it (nerds can be so insensitive).  However, if you were an art collector, this would be similar to dropping names like Renoir, DaVinci, and Picasso.  Or if you were a musician, like dropping names Tchaikovsky, Beethoven or Zappa.  Or if you were a writer, like dropping names Shakespeare, Heinlein or, well, you get the idea.

These three functions are EXTREMELY powerful.  They can do things that NOTHING in VB or VBA or even VB.NET can do natively.  NOTHING.  Sure, you can mimic them with a LOT of code, but in the end, at the very bottom of the process stack (or heap), they will never be the same.

LISP is by nature flexible.  But it's also dynamic.  There is a difference, even though the implications of these two adjectives overlap quite often.

If you want to pause right here to do some poking around about these functions, I'll even offer some help:

  • Kenny Ramage posted a nice tutorial on (mapcar) and (lambda) here
  • Common LISP web site has a nice breakdown of (apply) here
  • Autodesk AutoCAD 2013 documentation section on (defun) here

Now, before you start into how (vlax-make-safearray) copies from Array(), I'll just go ahead and say that Array() is about as sophisticated against (cons) and (list) as a pile of toothpicks next to a fully-constructed log cabin.  In fact, if you want to be honest (and don't we all?), then (vlax-make-safearray) was nothing more than LISP having to be dumbed down to communicate with COM properly. Ok.  There.  I said it. (drops the microphone, hands in the air, walks off stage slowly...)

Function and End Function are about as similar to (defun) as the "fun" part, and that's about it.  The Function() declaration is static at runtime.  (defun) on the otherhand is completely dynamic and adaptable.  (defun) can be redefined at runtime, at-will.  Imagine trying to do this in VBA...

(defun MyFunction (a b c)
   (if (> a b)
      (defun MyFunction (a b c) (* a c))
      (defun MyFunction (a b c) (* b c))
   )
)

Is that a "great" example?  No.  It's just a 101 basic example.  But it exemplifies just how different these languages are.

IMPORTANT STUFF HERE...

Am I trying to say LISP is "better" than VB or VBA?

NO.

Programming languages are TOOLS.  They were always conceived and built to solve a particular set of challenges.  In most cases, when used for those very same challenges, they are ideally suited for the task.  Case in point:  Performing massively nested string manipulation in Perl or C++.  I'd take Perl any day of the week and twice on Sunday.

The original AutoCAD team (John Walker and the boys) selected LISP for a variety of reasons, but mostly because it was the most flexible language at the time. In many respects, it still is.  Particularly as it pertains (say that ten times!) to working with CAD drawings, graphic entities, precision, and object association.  But it lost it's sex appeal in the marketplace, which is unfortunate, but it was not a surprise either.

Before I start sounding like one of those guys that moans about how VHS beat out Betamax, let me say that I can see why that happened: It boils down to marketing, or the lack thereof.  Let's face it: the LISP community wasn't as interested in getting their platform onto every consumer device as earnestly as the Java folks were during the IT boom of the 90's.  Java had Sun doing its cheer-leading.  LISP had a bunch of unorganized nerds who could care less about what the "industry" wanted to do with it, so long as they could finish up their thesis lab work at 2:00 am.

Is LISP (or AutoLISP or Visual LISP) without imperfections?  No.  It could use quite a bit of TLC and modernization (especially within the narrow context of AutoCAD implementation), but it's much too constrained to be a smart business move.  Why spend more dollars on a language with fewer developers involved, when you can adopt and adapt a much more widely-used language like C#?  It just makes better business sense.

For what it's worth:  If I were handed a truckload of cash, and given the authority to direct some improvements to Visual LISP, well, I could hammer out a pretty good wishlist.  But nobody is listening anyway, so why bother?

Ok, since you asked:  Clean up the (car) (cdr) (cddr) (cdar) (cddr) (cdddr) (cddddddddr) mess.  Rename and consolidate functions to shorten the names (vlax-blah-blah-blah...).  Replace the IDE with something more recently styled.  Recode and rename the (vl-catch-all-apply) and (vl-catch-all-error-p) mess to bring it all more inline with Try/Catch/Fail, etc.  Make reactors easier to manage (like VB/VBA events).  Oh, my head hurts already.  Enough!  I can't go on.

I'm venting a bit, obviously.  And if I've upset or offended anyone who clings to their chosen programming language, I apologize.  Ok, not really, but I certainly don't want to make anyone angry.  Ok, maybe too late for that too.  Oh well.

Have a beer and enjoy the rest of your evening?
Read More
Posted in autolisp, business, cad, languages, lisp, programming, software development, vba, visual lisp | No comments

Thursday, 6 September 2012

It's About People

Posted on 19:35 by Unknown

With all the talk about Romney saying that a "corporation is a person" or whatever, I got to thinking that there's a twist to that which is actually very true: A business is really about the people within it.  I'm not bringing this up to be political in any way whatsoever.  Seriously.

It sounds simple, right?  It seems obvious enough.

But how many times do you hear people around you say something about a business, or an organization of some kind, either negative or positive, and they apply their judgement against the name of the business?  I hear it all the time. A great example is cell phone companies.  Get a conversation started about which company is "best" (whatever that really means), and watch the fur fly.  I've heard things like "Verizon sucks!" and "ATT is crap!" or "Don't even waste your time with Spring or Intelos", and so on.

I like to ask: "Why?" - then when they try to offer up some generic bullshit story, I cut them off with "who was that?", with the intent of drilling into the fact that it's usually isolated experiences with specific people that build the perceptions we hold about companies.  The same is true for any organization, even governmental agencies.  Everyone is negative and lays their judgement on the doorstep of the entire organization, when in fact they can't really back up more than one, two or three individuals in that organization that affected their views.

When you think back to any job you had in the past, you probably conjour up a mood or "feeling" about it, based on memories.  Good or bad.  But when you focus in on those feelings, you can almost always nail down who the people were that shaped your fondness or dislike of that job.  Maybe it was just one person.  Maybe it was a group, but often that group is shaped in cultural terms by one person, maybe the leader, whatever.  It's still people.  It's always about the people.

This week I was told that one of the guys who sits near me at work had given notice and was leaving.  He has been at this place for more than six years, and is very well liked.  One of the nicest people I've ever known.  It bummed me out the entire day, knowing he'd soon be gone.  Not "gone" in the ultimate sense, after all, with social networks being what they are today, it's hard to disappear from the lives of your colleagues like was the case five or ten years ago.

Still, as I approach fifty years of life on this ball of dirt and water, I've learned how important people are around you.  How vital they are to shaping our daily lives.  From the littlest of things to the major things, the people you work with every day set the mood for how you wake up, and whether you look forward to going in to the office, or not.  And as I've seen many good people leave places I've worked at, I become more attuned to the value of nice people, talented people, helpful people, and how important they are to everyone around them.

This isn't really about this one guy, it's really about all the great people I've worked with in the past few decades.  I'd like to think I was one of those "good" people that was missed when I had left one place for another, but that's not for me to decide.  I'd have to ask them, but a good part of me feels that the smartass side of my personality probably didn't leave too many sad people behind as I moved on to a new job.  Who knows.

What I do know is this: If you work with people that frustrate and anger you, or just annoy the shit out of you a lot, avoid them.  It's more important to focus your time on the people that make you smile, who inspire you, who make you feel good about going to work instead of dreading it.  Because it's really all about people.

Read More
Posted in business, people, psychology, society, stuff, thoughts | No comments

Monday, 3 September 2012

Table of Contents (Preliminary)

Posted on 19:58 by Unknown
Here's the preliminary Table of Contents for my new book "The AutoCAD Network Administrator's Bible - 2013 Edition".  I'm very close to wrapping it up, and as soon as it is reviewed and checked, I can incorporate the corrections and publish it on Amazon.


Contents
Introduction
What’s New in This Book
About the Author (me)
Overview
Who This Book is For
Terms Used in This Book
Why Bother With Network Deployments?
Assumptions
Planning & Design
Testing
Roll-Out
Technical Support
Environmental Changes
Organizational Environment Types
The Small Office Home Office (SOHO)
Small Business
Small-to-Medium Business (SMB)
Enterprise WAN
International Enterprise WAN
Deployment Planning
Resources
Constraints
Designing a Deployment Solution
Autodesk Product Deployments
Target Client Devices
32-bit AutoCAD 2013 installations (minimum)
64-bit AutoCAD 2013 installations (minimum)
AutoCAD Mac installations (minimum)
More Client Device Types
Deployment Servers
License Servers
Storage
Naming Conventions
Software and Licensing
Designing a License Management Architecture
Distributed License Server Responsiveness
Distributed Licensing and Client Settings
Network License Manager Folders
Virtual Environments
Making Your Business Case Work
Deployment Methods
Interactive (Manual)
Scripting
Group Policy (GPO)
System Center Configuration Manager
Client Imaging
Creating an AutoCAD 2013 Deployment
Walking Through the Process
Including Service Packs and Updates
Exploring the Deployment Folder
Copying and Moving Deployments
Deployment Folder Security
Windows File System Security Basics
The “Domain Computers” Group
Removals and Upgrades
Deploying License Servers
Single Server Configuration
Verifying the FlexLM / NLM Version
Sharing Licenses with Other Vendors and Products
Upgrading FlexLM and LMTOOLS
FlexLM and Firewall Considerations
Additional FlexLM Features
Verifying FlexLM License Services on Windows
Additional Information:
Using Configuration Manager 2007
Deployment Scenarios
Configuration Manager Basics
Configuration Manager 2007 Terminology
A High-Level Overview
Configuration Manager Deployment Overview
Selective Targeting
Configuration Manager Deployment Strategy Tips
AutoCAD Deployments vs. Distribution Points
Creating a Configuration Manager Package
Creating a Program
Creating the Advertisement
Testing your Deployments with Configuration Manager
Tracking Configuration Manager Deployments
Updating Collections
Advertisements and Web Report History
AutoCAD 2013 Installation Documentation
Using Configuration Manager 2012
Applications vs. Packages
Preparation
Creating an Application
Creating a Deployment Type
Targeting Users and Devices
Deploying AutoCAD 2013 with Group Policy
Assign an installation to a Computer
Adding a Language Pack to the Group Policy Deployment
Microsoft Deployment Toolkit 2012
Configuration Manager vs. MDT
Overview of MDT 2012 Features
MDT 2012 Update 1
Basics of Provisioning
MDT Deployment Options
Manual Interaction
Boot Media
Windows Deployment Services
Configuration Manager OSD
Deploying DWG TrueView with MDT 2012
Basic Setup
Preparation
Creating an Application
Creating a Task Sequence Item
Updating the Deployment Share
Updating Deployment Media Content
Deploying AutoCAD 2013 with MDT 2012
Option 1, Leave the AutoCAD Deployment As-Is
Option 2, Copy into MDT and modify Deployment .INI file
Preparation Work
Screen Shots of the Deployment in Action
Conclusion
Deploying Prerequisites
Deploying Microsoft .NET Framework 4.0
Deploying .NET Framework 4.0 with Configuration Manager 2007
Deploying .NET Framework 4.0 with Configuration Manager 2012
Design Review 2013
Deploying Autodesk Design Review 2013 with Configuration Manager 2007
DWG TrueView 2013 via Configuration Manager 2007
DWG TrueView 2013 via Configuration Manager 2012
Prerequisites
Create the Application
Create the Installation Deployment Type
Making an Uninstall Deployment Type
Setting up the Detection Method
Setup.EXE and Spawned Processes
Performance Optimization
Autodesk 360
Troubleshooting Tips
Investigating Deployment Issues
Forcing Windows Installer Logging
Troubleshooting Custom Deployments
Dave’s Troubleshooting Procedures
Communication Center / Information Center Issues
Restoring a Bad AutoCAD Profile
Forcing a Mandatory AutoCAD Profile
Restricted Users
Plotting Issues
Corrupted DWG Files
The PURGE Command
ObjectARX and Proxy Objects
Disappearing Dialogs
Converting DWG Formats
DWG vs. DWGx Files
Interoperability
Calling in the Big Guns
Environmental Changes
Server Changes
Printer and Plotter Changes
Product Service Packs, Updates, and Hot-fixes
Third-Party Add-Ons
Hardware Failures
Standalone License Activation
Network License Server and Client Changes
Facility Outages
Employee Changes

Packaging and Custom Automation Tools
CACLS and XCACLS
Comparing CACLS and XCACLS
REGINI
REG.exe
Microsoft Installer Clean-Up Utility
Sysinternals Utilities
PowerShell
Scripting Examples
CMD Script - Install AutoCAD 2013
Notes:
PowerShell Script - Install a Windows Installer Package
PowerShell Script - Install Multiple Windows Installer Packages
PowerShell Script - Install DWG TrueView 2013
What is a "Short" File or Folder Name?
Appendix A - Recommended Web Sites
Appendix B - Recommended Books
Appendix C - Helpful Blogs and Twitter Folks
Acknowledgements
Where You Can Find Me


Read More
Posted in autocad, books, config manager, mdt, network administration, publishing, writing | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Voting Time: Help Me Out?
    I need to get a better view of how I should manage this blog if I'm going to keep at it. I'd like to know how you typically discover...
  • A World Without Competition
    Try to imagine what things would be like today had there not been fierce competition in certain key parts of our world.  I’ll give you some ...
  • Book Update
    I posted some gibberish a few weeks ago about another book project.  Well, I'm getting close to wrapping it up, so I thought I'd go ...
  • Cost
    Software technology, like any technology, provides a means to solving problems.  Some big. Some small.  Some that help.  Some that hurt.  An...
  • Windows 7: Default User vs All Users
    A lot of confusion seems to occur with understanding the difference between the "Default User" profile, and the "All Users...
  • Time to Give Props
    With the ever-expanding volume and breadth of information on the Internet today, it's easy to focus on my own thoughts, experiences, ide...
  • Table of Contents (Preliminary)
    Here's the preliminary Table of Contents for my new book "The AutoCAD Network Administrator's Bible - 2013 Edition".  I...
  • The Nicest IT and IT Vendor Folks I Know
    I've ranted many times before how it's unfair to "hate" an entire company, without providing a rationale for it based on s...
  • Windows 8
    Two small, yet irritating things, that I hope Windows 8 addresses with respect to Windows 7: Being able to put the Recycle Bin in the S...
  • Stupid Assumptions
    After years of watching sci-fi TV shows, movies, etc. it's finally come to a point where even the so-called brightest of our authors and...

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)
      • 10 Questions: With Ralph Grabowski
    • ►  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)
    • ►  July (17)
    • ►  June (23)
    • ►  May (20)
    • ►  April (38)
    • ►  March (61)
    • ►  February (54)
    • ►  January (1)
Powered by Blogger.

About Me

Unknown
View my complete profile