Windows Tech Support

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

Tuesday, 31 May 2011

A Quasi-Scientific Analysis of DoucheBaggery

Posted on 15:59 by Unknown

I was just thinking.  Yes: occassionally I do that.  We Americans like the word “douche” very much.  We use it in combination with other words to create nouns, verbs and adverbs in very creative ways.  But when denegrating others, in our rush to make a cool sounding phrase, we are actually cheating ourselves of using a more appropriate phrase: enema bag. 

That’s right.  We like to say “douche bag!” and other phrases like “douche-face”, “douche-breath” and “sir douche-a-lot”, or even my personal favoriate: “Lord Douchely” (only if you say it like a big, barrell-chested retired British Army Colonel with a bushy mustache and monacle). 

We don’t call people “enema bag” and “enema face” because it just doesn’t roll off the tongue quite as well.  So, douche wins.  Not because it’s actually a symbol of lowest comparative denominator, but because it just sounds better.  It’s also easier to say “douche brain” than “enema bag” when you’ve polished off a case of beer.

And some people wonder why I don’t get government study grants handed to me.  P-shaaaa!

Read More
Posted in bongloads, cranium drainium, languages, people, society, thoughts | No comments

Programming Thoughts

Posted on 12:37 by Unknown
If you write code that supports an application that maintains an active stream read (consumes a data stream) from a remote file, registry key, WMI/WBEM provider, DB source, etc., such as an active log parser or event monitor, and your app hangs when the remote connection fails:

Walk outside and kill yourself. Your software sucks and is causing pain to other human beings. If suicide isn't your thing, then volunteer for medical research. That is all. Thank you.

Read More
Posted in | No comments

Friday, 27 May 2011

Stupid Geek Tricks: PowerShell, VBscript, Jscript

Posted on 18:10 by Unknown

When I’m bored on a Friday night and none of my twitter followers are bored enough to suggest something for me to do, I do stupid crap like this:

PowerShell script that calls Cscript and a VBS script, which invokes Javascript and returns the result up the pipeline back to PowerShell.  Enjoy.

PowerShell code (test1.ps1):

$answer = cscript.exe /nologo .\test1.vbs
"Cosine of 33 is $answer"


VBscript code (test1.vbs):



Function Cosine(numValue)
Set sc = CreateObject("ScriptControl")
sc.Language = "jscript"
result = sc.Eval("Math.cos(" & numValue & ")")
sc = 0
Cosine = result
End Function

x = Cosine(33)
wscript.echo x


Drop both files in the same folder and run the PowerShell script to spank the VBscript into submission.  Yes, I know it's not passing object handles around, but rather just passing strings around but who cares. It's Friday and I'm bored out of my skull. I have no life. I hope you do.

Read More
Posted in bongloads, powershell, programming, scripting, vbscript | No comments

The 10 Basic Laws of Scripting

Posted on 12:45 by Unknown
These apply regardless of language, platform, nationality, planetary or galactic realm...



1. Thou shalt Document thy code or thou shall be kicked in thy crotch, severely and repeatedly. Thou shall at least provide a heading to denote filename, author, date and description.



2. Hard-coded folder paths shall be avoided at all costs. Use path variables from the fountain of variables. Violators shall be violated by gangs of convicts.



3. Assumptions shall not be taken about execution environment conditions. All shall be validated at runtime.



4. Error checking shall be done at all points where even the idea of an error might occur.



5. All errors/exceptions shall be properly handled or thou shall be banished to thy woodchipper. This applies to type checking as well.



6. Execute remote elevation in local system context. If thou hast done their preparation, this will always work.



7. Thou shall consume caffeine or alcohol if permissible. Even if not permissible.



8. Expect failures at every point and plan ahead for them.



9. Thou shall test thy code in an isolated environment before ever touching thy production environment. Failing to heed will result in a most horrific use of ice-climbing boots



10. Nay-sayers shall be drawn and quartered.



Let it be written.
Read More
Posted in | No comments

Tuesday, 24 May 2011

What’s Wrong with this Blog

Posted on 19:44 by Unknown

This blog.  My blog.  It violates almost every rule SEO nutjobs insist upon.  But that’s exactly why I chose the path I’ve taken with it.  The name “Skatterbrainz” has been my monicker for years.  I started on Twitter with it, but before that I used it when signing up on forums and bulletin boards and various other things.  There are other people using the same name of course, but I only use it on tech-oriented sites and my own blogs and sites.

They say a blog should stick to a narrow, focused, concise topic or subject.  I do not.

They say a blog should mention brand names within a focused context.  I do not.  Well, not usually.

They say a blog should be closely integrated with a holistic social network experience. Mine does not.

Do I pay a price for this ecclectic diffusion of mental diversity?  Not really.  Blogs are free.  I spend time on it, but to me that is therapy.  I make no money from this blog in any way except to mention my books (ok, ok, okaay, geeez: e-books), but that’s still not a direct return.  My total AdSense revenue balance is around $0.20, so that doesn’t count really.

