Printable Version of Topic

Click here to view this topic in its original format

Boot Land _ Win7PE _ Shell & Config - These lines don't work as expected. Are they even needed

Posted by: Rick Apr 22 2010, 03:42 PM

I don't know if (1) I am using the wrong scripts (2) the lines are incorrectly coded or (3) they aren't needed anymore.

I was wondering why I had to manually start networking services through PeNetCfg once the Win7PE loaded when I noticed that these lines in the Shell&Config.script produced entries in Win7pe.cfg that did nothing. In the VistaPE.cfg they executed correctly because they were coded with a different command "AddPostConfig" which doesn't appear to exist in the 8.x release.

CODE
#Postconfig from the 8-Rel of WinBuilder (these are the original lines from the download)
#IniWriteTextLine,"%pecfg%",PostConfig,"DNS Client","x:\windows\system32\net.exe","start #$qDnscache#$q",3
#IniWriteTextLine,"%pecfg%",PostConfig,"Server","x:\windows\system32\net.exe","start #$qLanmanServer#$q",3
#IniWriteTextLine,"%pecfg%",PostConfig,"User Profile Service","x:\windows\system32\net.exe","start #$qProfSvc#$q",3
#IniWriteTextLine,"%pecfg%",PostConfig,"Computer Browser","x:\windows\system32\net.exe","start #$qBrowser#$q",3
#IniWriteTextLine,"%pecfg%",PostConfig,"Human Interface Device Access","x:\windows\system32\net.exe","start #$qhidserv#$q",3
#IniWriteTextLine,"%pecfg%",PostConfig,"Microsoft Software Shadow Copy Provider","x:\windows\system32\net.exe","start #$qswprv#$q",3
#IniWriteTextLine,"%pecfg%",PostConfig,"","x:\windows\system32\net.exe","start #$q#$q",3


After a bit of study I replaced these lines as follows

CODE
#Postconfig from Rick's brain to this script
#IniWriteTextLine inserts in LIFO order on the assumption that the [postconfig] lines are executed from top to bottom.
IniWriteTextLine,"%pecfg%",PostConfig,"wait|Network Start|x:\windows\system32\net.exe#$sstart#$s#$q#$q"
IniWriteTextLine,"%pecfg%",PostConfig,"wait|Microsoft Software Shadow Copy Provider|x:\windows\system32\net.exe#$sstart#$s#$qswprv#$q"
IniWriteTextLine,"%pecfg%",PostConfig,"wait|Human Interface Device Access|x:\windows\system32\net.exe#$sstart#$s#$qhidserv#$q"
IniWriteTextLine,"%pecfg%",PostConfig,"wait|Computer Browser|x:\windows\system32\net.exe#$sstart#$s#$qBrowser#$q"
IniWriteTextLine,"%pecfg%",PostConfig,"wait|User Profile Service|x:\windows\system32\net.exe#$sstart#$s#$qProfSvc#$q"
IniWriteTextLine,"%pecfg%",PostConfig,"wait|Server|x:\windows\system32\net.exe#$sstart#$s#$qLanmanServer#$q"
IniWriteTextLine,"%pecfg%",PostConfig,"wait|DNS Client|x:\windows\system32\net.exe#$sstart#$s#$qDnscache#$q"


Now the lines execute... but then I started wondering. Are they even needed with Win7PE?

Finally I coded an autostart of the network using this scripted command and a PeNetCfg.ini file

CODE
IniWriteTextLine,"%pecfg%",PostConfig,"hidewait|PENetCfg|#$qx:\program files\penetcfg\penetcfg.exe#$q#$s/useprofile:mc.ini",APPEND


CODE
; PE Network Configurator (PENetCfg) v2.33
; Copyright (C) 2003-2009 Pierre Mounir (TheTruth)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[General]
AutoStartNet     = Yes
PromptForProfile = No
ShowGUI          = No
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[NetID]
ComputerName     = WinPE
Workgroup        = WORKGROUP
PrimaryDNSSuffix = montgomerycollege.edu
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Notes]
This profile configures network settings for use with Windows 7 Win PE on Mongomery College networks


My questions to the list are;
(1) is there an easier way to do this?
(2) Should I be using a different script?
(3) Are the commands I "fixed" even needed anymore?

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)