VB SCript

J

Jarek

I'm trying to run this script in cmdlines.txt,
while building the system (XP):




strComputer = ""
'create the file system object
set objFso=CreateObject
("Scripting.fileSystemObject")
'create the file object
Set objTextFile = objFso.CreateTextFile
("c:\Infofile.txt", True)

Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf
("Win32_ComputerSystemProduct")

For Each wbemObject In wbemObjectSet
objTextFile.WriteLine("Vendor : " &
wbemObject.Vendor)
objTextFile.WriteLine("Name : " &
wbemObject.Name)
objTextFile.WriteLine("Identifying Number : " &
wbemObject.IdentifyingNumber)
Next





It doesn't work at that point, (fails at the "For" line)
while it doesn't have a problem to run
on the same machine later on,
after it actually reboots and restarts.

Does anyone know why and if there is any
way to force this script to run at the stage,
I'm trying to get it to work?

TIA,

Jarek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

error 1
File format 1
How to code this? 5
FTP in ASP.NET C# 1
Apostrophes in a File Directory Traversal 0
Help with retreiving hardware information 1
Reuslt of WMI script. 2
Winpe 2.0, hta & wmi 2

Top