All posts by admin

SOAP query for pulling data from a sharepoint list into Report Builder with a specific View

<Query><SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction> 
   <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems"> 
      <Parameters> 
         <Parameter Name="listName"> 
            <DefaultValue>{8529D70B-D632-4CC8-A1E7-2C25F29BE1E0}(this could also be a list name, it doesn't have to be a GUID)</DefaultValue> 
         </Parameter> 
         <Parameter Name="viewName"> 
            <DefaultValue>{2FC6AA42-EA95-4C18-AB07-33E25EBBA85D}(could also be a view name)</DefaultValue> 
            <ViewFields> 
               <FieldRef Name="Resolve_x0020__x0023_" /> 
               <FieldRef Name="Product" /> 
               <FieldRef Name="Release" /> 
               <FieldRef Name="Theme" /> 
               <FieldRef Name="Pre_x002d_Req_x0020_Estimate" /> 
            </ViewFields> 
         </Parameter> 
      </Parameters> 
   </Method> 
   <ElementPath IgnoreNamespaces="True">*</ElementPath> 
</Query>

PHP getmonth function

PHP doesn’t offer getmonth, getday or getyear.

Instead use this:

$unixtime = strtotime($test);
echo date(‘m’, $unixtime);
echo date(‘d’, $unixtime);
echo date(‘y’, $unixtime );

strtotime creates a unix style time (The number of seconds since some point in time around 1970)

Once you have that, you can use the date function as shown.

OnLine Backup done safely and cheaply

A few posts back I wrote about a program called SuperFlexibleFileSynchronizer.

My latest project is to Scan all the papers in my file cabinet. That’s a little scarry. There’s information in there that I can’t afford to loose, yet most of it is private enough that I wouldn’t really trust it being stored online.

So today’s post talks about one possible solution for that, using Dropbox and SFFS.

DropBox:
Dropbox is a great online storage service. You put things in your local dropbox folder, and it copies them to the dropbox server. Dropbox has only one problem, and it’s a problem shared by any and all online backup systems: Security.

Call me an untrusting person, but I don’t trust that information put on Dropbox will stay private. It’s just too big a target for a hacker to avoid. At some point, it will be compromised. I feel this way about all online storage.

So what’s the solution?

Encryption.

Encrypt the data here, then put it on the Dropbox folder.

Now there are two ways to do this –
a) encrypt everything into a single file like a zip file or truecrypt volume
or
b) encrypt everything individually

The problem with a) is that you’d need to re-upload the entire file for every change, which isn’t really practical.

The problem with b) is that once the file is encrypted, it’s not as easy to compare the encrypted file, so incremental backups become an issue.

Enter SFFS. SFFS has an elegant solution to the problem. SFFS can make a backup where the folder structure is replicated, but each file is zipped with AES encryption. SFFS also keeps a signature for each file and puts it in the file name. In this way, SFFS is able to do incremental backups, comparing the unzipped originals to the zipped & encrypted copies.

Perfect.

For me.

To be clear: the names of the folders and files are visible, so if you’re dealing with super secret stuff, you’ll want to take that into account.

For my needs, I think it’s enough extra protection that I’m happy with it.

Now, if a hacker ever gets into dropbox, they’ll need to do some extra work to get into my files. Could they do this? Absolutely. Would they do this? Probably not. There would be so many other files that aren’t protected that my files wouldn’t be worth the hackers time.


Keeping multiple PC’s in sync

I’m a computer guy.

In the beginning, life was simple. You had one computer – you kept your files on it. If you backed up, you did so to a floppy disk.

Today, I have a few computers, and I use them for different things, but I need my data on all of them. If they were all desktops, Life would be easy – keep all the files on one, then share it out to the rest. Add a laptop and things get messy.

What I want is to have a local copy of all my files, and have those automagically copied to and from the server whenever changes take place.

For that, I’m using SuperFlexible File Synchronizer.  I’ve tried over a half dozen apps on the Mac for Sync and this one is by far the best. It’s also available in a Windows version, which is awesome, because one of my computers is a windows computer -that solves the problem of what to do there, and SF is available as a bundle that includes both versions.

