Toby 的个人资料Aussie Dev Head照片日志列表更多 工具 帮助

日志


5月15日

OMPM tool

PREREQS
http://www.microsoft.com/downloads/details.aspx?FamilyID=51d4a154-8e23-47d2-a033-764259cfb53b&DisplayLang=en
SQLXML 3.0 SP3
http://www.microsoft.com/downloads/details.aspx?familyid=13580cd7-a8bc-40ef-8281-dd2c325a5a81&displaylang=en
OMPM
 
http://technet.microsoft.com/en-us/library/cc178974.aspx
 
DEPLOY AND COLLECT SCANDATA FROM SCAN TOOL
[[C:\ompm\Scan]]
deploying offscan w/ sms
http://technet.microsoft.com/en-us/library/cc179228.aspx
 
[[C:\ompm\SCANDATA]]
collect logs from each client, (using offscan.exe /p /d)
 
PROVISION DATABASE
[[C:\ompm\Database]]
prepare the sql db
CreateDB.bat <ComputerName>\<SQLServerName> <DatabaseName>
// CreateDB.bat COMPUTER1\SQLEXPRESS OMPM001
 
IMPORT DATA INTO DATABASE
[[C:\ompm\Database]]
and import the client logs
this is made up of importing data files..
ImportScans.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
 
And using the Import OMPM File Scanner to import action files into the database
ImportActions.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
http://technet.microsoft.com/en-us/library/cc179204.aspx
 
To obtain help for this command, type the following at a command prompt: ImportScans.bat /? or ImportActions.bat /?.
 
PRODUCT REPORT
[[C:\ompm\Report]]
now analyse the data
double-click OMPM.accdr. Click Yes at the security prompt.
http://technet.microsoft.com/en-us/library/cc179165.aspx
 
 
FILTER REPORT TO CREATE MAP OF UPGRADE STORY
filter results by column "Error Description" does not equal to.. "File Type Not Supported by OMPM Deep Scanner."
look for "1307
 Linked workbooks in the file
 Linked workbooks are indentified to help identify upgrade issues. The path to the linked workbook and the number of occurrences are identified. Linked workbooks will have different extensions when converted to the Office Excel 2007 file format."
 
are examples of filtering the report.
 
USING REPORT TO MAKE CONVERSIONS
http://channel9.msdn.com/wiki/officedeployment/ompmv1/Default.aspx#Mode=Edit?wa=wsignin1.0
http://channel9.msdn.com/Wiki/OfficeDeployment/OMPMHowTo/
http://channel9.msdn.com/Wiki/OfficeDeployment/OMPMOFC/
 
 
 
\=============================\
DATABASE RECOVERY STEPS
Delete and restore the OMPM database
At a command prompt, navigate to the OMPM\Database folder and type:
DeleteDB.bat <ComputerName>\<SQLServerName> <DatabaseName>
For example, if your computer name is COMPUTER1, the database server is SQLEXPRESS, and the database name is OMPM001, type the following at the command prompt:
DeleteDB.bat COMPUTER1\SQLEXPRESS OMPM001
 
At a command prompt, navigate to the OMPM\Database folder and type:
CreateDB.bat <ComputerName>\<SQLServerName> <DatabaseName>
For example, if your computer name is COMPUTER1, the database server is SQLEXPRESS, and your new database name will be OMPM001, type the following at the command prompt:
CreateDB.bat COMPUTER1\SQLEXPRESS OMPM001
 
Move all of the CAB files that are in the OMPM\SCANDATA\OMPMImported folder up one level to the OMPM\SCANDATA folder, or to another folder if you prefer.
Move all of the folders that are in the OMPM\ACTIONLOGS\OMPMImported folder up one level to the OMPM\ACTIONLOGS folder, or to another folder if you prefer.
 
At a command prompt, navigate to the OMPM\Database folder and type:
ImportScans.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
For example, if your computer name is COMPUTER1, the database server is SQLEXPRESS, the database name is OMPM001, and your log files are stored in c:\OMPM\SCANDATA, type the following at the command prompt:
ImportScans.bat COMPUTER1\SQLEXPRESS OMPM001 c:\OMPM\SCANDATA
 
At a command prompt, navigate to the OMPM\Database folder and type:
ImportActions.bat <ComputerName>\<SQLServerName> <DatabaseName> <PathToLogFiles>
For example, if your computer name is COMPUTER1, the database server is SQLEXPRESS, the database name is OMPM001, and your log files are stored in c:\OMPM\ACTIONLOGS, type the following at the command prompt:
ImportActions.bat COMPUTER1\SQLEXPRESS OMPM001 c:\OMPM\ACTIONLOGS
 
7月16日

Visual Studio Extensibility

hehehe back to my favourite topic...
 
Visual studio extensibility!
 
Just been completing some work in the VS extensibility realm, working with such esoteric interfaces as IDTExtensibility2 and the new-ish IDTCommandTarget.
 
I have learnt two things from working on these types of projects.
1. There is barebones method headers and parameter listing type documentation only.
2. MSDN blog writers and the wonderful resource site at MZTools are your best friends.
 
These types of projects are incredibly fun to work on, especially since you typically grow your solution organically, refactoring things as you go, with a VS Macros project first.  Once your procedure code is correctly debugged, porting is a snap, with almost everything being simply a case of just selecting the lot in VS Macros IDE and dumping it (at least initially) into a Connect.cs (or .vb) class in your Addin.
 
The Connect.cs class is a special class that has been preconfigured with the IDTExtensibility2 interface and method signatures.
The first thing you will be doing is adding IDTCommandTarget, and giving your addin a programmatic UI. (whilst in VS Macros testing, you are encouraged to use the Customize... menu in VS IDE to add buttons and assign them macros).
 
Once you have this interface you will no doubt be busy copying code from all over the intawebs.
my suggestion is try to minimise the amount of UI that you use once the user clicks on your magic button.
 
My first few attempts resulted in unwieldy forms that actually made me less productive than just using my 80+ wpm programmers hands to bang out some code.
 
The VS Ext model is incredibly powerful, and if you think hard enough, and study the VS object model carefully enough (there are actually 3 + major object model - covering code automation, the IDE UI, and solution/project management) you will realise that almost everything can be automated away with only minimal guidance from the user (up to a point!)
 
If your a C++ fiend, then the VS extensibility story only gets better. C++ solutions, have additional automation libraries that are so good that given the presence of a non-existent terminator style AI system could probably make all programmers extinct once and for all! :D
 
Links: