R
Ravi
All,
I had created a WinPE ISO image from my Windows OPK and using this a
RAMDISK through RIS. I want to use this for OS deployments. Now, for
automation purpose, I wrote a small script to capture the system model
and export it as a system environment variable. Here is the script:
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
'Get System Model
Set SystemSet = GetObject("winmgmts:").InstancesOf
("Win32_ComputerSystem")
for each System in SystemSet
system_model = Trim(System.Model)
next
'Set the environment variable
WshSysEnv("SysModel") = system_model
This script works as expected on my notebook (Windows XP). Within my
WinPE image, I can capture the System Model but it is not getting
exported as a system variable.
I am suspecting the read-only nature of the WinPE as it is loaded from
ISO file.
Any ideas how I can make this work?
Thanks for your time,
Ravi
I had created a WinPE ISO image from my Windows OPK and using this a
RAMDISK through RIS. I want to use this for OS deployments. Now, for
automation purpose, I wrote a small script to capture the system model
and export it as a system environment variable. Here is the script:
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
'Get System Model
Set SystemSet = GetObject("winmgmts:").InstancesOf
("Win32_ComputerSystem")
for each System in SystemSet
system_model = Trim(System.Model)
next
'Set the environment variable
WshSysEnv("SysModel") = system_model
This script works as expected on my notebook (Windows XP). Within my
WinPE image, I can capture the System Model but it is not getting
exported as a system variable.
I am suspecting the read-only nature of the WinPE as it is loaded from
ISO file.
Any ideas how I can make this work?
Thanks for your time,
Ravi