What makes SuperFlexible better than the others? Control & Options. Superflexible lives up to it’s name. Do you need scheduled sync – no problem. Exclude .DS_Store? Got it. Need to sign into a Windows server before you run the backup? Done. I could go on and on – it seems to EVERYTHING. Here’s a few more things it can do – it can encrypt and zip each file so you can backup to internet based storage like Amazon S3 or Google without worrying about your data being exposed. It can detect when files move so they aren’t simply re-synced. It can add version numbers to your files when it copies them over.  The interface is well refined too. When you run a sync, you can do so in the foreground or background – background is kind of like Autopilot, where foreground gives you a bunch of information – what files are going to copy, in what direction etc…  Here’s an area that set this one apart – you can right click on any file before it’s synced, and tell it what direction to sync, to ignore it, to delete it from one but not the other etc..

I also found it rewarding that during testing, I wiped out the target folder, and on the next run, SF came up and asked if the folder should be re-created. (other tools have given an error in this scenario)

My setup is as follows:
I have a folder I keep all my stuff in. I keep a copy of that folder on my Mac Laptop, and another copy on my home server. On the Mac, I have a Sync job setup with SuperFlexible File Synchronizer that keeps things in both places up to date.  This way, when I’m on my laptop, I’m always working with a local copy of my data. If I take the laptop on a trip, that data comes with me. When I get home, it copies it to the Server.

SuperFlexible File Synchronizer also has some other good qualities and I hope to use it for online backup soon as well. It supports backing up to Amazon S3, and Google storage support is in Beta as of this writing. It also supports FTP & Webdav folders (such as apple’s iDisk). And as mentioned above, it supports zipping and encrypting files which makes me far more comfortable using online storage as a backup target.

Epson GT-S50 Scanner thoughts

I recently picked up an Epson GT-S50 Scanner for a project I am working on for a client.

My Client’s office is using Windows, and at home I have a combination of windows and Mac.

I’ve read tons of great reviews on the Fujitsu ScanSnap scanners (like the S1500), but you have to buy a mac or windows version of those, and they only work with the built in software.  There were some issues when Mac OSX 10.6 Snow Leopard came out, and the scanners lost a lot of functionality for a few months while Fujitsu readied new software.

The big draw to the Fujitsu is how good the software is that comes with it. It does a bunch of things for you – and may people say it “just works”.

After reading a review on the Epson GT-S50 online, I knew the software wasn’t as polished, but wondered how far off it would be..

Impressions:

I connected the GT-S50 to my Macbook Pro and installed all the latest drivers.

The epson has a nice 2 line display that tells you what’s going on, and on Windows you can see what preset you have selected, along with the description.  On the mac, the description is gone, you see Job 01, Job 02 etc…

One button scanning is HORRIBLE. Awful, the worst.  It takes FOREVER to even get the thing started. In fact, I thought I’d time one and it’s been 2 minutes and the software still hasn’t scanned (the panel says Scanning and the software launched on the mac so it’s doing something.) When I hover over the ‘Progress’ Window, I get the beachball of death.

Ok 3 minutes in and I’ll ‘force Quit’, but the scanner still thinks it’s scanning.

Click the red button on the scanner, – power light stops flashing, display still says Scanning.

I thought I’d scan once manually with the Epson scan software, but when I launch that, it shows the icon in the doc, but no menu.

I tried launching Apple Image Capture, but the scanner doesn’t show up so it’s now time to power cycle the scanner.

At this point I’m thinking the scanner sucks, but in reality, the software they have for ‘one touch’ sucks.

The reason you’d buy an Epson over the Fujitsu is because it has a twain driver, and the Fujitsu does not. This means you can use other software with the scanner.

So now I’m out to find out if any of the other software is any good.

I have adobe Acrobat Pro 9.3 installed, and it can scan using the twain driver.

Acrobat does a great job with the scanner, it’s just a little slow. The whole process is slow, but…
If you use Acrobat to scan, you’re pretty much done when you’re done. Since Acrobat Pro does the OCR, the deskew, the page rotation, the auto page sizing & the image compression there’s no need to go into another program to clean it up. In fact ,after you scan, your document is sitting in acrobat, waiting for you to save it – So you don’t even have to go find it and rename it. When you’re done, you’re done…