I’ve tried several times to elicit feedback from readers as to what subjects I should focus on mostly, but that was a failed effort.  The four responses I received were entirely unrelated and offered no real direction to follow.  So, without a GPS to guide me on my journey through the fields of idiocy, I chart my own course using my patented Stevie Wonder GPS.

I don’t possess enough pure technical wisdom to maintain a serious fountain of knowledge like other blogs do, which is fine.  They do an amazing job of that already.  I’m not trying to compete with anyone.  I just dump my thoughts and hopefully a little something to make someone smile.  Even if I just make someone shake their head in total disbelief, that’s a good thing.

I’ve taken some breaks and pauses along the way.  I’ve even given up on it twice, but I had to come back to it.  I wasn’t even sure if anyone was reading it, but that isn’t important.  I hope to keep this thing going for a while longer.  Above all, I want to thank YOU for reading my posts and sharing your thoughts with me and other readers.

Read More
Posted in blogs, thoughts | No comments

Assorted Ways to Detect .NET 4.0

Posted on 19:26 by Unknown
CMD / BAT

@echo off
reg query hklm\software\microsoft\.NETFramework\v4.0.30319 >nul
if %errorlevel%==0 (
echo found
) else (
echo not found
)

VBScript Registry Test

Set oShell = CreateObject("Wscript.Shell")
On Error Resume Next
bKey = oShell.RegRead("HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\")
If err.Number = 0 Then
wscript.echo "found"
Else
wscript.echo "not found"
End If

PowerShell Registry Test

if (test-path hklm:\software\microsoft\.NETFramework\v4.0.30319) {
write found
} else {
write not found
}

VBScript Folder Test

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
If objFSO.FolderExists(“C:\Windows\Microsoft.NET\Framework\v4.0.30319”) Then
wscript.echo “found”
Else
wscript.echo “not found”
End If

PowerShell Folder Test

If (test-path $env:windir"\Microsoft.NET\Framework\v4.0.30319") {
write found
} else {
write not found
}

VBScript WMI Win32_Product Test

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_Product WHERE Caption LIKE '%.NET Framework 4%'",,48)
For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Next
Read More
Posted in scripting, vbscript | No comments

Wise is Dead

Posted on 06:20 by Unknown
It's official. Wise Package Studio, like the Wise brand itself, is dead. It just doesn't know it yet. Like a family circled around their 116 year old grandfather laying on a bed in a coma on life support. They refuse to accept the inevitable.



Was there an official announcement? No. I'm basing this diatribe on de facto environmental signs.



What signs?



- WPS 8.0 doesn't install and work properly on Windows 7. At least not consistently. Even though the brochure material hints that it is.



- The Symantec folks at Tech-Ed 2011 reacted to my Wise questions as if they were surprised that the brand name was still in existence.



- The comments in the Symantec Endpoint Wise Package Studio forums are pretty blunt that Symantec is not putting any effort or funding into future development.



That means Flexera will soon be the market monopolist. Even with dozens of smaller vendors in the ring, most customers are moving to, or will soon move to AdminStudio.



What a shame. I've been involved with software development projects staffed with brilliant and creative people, but were suffocated to death by accountants and clueless MBA golfers. I think of that when I realize how much work has been put into WPS over the years. With Symantec producing pure shit products on a higher marketing level, this is one that could retain their integrity and value as a real competitor in a market of only two real players. Both of which being way over-priced.



Oh well. Sorry to see you go, Wise. You were pretty good while you were alive. RIP.
Read More
Posted in | No comments

Monday, 23 May 2011

Another AutoCAD 2012 Install Script Spin

Posted on 17:14 by Unknown

Just in case you had any shred of curiosity about how many ways you can deploy software, well, it’s damn near infinite.  Here is yet one more permutation of a script installer for AutoCAD 2012 used with System Center Configuration Manager 2007.

@echo off

rem ****************************************************************

rem  Filename..: setup.cmd

rem  Author....: David M. Stein

rem  Date......: 05/23/2011

rem  Purpose...: install network client of AutoCAD 2012

rem ****************************************************************

CLS

SETLOCAL

SET APPNAME=Acad2012

SET LOG=%TMP%\%APPNAME%_install.log

SET UNC=\\Servername\Apps\Autodesk\Acad2012

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%

rem ----------------------------------------------------------------------

rem Check if AutoCAD 2012 is already installed

rem ----------------------------------------------------------------------

if exist "%ProgramFiles%\Autodesk\AutoCAD 2012\acad.exe" (

                echo %DATE% %TIME% info: application is already installed >>%LOG%

                exit 0

)

if exist "%ProgramFiles%\Autodesk\AutoCAD 2012 - English\acad.exe" (

                echo %DATE% %TIME% info: application is already installed >>%LOG%

                exit 0

)

rem ----------------------------------------------------------------------

rem Check if .NET Framework 4.0 is already installed - or install it

rem ----------------------------------------------------------------------

if exist "%WinDir%\Microsoft.NET\Framework\v4.0.30319\clr.dll" (

                echo %DATE% %TIME% info: dotnet framework 4.0 is already installed. >>%LOG%

) else (

                echo %DATE% %TIME% info: installing MS .NET 4.0 client runtime... >>%LOG%

                pushd "%UNC%\AdminImage\3rdParty\NET\4\wcu\dotNetFramework"

                dotNetFx40_Full_x86_x64.exe /q /norestart /lang:ENU

                echo %DATE% %TIME% info: exit code is %errorlevel% >>%LOG%

                popd

)

rem ----------------------------------------------------------------------

rem Install DirectX components

rem ----------------------------------------------------------------------

echo %DATE% %TIME% info: installing DirectX package for acad2012... >>%LOG%

echo %DATE% %TIME% info: command is -- msiexec /i Acad2012DX.msi /quiet /norestart >>%LOG%

pushd "%UNC%"

msiexec /i Acad2012DX.msi /quiet /norestart

echo %DATE% %TIME% info: exit code is %errorlevel% >>%LOG%

popd

rem ----------------------------------------------------------------------

rem Install AutoCAD 2012 deployment

rem ----------------------------------------------------------------------

echo %DATE% %TIME% info: installing AutoCAD 2012 deployment package... >>%LOG%

pushd "%UNC%\AdminImage"

setup.exe /I /Q /W ACAD2012.ini /Lang en-US

popd

echo %DATE% %TIME% info: exit code is %errorlevel% >>%LOG%

rem ----------------------------------------------------------------------

rem The following code is only required if you don't modify the setup .INI

rem to suppress shortcuts during the installation

rem ----------------------------------------------------------------------

if exist "%Public%\Desktop\Autodesk Design Review 2012.lnk" (

                echo %DATE% %TIME% info: cleaning up desktop shortcuts... >>%LOG%

                del "%Public%\Desktop\Autodesk Design Review 2012.lnk" /f /q

                del "%Public%\Desktop\Inventor Fusion 2012.lnk" /f /q

)

if exist "%AllUsersProfile%\Desktop\Autodesk Design Review 2012.lnk" (

                echo %DATE% %TIME% info: cleaning up desktop shortcuts... >>%LOG%

                del "%AllUsersProfile%\Desktop\Autodesk Design Review 2012.lnk" /f /q

                del "%AllUsersProfile%\Desktop\Inventor Fusion 2012.lnk" /f /q

)

echo %DATE% %TIME% info: final exit code is %errorlevel% >>%LOG%

Read More
Posted in autocad, cmd, config manager, sccm, scripting, software deployment | No comments

AutoCAD Deployment with Configuration Manager, Scripts, Fires and a Drink

Posted on 07:58 by Unknown
As a follow-on to my previous posts on the subject of (pardon the unintended redundant redundancies) deploying AutoCAD deployments via Microsoft Configuration Manager (aka: "Config Manager", aka: "ConfigMgr", aka: "SCCM", but they really don't like that one) and you wrap the installation process in a script, listen up:



Put the script in an entirely separate UNC location from the rest of the deployment folder stuff. The script should reference the deployment paths using full UNC values. Point the ConfigMgr package data source at the script folder, and set the Package program to call the script. Pretty basic.



This is because:



A. Autodesk deployments use hard-coded source path references. So regardless of replication, any execution will always refer back to the hard-coded UNC location. You can modify this manually, per each copy, but it can be a major pain in the ass.



B. Putting the script with the deployment results in the entire mess being replicated to your ConfigMgr distribution points. This eats up network bandwidth and disk space for nothing of value whatsoever.



C. The advertisement can run the setup script from the DP or download to cache, either way won't affect client caches as much as a full deployment cache hit (which would also be of no value)



That is all. Enjoy you day!
Read More
Posted in | No comments

Saturday, 21 May 2011

Microsoft Tech-Ed 2011: Memorable Moments

Posted on 18:19 by Unknown
  • The Braves-vs-Phillies game on Sunday at Turner Field
  • Dinner with my nephew and his family in Alpharetta on Sunday night.
  • The "Desktop Deployment Game Show" session on the last day, with Michael, Johan, Jony and Tony and some others - was hilarious.  Absolutely entertaining and educational as well.  The questions presented via the Jeopardy-style game board were obviously aimed at inside knowledge, since nobody in the audience even tried to answer when the panelists couldn't figure them out.
  • Wednesday night.  Sitting in Peachtree Station mall at closing time, aside from the floor cleaner guy, it was empty.  Myself, Mike and Todd were getting a bite to eat from one of the two shops still open, then sat down to chow and along comes Wally Mead who pulls up a chair and works on his Subway sub while we talked for about an hour and a half.  For non-geeks, this is probably meaningless.  For anyone who works with System Center Config Manager (or SMS), it's indeed a rare event.  Wally is a really cool guy.  Laid back and great to chat with.  I learned so much in that short time.  Even about dogs, kids, houses, places to live and places to travel to, not to mention his knowledge from being at Microsoft for 17 years.
  • The two sessions on memory management with Mark Russinovich
  • The "Solving Unknown Mysteries of…" session with Mark Russinovich
  • Getting a book signed by Mark and a brief chat.
  • The final session of the conference with Mark Minasi on DNS was funny and very informative.  He's a great speaker.
  • Breakfast in Building C open Hall.
  • Lunch at Building C open Hall.
  • The Expo floor and the open bars and food buffet every night
  • The SpecOps team party on Wednesday night at Max Lager's.
Read More
Posted in conferences, education, learning, microsoft, technology, travel | No comments

Friday, 20 May 2011

Back Home from Tech-Ed 2011

Posted on 13:00 by Unknown

Atlanta.  Holy cow!  Some basic stuff from the top of my fizzling mental processing stack:

- The Hyatt Regency was crap.  Great staff.  Nice employees.  But the building and the rooms are in bad shape for a place of such high reputation.  I'll spare you the details, but let's just say we envied the folks staying at the Hilton, Omni, and Sheraton.  I could post a list of things that were bad but it's not even worth the effort.

- The Georgia Aquarium is the bomb.  Awesome place.  Whether you want to move around and see things or just sit and chill in front of an enormous wall of sea life moving in front of you, it's worth a trip to Atlanta just for that.

- The World of Coca Cola was "eh".  Mostly a short narrative about the history and some milestones about the company, a lot of nostalgic stuff, then a goofy animation movie (2D, not 3D), and then they release you into an eclectic place with sampling machines of flavors from around the world and then they herd everyone through a giant gift shop with overpriced stuff.  Interesting but not awe-inspiring.  The Aquarium blows it away.

- Max Lagers is fantastic.  Great place with some great beer and a cool old-brick Boston pub atmosphere.  The staff is outstanding and friendly too.

- Georgia World Congress Center: interesting.  BIG. Spread out.  Confusing.  A wide range of restrooms, from itty-bitty things to great big things.  Overall, the restrooms were not very good and poorly designed and not built to handle a massive conference like Tech-Ed.  However, the services staff was outstanding.  Every morning we were greated with a line of cheers and greetings and smiling faces.  All of their staff were helpful and friendly.  That alone overcomes any structural complaints.  The food was pretty decent as well.

- Microsoft's event planning was understated.  How they managed to move 10,000 people from 84 countries from hotels to the GWCC, through breakfast and lunch and expo events is unbelievable.  Nobody really mentioned that, but when you stop to think of what kind of logistical planning that took it is simply incredible.  Everything went smoothly of course.

- Atlanta is a cool town.  Confusing to navigate, but cool.  I hope to revisit again and learn more about the place.

I plan on posting a follow-up on this with more of what I learned and what I did during the week at Tech-Ed 2011.

Read More
Posted in conferences, microsoft, people, thoughts, traffic, transportation, travel | No comments

Thursday, 19 May 2011

Windows Web Admin - Decision Time

Posted on 11:00 by Unknown
After a week of Tech-Ed immersion, I have decided to pull the plug on Windows Web Admin.  It's been fun, but there is clearly no need to continue work on this project.  Especially in light of Config Manager 2012 features and changes to everything from the UI to the underlying SQL environment.  To the handful of you that have offered feedback and supportive comments: thank you!
Read More
Posted in config manager, network administration, projects, sccm, web development, wwa | No comments

Friday, 13 May 2011

Windows Web Admin Update

Posted on 20:55 by Unknown

I posted build 2011.05.13.001 tonight.  This is a fairly big release with quite a few changes.

I'm not going to post any new builds for at least the next week, while I'm off at Tech-Ed in Atlanta.  I will form a decision over that week as to whether it makes sense to continue this project or kill it.  I've heard from a few people over the past month, but overall it seems the only person that needs something like this is me.  I may continue working on it for my own needs, but I'm not sure it will have a place on the Internet after today.  I will decide next week and post an announcement afterwards.

What's new in 2011.05.13.001

  • Role-based Access Control
  • SCCM Collection Report updated

2011.05.13.001.home

Role-based Access Control (or RBAC for you acronym nutballs) involves controlling access to features based on the user being in a list of specific AD user account names.  There are two lists: adds_admins, and sccm_admins.

If a user's ID is entered into the adds_admins list, they will see the "Add", "Disable", "Enable", and "Remove" buttons and links for user and group reports.  If a user is entered into the sccm_admins list, they will see the buttons for adding computers into collections, and removing computers from collections.  If a user is not in one or both groups, they can still view the report details, but won't have access to make modifications via the web interface.

The SCCM Collection report now shows any Advertisements targeted at the collection, including the Package and Program Name information.  The advertisements are cross-linked to the Advertisement details report, as is the Package to the Package details report, so everything is linked up.

Future Plans

Since I've received almost no requests for enhancements, I will follow my own needs from here on out.  So, what exactly am I saying?  I guess I'm saying it could very well go offline and return to an in-house project.  It started as an in-house incubator for other projects, which have grown as a result of borrowing pieces of WWA for other uses.  What are some features I may work on?

  • Create new SCCM Collections
  • Assign SCCM Advertisements to Collections
  • Modify Collection Properties
  • Create Packages, Programs, Advertisements
  • Reset AD User Account Passwords
  • Add and Remove Computers in AD Groups
  • Disable or Enable Computer Accounts

Ambitious?  Absolutely.  Likely?  Who knows.  As with most projects, the features that end up materializing are driven by tactical need, so the list of changes might look entirely different.

Then there's the other option: I could discover an off-the-shelf product, or another open source (or freeware) project that does this as well, or does it better.  If any of these options appear, it might spell the end of WWA entirely.  I will find out next week.  So for now, build 2011.05.13.001 is the latest and final build I will post.  It may also be the absolute last build.

DOWNLOAD WWA build 2011.05.13.001

Read More
Posted in config manager, network administration, open source, projects, sccm, web development, wwa | No comments

Tech-Ed 2011, Moving, and Chromebook

Posted on 13:56 by Unknown

On Sunday I'm flying out to Microsoft Tech-Ed in Atlanta, GA for the next week.  It will be an incredibly busy time I'm sure.  But it should be a fun time as well.  I've been working with software technology since 1987 with no detours at all.  I've been working primarily with Microsoft technology since about 2002 or so.  I attended four Autodesk University conferences (Los Angeles, Boston, Philadelphia and Las Vegas) but never a Microsoft conference.  I'm looking forward to this one very much.

On the "Moving" side, it looks like my family and I will be packing up sometime in the next few months and moving to a new place.  Still in Virginia Beach but the actual domicile is not yet determined.  Therefore, when the packing-and-moving time arrives, my blog presence may become scarce.  Just a heads-up (not that it really matters to anyone else, but just in case).

My beta edition Google Chromebook is still kicking.  And speaking of Tech-Ed: I was facing the dilemna of what to bring for taking notes and downloading files, code snippets, etc.  Either the Google Chromebook, or my wife's tiny little Asus netbook with Windows 7.  And the winner of this decision is?…… drum rolll…..   The netbook.

I just can't see myself going to a huge, no scratch that, the HUGEST, Microsoft conference of the year, and pulling out a Google product to do my evil doing.  I might get gang raped in the men's restroom or something.  Imagine being attacked by a pack of MCITP nerds?  Geez.  Just the thought makes me cringe.  So, as goofy and toy-ish the netbook may appear, it does have Windows 7 and can install my favorite code writing apps.  Chromebook lacks a means to do serious code writing, not to mention uploading photos and files from a USB thumbdrive (it has a USB slot, but no way to upload files from it), nor can I synch my podcasts from iTunes to my iPod on it. So the Windows 7 netbook is the winner for me.

Read More
Posted in blogs, chrome, conferences, home, microsoft, programming, thoughts, windows 7 | No comments

Tuesday, 10 May 2011

AutoCAD Profiles

Posted on 20:22 by Unknown

What is a Profile?

An AutoCAD "profile" is a named collection of configuration settings.  A Profile may include options that control display, modeling, user interaction, printing and plotting, saving, importing and exporting, units of measurement, and so on.  There are essentially two types of "Preferences" in the AutoCAD environment: Application and Database.  "Database" is another word for "Drawing" in this context, so "Database Preferences" translates into "Drawing Preferences" or configuration settings that are drawing level or drawing-specific.

How are they stored?

They are actually stored as Windows Registry keys under the path: HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.2\ACAD-A001:409\Profiles\

The first profile created by default is the "<<Unnamed Profile>>" but as you create new profiles they will be added under the \Profiles\ path as well.

How are Profiles accessed and controlled?

There are several ways to get at profiles.

  • From the OPTIONS dialog forms within AutoCAD
  • From the Windows Registry
  • From exported .ARG files
  • From programmatic interfaces like COM and .NET

The first method is pretty simple and self-explanatory. So let's dig into the others.

The Windows Registry is where profiles are stored and maintained.  When you create a new Profile within the OPTIONS dialog, it creates a new sub-tree with the corresponding name and populates it with all the pertinent keys and values to store the profile configuration.

If you export the profile from within the OPTIONS dialog, it creates an .ARG file.  This is actually a .REG file (a Windows Registry export file format), so you can very easily rename a .ARG to .REG and use it like any other Registry data file (import, export, archive, etc.)

The programmatic interfaces for accessing and manipulating profile data are most often via .NET or the older COM interfaces.  Because they are stored in the Windows Registry, ANY other programmatic interfaces that can manipulate the registry can be used as well.  When it comes to leveraging .NET interfaces, you can pretty much narrow that down to Visual Studio tools like VB.NET, C#.NET, PowerShell, as well as ObjectARX®   When it comes to COM interfaces, you can use anything that talks COM.  Some examples include VBscript, Javascript, KiXtart, PowerShell.

Programmatic Access to Preferences

VB.NET

Dim acPrefComObj As AcadPreferences = Application.Preferences

C#

AcadPreferences acPrefComObj = (AcadPreferences)Application.Preferences;

VBA

Dim acadPref As AcadPreferences
Set acadPref = ThisDrawing.Application.Preferences

Visual LISP

(setq objAcad (vlax-get-acad-object))
(setq objAcadPrefs (vla-get-Preferences objAcad))

Windows Scripting Host - VBScript

Because VBScript is external to the AutoCAD application environment, it must first obtain an object instance of the AcadApplication class in order to begin drilling into the internal objects, properties, methods and so on.

Dim objAcad, objAcadPrefs
Set objAcad = CreateObject("AutoCAD.Application")
Set objAcadPrefs = objAcad.Preferences

Programmatic Access to Profiles

VB.NET

Dim acadApp As AcadApplication = CType(Application.AcadApplication, AcadApplication)
acadApp.Preferences.Profiles.ExportProfile("PROFILE_NAME", "C:\test.arg")

This is one way to get at Profiles from within an AutoCAD session environment.

Visual LISP

This is (or these are) another example of getting at Profiles from within AutoCAD.

example: linear expression…

(setq objActProfile (vla-get-ActiveProfile (vla-get-Profiles (vla-get-Preferences (vlax-get-Acad-Object)))))

example: unfactored collection of expressions

(setq objAcadApp (vlax-get-Acad-Object))
(setq objAcadPrefs (vla-get-Preferences objAcad))
(setq objProfiles (vla-get-Profiles objAcadPrefs))
(setq objActProfile (vla-get-ActiveProfile objProfiles))
(vla-ExportProfile objProfiles "Fubar" "c:\fubar.arg")

Windows Scripting Host - VBScript

This is an example of getting at profiles from outside of AutoCAD.

The downside to accessing the Profile collection via a non-object interface is that you don't get the nice object-oriented methods and syntax that make it kind of neat-o to use.  So instead of crawling the object tree, as it were, you have to fetch each entity as a distinct data value.

setq objShell = CreateObject("Wscript.Shell")
path = objShell.RegRead("HKCU\Software\Autodesk\AutoCAD\R18.2\ACAD-A001:409\Profiles\MyProfile\ACAD")
For each folderName in Split(path, ";")
    wscript.echo folderName
Next

Keep in mind that the Wscript.Shell RegRead() method is only useful on the local computer.  But this isn't really an obstacle since you don't really want to access HKCU on a remote computer (you have to first map the user SID to obtain the HKEY_USERS path because HKCU is a pseudo registry hive that exists only under the local user context).  So… you can do it, but you have to ask yourself if it's really the best approach to getting at things on a remote computer.  Why not invoke the interface under the local user context?

PowerShell

$a = get-item HKCU:\Software\Autodesk\AutoCAD\R18.2\ACAD-A001:409\Profiles
$a.SubKeyCount <-- returns the number of profile trees beneath the Profiles path
$a.GetSubKeyNames() <-- enumerates the profile names

The upside to using PowerShell over VBscript is that you can invoke object programming techniques.  This is because $a (in this example) is actually an object instance.  There are other ways to employ PowerShell, so don't think this is the only possible approach (it's barely scratching the surface).

Group Policy Preferences

That's right.  As astounding as it may be, I have long ago recommended Windows admins explore the use of Group Policy Preferences for managing and manipulating computer settings with less effort than scripting typically requires.

But you say "Dave?! How can you suggest we leave scripting out in the cold, starving and dying of neglect?!  How cruel!"

Fair enough.  But once you see how easy it is to create, modify and delete registry keys and values on a bazillion computers, you will look at your old login and startup scripts like the old girlfriend you dumped years ago (and never regretted).

Possibilities

They are almost endless.  For example, using the available tools and technologies, you can rig up a way to automatically reset profiles for classroom settings (if you don't use virtual machines to handle state management).  You can deploy and update a standard profile for specific business groups, locations or for the entire operation.  If a path reference is set in a default profile, but later needs to be changed (and you didn't map it to a DFS target) you can push out a fix using scripts or even a Windows Group Policy Preferences object setting.

Conclusion / Summary / Mumbo-Jumbo Ay Carumbo!

I have no intention of trying to create an ebook expose to exhause every conceivable way you can get at Profiles, create, rename, modify, delete, import or export them.  I also did not intend to cover every programming language or programmatic option available or possible.  The goal here is to simply show the following:

  1. The Preferences and Profiles items are structured and fairly well-defined
  2. They are accessible from a lot of different angles using a lot of different tools
  3. You have choices and options at your disposal

That said: go forth and hack away.  Just don't call me if you break anything.

Read More
Posted in autocad, autodesk, group policy, network administration, powershell, programming, registry, scripting, software development, vbscript, windows | No comments

Monday, 9 May 2011

I'm Almost Semi-Famous!

Posted on 17:49 by Unknown

Shaan Hurley asked me to write something for his blog as a guest, so I wrote about the significance of Autodesk announcing support for AutoCAD 2012 on Citrix XenApp.

Read the article here: http://autodesk.blogs.com/between_the_lines/2011/05/autocad-2012-citrix-xenapp.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogs%2Fbtl+%28Between+the+Lines+RSS+Main%29

Thanks Shaan!

And, in case you haven't read Shaan's blog, you should.  He also takes incredible photos of places he travels to, which I highly recommend checking out.

Read More
Posted in application virtualization, articles, autocad, autodesk, blogs, virtualization | No comments

Thursday, 5 May 2011

Counting Grains of…

Posted on 18:27 by Unknown

This one sprang up from a drawn-out conversation about some article that proposed comparing the relative "kill ratio efficiency" of today's U.S. military with that of past conflicts like Vietnam, Korea, WWII and so on.  The article, and a few of the folks in the conversation as well, were convinced that you can somehow assess a meaningful rating of "killing efficiency" by measuring bullets expended versus body counts.

This is utter useless bullshit.

My head was spinning as to where to even begin to blast holes (pardon the pun) in this ridiculous dumbshit logic.  I tried to apply some logical/methodical approach, but my emotional turmoil dragged my brain through a toilet bowl of hostile intentions.  Where was I?  Oh yeah…

Just in case one of you (fine, upstanding readers) out there thinks I'm wrong, hear me out, please?

First off, counting bullets is a myth.  All by itself, that is an insanely stupid concept, and here's why.  Anyone that understands the process of defense supply management knows that during peacetime logistics is not perfect.  Shipments leave one place and often end up in the wrong place, or in many wrong places.  They often end up in different condition or quantity than when they left their origin.  Again - that's in peace time.

In wartime, it's like a Chuck-E-Cheese on a Saturday when someone replaced the soft drink tanks with Red Bull and LSD and sprinkled caffeine pills on the pizza slices.  Ok, that's a little inaccurate.  It's more like sprinkling crushed Viagra pills and caffeine pills on the pizza.

At each step of the way things get touched and quantities change.  Loss, damage and theft claim some.  Then some are used on training (official and bullshit goofing around training).  Then there's the real bullshit like shooting goats, pigs, chickens, trees, abandoned vehicles and buildings.  Some are shot into open sea.  How do you count how many bullets were INTENTIONALLY shot at "bad guys" versus all other things (and reasons) that you can shoot them at?  So if you could somehow (accurately) measure how many stupid-ass things were shot at in Vietnam and also (accurately) in today's theaters of battle, then you would still need to isolate accurate and meaningful numbers for the other aspects.  It's an impossible task.

Here's one example I gave:  So, if John Doe, SEAL team member, uses up a box of 2,000 rounds of ammo practicing on bottle caps at 1000 yards, but then turns around and fires one (1) shot at a bad guy, does that mean his "killing efficiency" is 1:2000?  And how would anyone ever know if 1000 rounds were aimed poorly during a real fire fight or shot at bottle caps?  I don't ever recall a form being filled out for:

___ shot at bullshit

___ shot at bad guys

___ still embedded in the bad guys

Read More
Posted in bongloads, military, war | No comments

The 50/50 Rule

Posted on 15:06 by Unknown

It's been a long time since I posted some philosophical bullshit, but don't think you're getting off the hook that easily.

I have a thing about the use of the words "rule" or "axiom" or "law".  From a mathematical viewpoint, those imply a certain organic aspect.  That if they are truly framework terms, they must (read MUST) apply under all conditions or they are crap.  Saying that something is a "rule" means it is valid and viable at all times, under all circumstances, and within all reason.  So I have a rule that I call the "50/50" rule.  So far it has held up very well and not been proven false or faulty under any conditions.  So far.  What is it?

The 50/50 rule boils down to 50 percent given, and 50 percent applied.  In other words, most things in life that qualify as being an "opportunity" actually consist of 50 percent existing conditions combined with 50 percent leveraging.

A person's succes in life is 50/50.  50 percent what they're born with plus 50 percent what they do with it.

A business' success if 50 percent what they have and 50 percent what they do with it.

I thought of this today at work.  I have a habit of pausing to take in the surroundings and try to consider things I normally overlook.  It can be visual, auditory, or just gut feeling.  But today it was about: what is it about the office that makes it a great place to be?

It's a combination of two things, which are EXTREMELY rare to find in one place:

  • People who are fun to be around
  • People who want to accomplish "new things"

Sounds basic enough.  This isn't really the 50/50 though.  This is actually 25+25 that adds up to the 50 percent of what they have.  Management and workload are what make up the other 50 percent.

You can hire cool, talented people.  But if the management sucks they will soon leave.  If the workload sucks, they will soon leave.  The potential is wasted.  Likewise, you can have great management, a fantastically innovative business idea and all the money and resources in the world.  But if you can't hire the right people to glue it all together, it will also soon fall apart.

After years of shuffling between disperate business cultures and office environments, I have found just how incredibly rare it is to find both of these in one place.  We have a group of people that are sharp, funny and work well together, combined with a management layer that understands not only their value, but what challenges and interests them day to day.  That means they are able to look ahead and chart a path that guides the workload to the workers in a way that is challenging but not dumb or boring.  They also allow them a ton of latitude to come up with their own solutions, as long as they can quantify and prove them at game time.

50 percent great talent, plus 50 percent great management.  Rare indeed.  And the most interesting part of this is that most of the people involved (not all, but most) don't have a lot of outside, comparative experience to gage just how rare it really is.  It's kind of like a girl that's really hot but really doesn't believe she is hot.  I know - that's even more rare.  But you get the idea.  I have to soak this up while I'm able to.  I try to learn from every experience.

Read More
Posted in business, consultants, cranium drainium, management, people, technology | No comments

Tuesday, 3 May 2011

VBScript Bulk Import for MDT 2010

Posted on 19:54 by Unknown
Michael Niehaus had posted a nice blog article on using PowerShell to perform bulk import of computers into MDT 2010.  My near-term project pipeline has me working more with VBscript and ASP than PowerShell, so I needed to figure out a way to port at least a basic portion of Michael's efforts to help with what I was working on.  I didn't go as far into building out a mini-API like he did, but I did manage to get the bare minimum working: bulk computer import.  The script is only built for reading a simple CSV format text file right now, but it could easily be modified to read from XML or Excel or pretty much any FSO or ADO data source.  The script is posted on my download page at https://sites.google.com/site/skatterbrainz/downloads/mdt2010.vbs.txt?attredirects=0&d=1   Read the comments in the heading (including the snooze-fest disclaimer stuff) and kick the tires. Let me know if it works for you or not?

ok, actually, the path that led me to Michael's article was like this:  I downloaded MDT Web Frontend from Codeplex and played around with it.  I emailed Maik Koster about how to make it capable of bulk/batch computer import and he pointed me to Mitch Tulloch's tutorials on MDT 2010 and the one (part 22 actually) on using Michael Niehaus' bulk import PowerShell script.  Phew!  See what happens when you fall down a slippery slope?  Amazing things happen.
Read More
Posted in mdt, powershell, scripting, vbscript | No comments

Monday, 2 May 2011

Windows Web Admin build 2011.05.02.001

Posted on 14:46 by Unknown

This will be the last build update for a while I think.  I'm quickly running out of free time and will have to put this on hold for at least a few weeks or a month or so.  This update includes quite a lot of changes and enhancements.  I've added several new Active Directory reports and a new page just for those (like I did earlier with the SCCM reports).  Among the changes:

1. Moved AD reports to their own page

2. Added new AD reports

3. Modifed AD FSMO report to link over to computers report

4. Users report shows icon for "user" versus" contact rows

5. User details now shows GUID values

6. Added Contact details

7. Renamed "Reports" to "SCCM Reports"

https://sourceforge.net/projects/wwadmin/

Read More
Posted in active directory, config manager, network administration, projects, system center, web, web development, wwa | 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)
    • ►  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)
      • A Quasi-Scientific Analysis of DoucheBaggery
      • Programming Thoughts
      • Stupid Geek Tricks: PowerShell, VBscript, Jscript
      • The 10 Basic Laws of Scripting
      • What’s Wrong with this Blog
      • Assorted Ways to Detect .NET 4.0
      • Wise is Dead
      • Another AutoCAD 2012 Install Script Spin
      • AutoCAD Deployment with Configuration Manager, Scr...
      • Microsoft Tech-Ed 2011: Memorable Moments
      • Back Home from Tech-Ed 2011
      • Windows Web Admin - Decision Time
      • Windows Web Admin Update
      • Tech-Ed 2011, Moving, and Chromebook
      • AutoCAD Profiles
      • I'm Almost Semi-Famous!
      • Counting Grains of…
      • The 50/50 Rule
      • VBScript Bulk Import for MDT 2010
      • Windows Web Admin build 2011.05.02.001
    • ►  April (38)
    • ►  March (61)
    • ►  February (54)
    • ►  January (1)
Powered by Blogger.

About Me

Unknown
View my complete profile