I need to get the name of the target computer during the installation. Also, how can I use a windows API function from InstallScript code?
Thanks
Erez
Posted 29 January 2002 - 08:21
I need to get the name of the target computer during the installation. Also, how can I use a windows API function from InstallScript code?
Thanks
Erez
Posted 29 January 2002 - 16:24
I got a couple lines of VBScript that outta do the trick in getting that computer name:
-------------------------------------------------
Option Explicit
Main()
Sub Main
Dim wshNetwork
Dim sServerName
Set wshNetwork = CreateObject("WScript.Network")
sServerName = wshNetwork.ComputerName
Session.Property("YOURPROP") = sServerName
End Sub
Most OS's come with the Windows Scripting Host. The keyword is 'Most'. I haven't run this across any OS prior to WIn98SE. So some investigation may be required.
Good Luck
Kurt Schneider
Posted 29 January 2002 - 16:25
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName
Hpoing this might help you
Thanks,
vr
Posted 29 January 2002 - 16:45
Thanks
Erez