Still I wondered if I was missing out on the scansnap  – There’s so many good reviews of that thing.

I thought about it for a bit, but decided that the twain interface was something I really liked the flexibility of having.

And the Epson scanner seems better built (11 lbs vs the 6lb fujitsu)

And I’d read more than once about the fujitsu misfeeding issues.

So at this point I feel the Epson has the best hardware, but not the best software.

Enter Image Capture.

The macs come with a program called image capture.

I opened it, and my scanner was there, so I used that – It was fast!

it doesn’t do everything that acrobat does, but if you need to whip up a quick letter sized pdf, it does the trick – quickly!

This has me on a hunt for more apps that support the image capture interface.

So far I’ve had little luck.

I tried 2 or 3 apps that support image capture and in all cases the scan comes up as a gray box.

So I’m not sure what’s up, but somethings up.

I’m also not sure if the image capture driver came from epson or apple.

I need to hook it up to a second mac, one that hasn’t had the epson drivers installed, to see where the drivers are coming from, and then hopefully I can point to either apple or epson and get the problem fixed.

(for all I know the image capture driver might be using the twian driver and not displaying the dialog)’

Making a WinPE CD with HP SmartArray Raid Drivers

The other day I had to extend the C partition on a server.

Microsoft has a command for this, it’s part of DISKPART.EXE

Unfortunately, the needed subcommand is “EXTEND” -which fails on the Boot parition (aka drive C)

Fortunately, there’s an easy way around this – boot from a winPE CD, and the CD becomes the Boot Partition, freeing the C drive for the extend operation to work it’s magic.

Making a WinPE disk isn’t hard, but it’s not as easy as downloading and burning an iso either. In total, there’s 8 commands I needed to enter to make my custom WinPE iso.

About WinPE

WinPE is a ‘PreInstallationEnvironment’ – whatever that means!  To me, it’s a bootable CD, that brings up a windows command prompt. I’ve used one in the past to get files off a retired server that I no longer had access to the password for – boot from winpe, copy the files to a usbkey, done.

Where do you get it?

If you have access to technet or MSDN, you can download something called the windows Automated Installation Kit (Windows AIK) This is filed away with different versions of Windows, it’s not under a menu like tools, or applications, I found it mixed in with Windows 7 as well as 2008R2. Both locations list the same ISO for download.

Unfortunately, the iso you get from technet is the AIK Iso, not the ISO of the WinPE CD you want to burn. You have to first download the AIK then follow the steps below to construct a WINPE iso customized with the drivers you need for your raid card.

Lets begin,

Download the AIK

While you’re waiting for the AIK to download, you’ll also need drivers for your raid card.  You’ll need both the driver (usually a .sys file) and a .INF file. In my case, I looked at device manager to see what driver (.sys file) was in use by the raid card, then I went to HP’s website and downloaded a driver set, extracted it and confirmed that the .sys file I needed was there – there was a .inf with the same name, so I figured I was in business….

(back in a few, waiting for this to download…)

Burn the ISO of the AIK to a DVD (or extract the iso to your hard drive)

Run the Windows AIK Setup (there’s a link to it on the autorun that pops up)

Once thats done you’ll have a new folder in your start menu ‘Windows AIK’ open that folder.

Have a look at the Windows PE manual under documents.

The section I used was ‘Customizing Windows PE’->’Windows PE Walkthroughs’->’Walkthrough: Create a Bootable Windows PE RAM Disk on CD-ROM’

What this does is help make you a bootable CD that will load itself into Ram – you’ll know its running in ram, because the command prompt points to drive X: which is the ram disk.

Before you get started with the above walkthrough, have a look at one more section:

‘Customizing Windows PE’->’Windows PE Customizations How-To Topics’->’Add a Device Driver to an Offline Windows PE Image’

ok what does that mean? well there’s another help option for ‘online’. What’s the difference? Well ‘Online’ means you’ve already booted from the CD, we are still building our CD so we want to use the advice for the ‘offline’ that way, once our CD is done, we won’t need to do anything else to use the driver.

