Torgeir
Mon Feb 21 12:04:26 CST 2005
Franck wrote:
> Using vbs in my msi setup program,
> the following command does not work on client but I can't figure out
> what's the problem as the command windows closes itself immediately
> after displaying the error message.
>
> CreateObject("Wscript.Shell").Run
> "C:\Windows\Microsoft.Net\Framework\v1.1.4322\regasm /tlb """ &
> Property("Installpath") & "UBPTREX.dll"""
>
> Does somedy know how I could log the error (nothing in event log) or
> prevent the cmd windows to close after running command ?
Hi
Try this (using %comspec% /k):
CreateObject("Wscript.Shell").Run _
"%comspec% /k %windir%\Microsoft.Net\Framework\v1.1.4322\regasm /tlb """ _
& Property("Installpath") & "UBPTREX.dll""", 1, True
Does Property("Installpath") always deliver a path with a terminating
backslash? If not, use \UBPTREX.dll instead pf UBPTREX.dll
I have also changed C:\Windows to %windir% to avoid hard coding of the
Windows path.
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx