Thursday, March 25, 2010
Visio Viewer 2007 Red X Problem
Red X appears when attempting to open Visio documents from Internet Explorer via Visio Viewer 2007
Resolution
Download and install Visio Viewer 2007 SP2
Download and install Security Update for Visio Viewer 2007 (KB973709)
Originally posted at technet forums by CCI_Dave
Tuesday, February 23, 2010
Recovering lost offline files
The steps are:
1. Download a Microsoft tool called CSCCMD.EXE
2. Run the following command:
CSCCMD /extract /target:c:\yourrestorefolder /recurse
This will pull the entire contents of the offline files repository from c:\windows\csc into c:\yourrestorefolder
Make sure that c:\yourrestorefolder is completely empty when using the /recurse switch.
A common cause of this problem is if you have a storage quota on your network drive and are trying to sync more files from your laptop than you're allowed to keep.
Monday, February 15, 2010
Virtual PC performance problems on Lenovo T61
The specific fix depends on the laptop brand and model.
For a Lenovo T61 or similar, posts and comments I have read out there suggest disabling power management completely. However this will cause shortened battery life when not on AC.
So I tried to disable power management only when connected to AC, as follows (based on the assumption that virtual pc won't be used when running on battery):
- Reboot
- Hold down F1 to go into BIOS
- Select Config: Power: Intel SpeedStep: Mode for AC
- Change from Automatic to Maximum Performance
Wednesday, February 10, 2010
Board 7 prerequisites
Board 7 Client launch fails with unexpected error
Cause and Solution
Missing prerequisites
If you're installing Board 7 on a sandboxed environment with limited or no internet connectivity then you have to manually install the prerequisites from redistributable executables.
Symptom
Can't connect to Local Engine from Client
Cause and Solution
No "first user" (i.e. administrator) specified. This is achieved from Server Configuration.
Subsequent users are created in the client.
Tuesday, February 9, 2010
Windows Server 2003 sandbox and activation
Scenario:
Windows Server 2003 in its own workgroup installed and connected to a domain that uses a proxy server for handling external connections
Problem:
How to activate Windows Server 2003 over the internet?
All external connections must be authenticated by providing a domain username and password to the proxy. Windows Activation doesn't provide an opportunity to enter these - it only offers custom specification of the proxy.
Solution Options:
- Use a volume license key instead - this doesn't require activation (however you have to have the volume license version of the software)
- Use telephone activation. Tedious but it works
- If you are mute or can't use telephone activation for other reasons? To be completed
Tuesday, December 22, 2009
SSIS handling errors in control flow
FailParentOnFailure = True
MaximumErrorCount = 99999 (an "infinite" value)
Monday, December 21, 2009
SQL Server Agent Jobs and GUI Automation
An application vendor has provided an application database maintenance utility that only has a GUI interface. You want to automate this maintenance activity as a SQL Server Agent job.
The best solution would probably be to tell the vendor to add a command line interface to the utility to facilitate unattended use. Unfortunately the vendor may be unable or unwilling to achieve this.
A Solution
- Use AutoIt to script and compile an executable that will perform unattended execution of the ute
- Call the AutoIt-generated exe from a SQL job using CmdExec
Step 1 is challenging, particularly if the vendor's utility is complex or poorly documented. Step 2 can be difficult to implement due to environment constraints.
With AutoIt you have the choice of
- installing the AutoIt environment and running the .au3 script file
- compiling a .exe from the script
In my experience you'll have far less trouble getting the exe approved by change control than requesting deployment of the entire AutoIt installation.
1. AutoIt
AutoIt v3 is the latest available version. The download contains a useful help file and example scripts. The web also has plenty of documentation and forum discussions on most topics you might be interested in. I'll just cover off a few points I thought were important:
- The language is a variant of Pascal
- Line continuation is performed with _
- Carriage return & line feed is represented by @CRLF
- Variable $CmdLine[0] contains the number of command line parameters provided
- ConsoleWrite() can be used to provide feedback and debug info
- The included Au3Info.exe is a handy GUI spy for identifying those much-needed CLASS and INSTANCE values
- Some functions are not suited to unattended use (see Q21 excerpt from AutoIt FAQ below)
- If your script is too fast, add some Sleep(n) statements to let the GUI catch up
- With the WinExists() function, AutoIt is able to handle GUI events that are too fast for a human to intercept or even perceive. Therefore writing a script based on manual user steps may be insufficient to properly control the GUI
A21. On locked station any window will never be active (active is only dialog with text "Press Ctrl+Alt+Del")In Windows locked state applications runs hidden (behind that visible dialog) and haven't focus and active status.
So generally don't use Send() MouseClick() WinActivate() WinWaitActive() WinActive() etc.Instead use ControlSend() ControlSetText() ControlClick() WinWait() WinExists() WinMenuSelectItem() etc.
This way you may have your script resistive against another active windows.and it's possibe to run such script from scheduler on locked Windows station.
2. SQL job
The SQL Server Agent is a service. By default, services do not interact with the desktop. This means your AutoIt exe can launch the utility but will be unable to detect or use any of its GUI elements.
To allow SQL Server Agent to interact with the desktop:
- Start:Administrative Tools:Services
- Right-click SQL Server Agent and select Properties
- Select the Log On tab
- Select Local System Account, check "Allow service to interact with desktop" and click OK
- Restart SQL Server Agent (right-click and Restart)
Note the checkbox "Allow service to interact with desktop" is only available for the Local System Account. To use other accounts, they would need to be enabled to "Act as part of the operating system".
Potential problems are around whether Local System is suitable for running the agent service. Local System may not be suitable for other jobs on the same server. Some jobs may need permissions to other servers and it may not be appropriate to grant them to Local System.
A workaround would be to create a separate SQL Server Agent instance on the same server, just for jobs that need to interact with the desktop. However the additional instance will consume server resources.
A minor annoyance: a desktop-interaction-enabled SQL Server Agent will insist on keeping a Command Prompt window open while it's running.