Ok now if you’re clever, you’ve read both sections and have noticed theres something a bit off in trying to merge the two sections – the instructions in the walkthrough tell you to copy winpe.wm to \iso\sources\boot.wim,

but then in the driver section, they tell you to open the winpe.wim to change it. I did so, then when I was done, I just recopied the file to the boot.wim…

Here’s the list of steps I followed:

  1. started deployment tools command prompt as administrator
  2. ran copype.cmd x86 c:\winpe_x86
  3. Dism /Mount-WIM /WimFile:c:\winpe_x86\winpe.wim /index:1 /MountDir:c:\winpe_x86\mount
  4. Dism /image:<path_to_image> /Add-Driver /Driver:(Here I put the folder path to the folder with the .inf and .sys files) /recurse
    (the /recurse causes all the drivers in that folder to be added)
  5. dism /unmount-wim /Mountdir:c:\winpe_x86\mount /commit
    At this point, we’ve altered the winpe.wim (which is basicallly a fancy .iso file)
  6. copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim
  7. oscdimg -n -bC:\winpe_x86\etfsboot.com C:\winpe_x86\ISO C:\winpe_x86\winpe_x86.iso
    (this created an actual .iso you can burn with your burning software)
  8. Burn the .iso to CD. I used the free & excellent ImgBurn

That’s it!

8 relatively simple steps and you’ll have a bootable Windows PE CD with the Raid drivers of your choosing!

Pearnote

Pearnote (http://www.usefulfruit.com/pearnote/) is a really clever idea – a sound recording app, along with a text editor.

As you type, some hidden data is stored with your text linking it to that position in the audio recording app.

I can’t imagine how awesome this would be if you were a student and wanted to take notes, and record a lecture on your laptop.

Great idea!

Shareware donation post

I try and offer support to shareware authors whenever I find something useful.
I’ve donated to enough authors that it’s getting hard to keep track.

So this will be my official ‘I’ve already sent these people money’ post.

Donationcoder.com – numerous small donations.
Imageburn
the Tortoise SVN client project $5
Cobain backup
The author of the Arclite theme that this site uses $10

Getting started with Debugging Part2: Checking out a Crash Dump File.

In Part 1, I showed how to install and configure the debugging tools for windows, and setup the symbol files to download from Microsoft.

In this part, I’ll show how to use the debugging tools to analyze crash dumps from windows when it crashes and gives the ‘blue screen of death’

Precusor: Setup Windows to generate a crash dump file

Windows doesn’t necessarily need to create a crash dump file, but it’s a good idea to do so.

In the system properties control panel, On the advanced tab, click ‘Startup and Recovery->Settings’ (This is right above where you had to set the environment variable from part1)

Be sure there’s a memory dump type selected. Note that “Kernel memory Dump” = “full memory dump” and you’ll need a swap file on your C drive thats at least as big as your RAM.

Memory dump locations:

  • Kernel/Full: c:\windows\MEMORY.DMP (Only one copy kept unless moved/renamed)
  • Small/Minidump: c:\windows\minidumps

One more interesting tidbit – you can set windows up to allow you to crash it at will – That’s a topic for another article.

———–

Checking out your first crash dump file:
Start WinDbg
(the first time you do this it takes a while as it downloads the symbols)
File->Open Crash Dump…
Find your crash dump file.
watch the output…

If you’re lucky, You’ll see a line such as:
Probably caused by: filename.ext

Many times, this first step of opening the crash dump tells you what you need to know.

Sometimes it doesn’t and you want to look a little deeper.

The next thing to try is often
!analyze -v

think of the debugger as a CMD window – you won’t find !analyze -v in the menus, but you can type it in at the > prompt.
(You can also click it if you see it in the display)

 If this doesn’t work the options get a little tricker…

In my next post, I’ll show a few hand picked commands that let you see what was running.

Getting started with Debugging Part1: Setting up the Debugger and Symbols

Overview:

   This article will show you what you need to read into a windows crash dump file…

   What you’ll need:

  • Debugging tools for windows
  • Symbol files

  Download Debugging tools for windows –
  Rather than including a link, I recommend searching for ‘debugging tools for windows’
  You should find a bunch of links on a Microsoft site to download the latest version.

    What to download?

  • if your OS is 32bit, download the x86 version
  • if your OS is 64 bit, download Both the x86 and x64 versions. (the reason for this is that you’ll use the 32 bit debugger to debug 32bit crash dumps from other machines, and also 32bit apps running on your 64 bit machine. – also note, there are 2 64 bit verisons on Microsoft’s website – 99% of us want x64, not Itanium)

    I assume you can downl0ad the 1 or 2 debuggers you’ll need, Go ahead and run the setup for each and install them to thier default locations.
We’re not quite ready to do anything with the debuggers yet, first we need to discuss Symbol Files…

Symbol files:
      You’ll want symbol files when you look at a crash dump or debug an app.

 

     Symbol files are tied to each piece of software – Ideally you’ll have them for everything on your system.

     Unforunately, that’s rarely possible. The good news is you can get them for Windows, and that’s often enough.

     In the old days, you’d download the symbols you think you’d need from Microsoft and install them on your machine.

     That’s no longer necessary. The current Debugging tools for windows supports auto downloading symbol files from microsoft as needed.
Unfortunately, the debugging tools don’t work that way out of the box, so that’ll be the first thing we get setup…

  Setting up windows, so your debugger knows what to do about symbol files
  It’s a shame this isn’t default behavior, but at least it’s not that hard…  I’ll show you how to configure an environment variable in windows, which the debugger will use automatically each time it runs. You don’t have to do this, you can still run the debugger without doing this, or you can run the debugger and then tell it manually about the symbolfiles, but you’re better off doing the environment variable thing now – get it out of the way so you don’t have to worry about it later…

  Setup the Environment Variable _NT_SYMBOL_PATH 
  Set it to SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols

  To do this, in windows, right click on ‘my computer’ or ‘computer’ and click ‘properties’.  Earlier versions of windows show a nice tab dialog, later versions of windows (Vista, 2008, 7…) show a fancy screen also known as the ‘system’ control panel – if this iswhat you see, then click on ‘Advanced System Settings’. Now you should see what your XP friends saw 2 sentences ago- the “System properties” dialog – click on the ‘advanced’ tab, then on the ‘environment variables’ button.

 Add a new system variable and name it _NT_SYMBOL_PATH (note the text begins with the underscore) 
  Set it to SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols

 Notice in the line above there’s some references to the directory c:\mysymbols – We need to create that directory now. (If you want it somewhere else, that’s fine, just be sure to change it in _NT_SYMBOL_PATH.

The other bit of interest is that link to microsoft’s symbol website..

Basically what we’ve told the debugger is:

  1. Look for symbol files in c:\mysymbols
  2. If you can’t find them, look for them at the website http://msdl.microsoft.com/download/symbols

If you didn’t create the c:\mysymbols directory yet, do so now…

If you have 2 debuggers installed (x86 and x64) you only need to do the above once.

Congratulations! You’re all setup.

Closing Comments:

The easiest thing to forget here is likely the environment variable _NT_SYMBOL_PATH and what to point it to.  Fortunately, this is actually pretty easy information to find in the help file.
After installing the debugging tools for windows, Open the help file, click the ‘index’ tab, then enter the word ‘env’ (you can type out environment variables if you want, but it finds them after env)

Environment variables brings up 2 sections, General and Kernel-Mode – you want General. The page that appears shows all the _NT_YADA_YADA_YADA variables. NT_SYMBOL_PATH is the 4th one down.
You have to click one more time to find out what to set it to, in the description there’s a link to ‘Symbol Path’ – click that and get a page talking about he symbol path – down towards the bottom in red, is the symbol path you need.

In my next part, I’ll show how to open a crash dump file and a few easy commands you can use before you go searching google for that long hex code you wrote down by hand when your system blue screened.

iPhone Stuff

turn your iPhone into an SPL meter with ‘Studio Six Digital’s’ applications.

Software to use your iPhone as a wifi hotspot: http://www.junefabrics.com/iphone/index.php

http://sciphoneapps.com

An alternate to browsing software in itunes: http://www.appshopper.com

http://www.iphoneappstore.us

http://www.jaadurdp.com

An app to get email alerts on your iPhone: http://www.intelliborn.com (look for myProfiles)