Help - Search - Members - Calendar
Full Version: How to get PENetCfg Profile selection window
The CD Forum > Bart's PE Builder > Plugins
ladiko
i want to get a window like this if i start penetcfg to select one of my profiles -->


but i get this window:


my config for penetcfg is:

PENetCfg.ini:
CODE
[General]
AutoStartNet=No
PromptForProfile=Yes
ShowGUI=Yes

[NetProfiles]
Dynamic IP Address (DHCP)= penetcfg-dhcp.ini
Static IP Address (Manual)= penetcfg-static.ini
Custom from A:\= a:\penetcfg.ini
Custom from C:\= c:\penetcfg.ini

[NetAdapter1]
EnableDHCP=Yes
UseStaticGateway=No
DefaultGateway=
UseStaticDNS=No
DNSServer=
UseStaticWINS=No
WINSServer=

[NetID]
Workgroup=MSHOME
ComputerName=UBCD4WIN


penetcfg-dhcp.ini:
CODE
[NetAdapter1]
EnableDHCP=Yes
UseStaticGateway=No
UseStaticDNS=No
UseStaticWINS=No
IPAddress=
SubnetMask=
DefaultGateway=
DNSServer=

[NetID]
Workgroup=workgroup


penetcfg-static.ini:
CODE
[NetAdapter1]
EnableDHCP=No
UseStaticGateway=Yes
UseStaticDNS=Yes
UseStaticWINS=Yes
IPAddress=192.168.0.240
SubnetMask=255.255.255.0
DefaultGateway=192.168.0.1
DNSServer=192.168.0.2

[NetID]
Workgroup=workgroup


could somebody imagine what's wrong?
ladiko
argh... i dont use ubcd4win :-)

but cause my penet config was a little bit bigger, i decided to use a little bit more simpler for testing purpose. the config was copied from another thread where this config worked. but for me the problem is still there. so it's the wrong section. never the less: net id and pc-name are not relevant for this problem. so please back to plugins tongue.gif

@Ed_P: thank you, you're a sorcerer sorcerer.gif
Nikky
You need to find point / cmd / reg key wich start PeNetCfg. Wich shell you use?
Look readme of PeNetCfg. Copy - paste from there:

The syntax of PENetCfg at the command line is as follows:

PENetCfg [/UseProfile[:profile_name]]

- If no parameters were passed, PENetCfg will run as usual without using any network profiles.

- /UseProfile[:profile_name] loads the network profile with the name "profile_name" to use in automating network settings.
If the network profile is located in the same folder as PENetCfg, you can provide only the file name without any path, otherwise you must provide the full path and put it in quotes if it contains spaces.

if no profile name is provided, PENetCfg will search in the same folder for a file with same name as PENetCfg but with the extension ".ini" and use it as the network profile if found. So if the executable file that started PENetCfg is named "PENetCfg.exe", PENetCfg will search for "PENetCfg.ini" in the same folder to use as the network profile.

Examples:
PENetCfg /UseProfile
PENetCfg /UseProfile:Work.ini
PENetCfg -UseProfile:"C:\Net Profiles\Work.ini"
PENetCfg -UseProfile:%SystemRoot%\System32\Work.ini

Very Important note:
Network profiles will be used only when PENetCfg is going to start network support.
If network support is already started, no network profiles are used even if you explicitly provide it via the command line parameter.

So your case is: PENetCfg /UseProfile
ladiko
QUOTE (Nikky @ Nov 20 2007, 11:03 PM) *
Very Important note:
Network profiles will be used only when PENetCfg is going to start network support.
If network support is already started, no network profiles are used even if you explicitly provide it via the command line parameter.

So your case is: PENetCfg /UseProfile

yes that was the problem. network support was already started by another program cause i tried to start penetcfg by xpe-startup-folder and thats too late.

but i've got another problem:
cause i wanna use the bart-cd on a lot of different pcs and a lot of them got 2 network cards and i also have a cisco_vpn_network_card ...
i cant ensure that net1 is the card i want. so is there another way to config this? are there other tools to config the network. its not neccessary that it happens at boot time, but i need a gui where i can choose which profile it should use and which network adapter is used.
Ed_P
Penetcfg without the profile parm should allow you to choose NIC and settings and different profiles.
ladiko
how to select profiles in normal penetcfg gui? i only see the interface to input ip, mask, gate, dns and this stuff but no profile selection =(
Ed_P
You don't see this screen with it's list of profiles when the network starts under BartPE?



I see the screen you referred to in your first post:
QUOTE
but i get this window:
when I run penetcfg under my normal Win XP system but not when BartPE boots.

Do you have the autorun_penetcfg.inf plugin file enabled? There are two inf files for that plugin.
ladiko
hello :-)

ok i figured out that profile selection is only possible, if penetcfg also starts the networking services. if you want to start it later - for example if the network services is started by something else - you cannot select profiles. what a pity sad.gif

is there another tool that i could use to change ip / subnetmask and gateway in a loaded and running xpe? netsetman and other ip changing tools for windows seem to use (api-)functions that are not available in xpe and so they fail when i try to apply the settings.

thank you in advance :-)
Nikky
Why you don't use another / proper approach?
Find and disable current start of network services and properties for them (factory/netcfg/penetcfg).
I use Reatogo (boot profile) and "PENETCFG: Automatically start PE Network configurator" is disabled and "PENETCFG: PE Network configurator (theTruth)" is enabled.
ladiko
atm i use penetcfg this way, but i dont always need networking and i also like if i can insert the cd and go away for some minutes until the desktop is loaded. but if i insert penetcfg, it pops up while the cd is booting to ask me for a profile. maybe at this moment i dont want to choose a network profile, but later if i need network access.
Ed_P
Doesn't the config Nikki suggested solve the problem for you?
QUOTE
"PENETCFG: Automatically start PE Network configurator" is disabled and "PENETCFG: PE Network configurator (theTruth)" is enabled.
ladiko
network configuration by penetcfg means that penetcfg (automatically?!?) starts and (automatically?!?) configures networking?

that would also mean that it presets something. f.e. dhcp and that also means that at the second start - when i start penetcfg, the profile selection window does not appear ... cause if networking is already started, penetcfg dont use profile selection window.

like nikky told me ...
QUOTE (Nikky @ Nov 21 2007, 12:03 AM) *
Very Important note:
Network profiles will be used only when PENetCfg is going to start network support.
If network support is already started, no network profiles are used even if you explicitly provide it via the command line parameter.

So your case is: PENetCfg /UseProfile
and thats how it works ... thats why i ask for another tool that can change the ip settings after networking is started and also supports some kind of profiles?
Nikky
If network services are started and network card is "discovred" you can change network tcp/ip properties (IP, Subnet, Gateway) "on the fly".
If sys ask for reboot just ignore it / cancel. This "routine" work for me.
ladiko
yes thank you, i had tried this and it works without problems, but i would like to switch between preset profiles :-)
maniootek
QUOTE (Nikky @ Nov 20 2007, 06:03 PM) *
Very Important note:
Network profiles will be used only when PENetCfg is going to start network support.
If network support is already started, no network profiles are used even if you explicitly provide it via the command line parameter.


how to make PENetCfg to start network support? What this is mean?
Nikky
This means that the network support not be launched before the PeNetCfg in boot process.
oscar


There is a "clone" of Penetcfg. Search (Google) for Holger Penetwork. It may have the possibilty of loading a second profile, I am not sure.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.