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:
- Start Visio.
- On the Tools menu, click
Options.
- Click the File Paths tab.
- 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. - 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:
For additional information about the support options available
from Microsoft, visit the following Microsoft Web site:
'------------ SampleLogin.VBS ---------------------------
' sample windows script to Fix-up 1028\\Startup path in Traditional Chinese Visio 2002
' 1. If registry contains "\\", machine is potentailly affected by this problem
' --> Replace "\\" with "\" 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
' "Microsoft Visio Standard", Microsoft Visio Professional" or "Microsoft Visio for Enterprise Architects"
' Check local package for ProductLanguage if InstallDate is latest
' Builds startup Path <ProductLanguage>\Startup and stores in HKCU
CONST STRKEY = "HKCU\Software\Microsoft\Visio\Application\StartUpPath"
CONST STRFOLDERDEFAULT = "Startup"
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("WScript.Shell")
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 "" = strFolder Then 'Visio isn't installed
' WScript.Echo "Visio isn't installed"
WScript.Quit(1) 'Return Error number
Else 'Otherwise Visio appears to be installed
strFolder = strFolder & "\" & STRFOLDERDEFAULT
WshShell.RegWrite STRKEY,strFolder,"REG_SZ"
End If
ElseIf err.number <> 0 Then 'This is some other error
WScript.Quit(2)
ElseIf instr(1,strRegValOriginal,"\\",vbTextCompare) Then 'Registry key already existed & with \\
astrPaths = Split(strRegValOriginal,";") 'if semicolon delimited, check each path
For i = 0 to UBound(astrPaths)
strFolder = astrPaths(i)
strFolder = left(strFolder,1) & Replace(strFolder,"\\","\",2) 'replace \\ except UNC
astrPaths(i) = strFolder 'put back into array
Next
strFolder = Join(astrPaths,";") 'merge the array back into delim list
' WScript.Echo "Old: " & strRegValOriginal & vbCrLf & "New: " & strFolder '<= Comment this out
If strFolder <> strRegValOriginal Then
WshShell.RegWrite STRKEY, strFolder, "REG_SZ"
End If
Else
' WScript.Echo "Fixup Not Needed"
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("Microsoft Visio Standard", "Microsoft Visio Professional", _
"Microsoft Visio for Enterprise Architects") 'Qualifying Names
dteMaxDate = CDate(0)
strLastLang = ""
'----------------------
Set WinInstaller = CreateObject("WindowsInstaller.Installer")
Set instProducts = WinInstaller.Products
For Each instProduct in instProducts
strProductName = WinInstaller.ProductInfo(Product,"ProductName")
For intProduct = 0 To Ubound(astrProducts)
If Instr(1, strProductName,astrProducts(intProduct),vbTextCompare) Then 'matches
If DateDiff("s",dteMaxDate, _
CDate(WinInstaller.ProductInfo(Product,"InstallDate"))) > 0 Then 'Installed later
Set instSession = WinInstaller.OpenPackage( _
WinInstaller.ProductInfo(Product,"LocalPackage")) 'Open locally cached msi
strLCID = instSession.Property("ProductLanaguage")
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 -------------------