Microsoft KB Archive/821584

= Visio2002: Traditional Chinese (CHT) Version of Visio Has the Wrong Startup Path =

Article ID: 821584

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft Visio 2002 Professional SR-1
 * Microsoft Visio 2002 Standard SR-1
 * Microsoft Visio for Enterprise Architects 2002

-





SYMPTOMS
When you start the Traditional Chinese version of Microsoft Visio 2002 SR-1, add-in programs in the 1028\Startup folder do not run. If you examine the value for the Start-up option on the File Paths tab of the Options dialog box, you notice that it contains an extra backslash in the path: 1028\\Startup.



CAUSE
This problem occurs if you install Microsoft Visio 2002 SR-1 Traditional Chinese.



WORKAROUND
To work around this problem, use one of the following methods.

Fix the Startup Path Manually
Manually correct the startup path. The following corrective steps have to be performed by each Visio user of the computers that are being fixed:
 * 1) Start Visio.
 * 2) On the Tools menu, click Options.
 * 3) Click the File Paths tab.
 * 4) Change the value for the Start-up option to 1028\Startup.

Note that there should only be one backslash in the path and not two.
 * 1) Click OK.

Change the Startup Path with Logon Script
To deploy a workaround to many computers, the network administrator may include the following code in the logon script to correct the relevant registry value.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, see the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For additional information about the support options available from Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

' SampleLogin.VBS --- ' sample windows script to Fix-up 1028\\Startup path in Traditional Chinese Visio 2002 ' 1. If registry contains &quot;\\&quot;, machine is potentailly affected by this problem '    --> Replace &quot;\\&quot; with &quot;\&quot; except if beginning the string or immediately after semi colon (UNC) ' 2. If key is missing '   --> Check list of installed products for any version 10 products containing the name '      &quot;Microsoft Visio Standard&quot;, Microsoft Visio Professional&quot; or &quot;Microsoft Visio for Enterprise Architects&quot; '      Check local package for ProductLanguage if InstallDate is latest '      Builds startup Path \Startup and stores in HKCU

CONST STRKEY = &quot;HKCU\Software\Microsoft\Visio\Application\StartUpPath&quot; CONST STRFOLDERDEFAULT = &quot;Startup&quot; Dim astrPaths          'Array of paths in StartUpPaths option Dim strRegValOriginal  'Original Registry Value for StartUpPath Dim strFolder          'Individual folders listed in semicolon separated values of paths Dim i, lngSlash        'array index and wack-wack string location Dim WshShell           'Windows Scripting Host Shell Set WshShell = CreateObject(&quot;WScript.Shell&quot;) on error resume next

strRegValOriginal = WshShell.RegRead(STRKEY)   'Search for registry key If err.Number = -2147024894 Then                           'Key doesn't exist strFolder = LastVisioLang                'Start Folder with Visio language last installed If &quot;&quot; = strFolder Then                     'Visio isn't installed '          WScript.Echo &quot;Visio isn't installed&quot; WScript.Quit(1)                        'Return Error number Else                                       'Otherwise Visio appears to be installed strFolder = strFolder & &quot;\&quot; & STRFOLDERDEFAULT WshShell.RegWrite STRKEY,strFolder,&quot;REG_SZ&quot; End If   ElseIf err.number <> 0 Then       'This is some other error WScript.Quit(2) ElseIf instr(1,strRegValOriginal,&quot;\\&quot;,vbTextCompare) Then  'Registry key already existed & with \\ astrPaths = Split(strRegValOriginal,&quot;;&quot;)   'if semicolon delimited, check each path For i = 0 to UBound(astrPaths) strFolder = astrPaths(i) strFolder = left(strFolder,1) & Replace(strFolder,&quot;\\&quot;,&quot;\&quot;,2)  'replace \\ except UNC astrPaths(i) = strFolder               'put back into array Next

strFolder = Join(astrPaths,&quot;;&quot;)            'merge the array back into delim list '      WScript.Echo &quot;Old:  &quot; & strRegValOriginal & vbCrLf & &quot;New:  &quot; & strFolder  '<= Comment this out If strFolder <> strRegValOriginal Then WshShell.RegWrite STRKEY, strFolder, &quot;REG_SZ&quot; End If   Else '      WScript.Echo &quot;Fixup Not Needed&quot; End IF   WScript.Quit(0) Function LastVisioLang Dim WinInstaller       'Windows Installer Dim instProducts       'Collection of Products currently installed Dim instProduct        'Individual Product Code...installed Dim strProductName     'Name of the product installed Dim astrProducts       'Array of Visio Names Dim intProduct         'Array index Dim dteMaxDate         'Latest install date of products matching names Dim strLCID            'Language code for inspected product Dim strLastLang        'Last language version of Visio installed Dim instSession        'Locally cached MSI containing language id        '- initialize variables -- astrProducts = Array(&quot;Microsoft Visio Standard&quot;, &quot;Microsoft Visio Professional&quot;, _                            &quot;Microsoft Visio for Enterprise Architects&quot;)    'Qualifying Names dteMaxDate = CDate(0) strLastLang = &quot;&quot; '--       Set WinInstaller = CreateObject(&quot;WindowsInstaller.Installer&quot;) Set instProducts = WinInstaller.Products For Each instProduct in instProducts strProductName = WinInstaller.ProductInfo(Product,&quot;ProductName&quot;) For intProduct = 0 To Ubound(astrProducts) If Instr(1, strProductName,astrProducts(intProduct),vbTextCompare) Then 'matches If DateDiff(&quot;s&quot;,dteMaxDate, _                        CDate(WinInstaller.ProductInfo(Product,&quot;InstallDate&quot;))) > 0 Then 'Installed later Set instSession = WinInstaller.OpenPackage( _                        WinInstaller.ProductInfo(Product,&quot;LocalPackage&quot;))   'Open locally cached msi strLCID = instSession.Property(&quot;ProductLanaguage&quot;) If err.number = 0 Then         'Product Language locally cached strLastLang = strLCID      'store LCID of newest install Else err.Clear End If                       err.Clear Set instSession = Nothing End If                   Exit For        'Match already found...look no further for this product End If           Next Next LastVisioLang = strLastLang End Function '--- End of Sample ---



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: VSO2002

Keywords: kbcode kbbug kbqfe KB821584

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.