When I run the install I'm getting an Internal Error 2740.
Does anyone know what I'm doing wrong.
Thanks,
Salvatore Cusumano
Posted 07 February 2002 - 16:10
Does anyone know what I'm doing wrong.
Thanks,
Salvatore Cusumano
Posted 07 February 2002 - 16:21
'==========================================================================
'
' VBScript Source File -- Created with Notepad
'
' NAME: Restore-Userinfo.vbs
'
' AUTHOR: Salvatore Cusumano
' DATE : 17.01.2002
'
'
'==========================================================================
Option Explicit
'On Error Resume Next
'Konstanten
Const WinntPath = "C:\Winnt\"
Const UserDrivePath = "L:\MyDocu~1\Applic~1\Microsoft\Office\Sysfiles\"
Const BookXLTPath = "C:\Progra~1\Micros~2\Office\XLSTART\"
Const Temp = "C:\Temp\"
Dim WSHShell, WSHNetwork' Objektvariable
Dim fso, Stand, RunExe, Computername ' Objektvariable
' Erstelle der Objekte, welches wir
' zum Zugriff auf das Dateisystem brauchen.
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set WSHNetwork = WScript.CreateObject("Wscript.Network")
Set fso = CreateObject("Scripting.FileSystemObject")
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
Set RunExe=Wscript.CreateObject("Wscript.Shell")
If (Not Fso.FolderExists(UserDrivePath)) Then WScript.Quit
'Autocorrect Files werden zurückkopiert
If (fso.FileExists(UserDrivePath & WshNetworK.Username &".acl")) Then
fso.CopyFile UserDrivePath & WshNetworK.Username &".acl", WinntPath & WshNetworK.Username &".acl", True
End If
'Excel Toolbars File wird zurückkopiert
If (fso.FileExists(UserDrivePath & WshNetworK.Username &"8.xlb")) Then
fso.CopyFile UserDrivePath & WshNetworK.Username &"8.xlb", WinntPath & WshNetworK.Username &"8.xlb", True
End If
'PowerPoint Toolbars File wird zurückkopiert
If (fso.FileExists(UserDrivePath & WshNetworK.Username &".pcb")) Then
fso.CopyFile UserDrivePath & WshNetworK.Username &".pcb", WinntPath & WshNetworK.Username &".pcb", True
End If
'Regfiles werden lokal kopiert
fso.CopyFile UserDrivePath&"WordToolbars.reg ", Temp , True
fso.CopyFile UserDrivePath&"ExcelToolbars.reg ", Temp , True
fso.CopyFile UserDrivePath&"Autocorrect.reg ", Temp , True
fso.CopyFile UserDrivePath&"Userinfo.reg ", Temp , True
fso.CopyFile UserDrivePath&"UserTemplates.reg ", Temp , True
'User Templates Registry Key wird zurückkopiert
Stand = "c:\winnt\regedit.exe /s "& Temp&"UserTemplates.reg "
WSHShell.Run(Stand)
'Word Toolbars Registry Key wird zurückkopiert
Stand = "c:\winnt\regedit.exe /s "& Temp&"WordToolbars.reg "
WSHShell.Run(Stand)
'Excel Toolbars Registry Key wird zurückkopiert
Stand = "c:\winnt\regedit.exe /s "& Temp&"ExcelToolbars.reg "
WSHShell.Run(Stand)
'AutoCorrect Path Registry Key wird zurückkopiert
Stand = "c:\winnt\regedit.exe /s "& Temp&"Autocorrect.reg "
WSHShell.Run(Stand)
'Userinfo Registry Key wird zurückkopiert
Stand = "c:\winnt\regedit.exe /s "& Temp&"Userinfo.reg "
WSHShell.Run(Stand)
WScript.Quit
Posted 07 February 2002 - 23:19
It will probably also hit problems on the WScript.Quit at the end.
If you are having trouble debugging something like this in Windows Installer, create a verbose log file. When Windows Installer crashes on a VBScript custom action, it sometimes writes useful information, like the line and column number it died on.
Hope this helps,
Posted 08 February 2002 - 11:14
Yes,it works properly after I changed another this line:
"L:\MyDocu~1\Applic~1\Microsoft\Office\Sysfiles\"
without tilde
"L:\My Documents\Application Data\Microsoft\Office\Sysfiles\"
Thanks a lot for your help!
Best Regards
Salvatore
Posted 08 February 2002 - 11:22
Yes,it works properly now.
But I musted change another line:
"L:\MyDocu~1\Applic~1\Microsoft\Office\Sysfiles\"
without tilde
"L:\My Documents\Application Data\Microsoft\Office\Sysfiles\"
Thanks a lot for your help!
Best Regards
Salvatore