PC Review


Reply
Thread Tools Rate Thread

Howto change the workgroup

 
 
=?Utf-8?B?S2xhdXM=?=
Guest
Posts: n/a
 
      7th Jul 2006
Hello,

I want to modify the workgroup, which the computer joins when it starts up.
But I don't want to use the GUI for this purpose, instead I want to change
the workgroup programmatically e.g. with a script or a Win-API call or
something like this. Does anybody know how to do this?

Any hints are welcome,
Klaus
 
Reply With Quote
 
 
 
 
jetq88
Guest
Posts: n/a
 
      7th Jul 2006
you can change it when you build xpe image, go to whatever pc component
you use(ie, standard pc, ACPI uniprocessor pc etc, ) click on setting,
then system identification, you can change there.

jet

Klaus wrote:
> Hello,
>
> I want to modify the workgroup, which the computer joins when it starts up.
> But I don't want to use the GUI for this purpose, instead I want to change
> the workgroup programmatically e.g. with a script or a Win-API call or
> something like this. Does anybody know how to do this?
>
> Any hints are welcome,
> Klaus


 
Reply With Quote
 
 
 
 
=?Utf-8?B?S2xhdXM=?=
Guest
Posts: n/a
 
      7th Jul 2006
Thank you for your answer. But what I need, is something different:

My image runs from CF-Card with a custom shell and is write protected by
EWF. The user does not have access to the control panel, because I don't want
that he accidentally misconfigures the whole system. The user can only
configure some few things like network settings. So I build my own
configuration dialogs e.g. one for configuring the network settings like
IP-Adress, DNS etc. The IP-settings I set with 'netsh', the computer-name I
set with Win32-API call 'SetComputerName'. But unfortunately there is no API
call like 'SetWorkgroupName'. So I'am looking for a solution to set the
workgroup at runtime from within my own configuration dialog.

Klaus

"jetq88" wrote:

> you can change it when you build xpe image, go to whatever pc component
> you use(ie, standard pc, ACPI uniprocessor pc etc, ) click on setting,
> then system identification, you can change there.
>
> jet
>
> Klaus wrote:
> > Hello,
> >
> > I want to modify the workgroup, which the computer joins when it starts up.
> > But I don't want to use the GUI for this purpose, instead I want to change
> > the workgroup programmatically e.g. with a script or a Win-API call or
> > something like this. Does anybody know how to do this?
> >
> > Any hints are welcome,
> > Klaus

>
>

 
Reply With Quote
 
Sean Liming \(eMVP\)
Guest
Posts: n/a
 
      7th Jul 2006
I thought there might be a WMI solution, but
Win32_NetworkAdapterConfiguration doesn't seem to yield a solution. You
might want to try asking the Visual Studio NG.

Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
Toolkit



"Klaus" <(E-Mail Removed)> wrote in message
newsC847BF8-2039-4336-9C1E-(E-Mail Removed)...
> Thank you for your answer. But what I need, is something different:
>
> My image runs from CF-Card with a custom shell and is write protected by
> EWF. The user does not have access to the control panel, because I don't
> want
> that he accidentally misconfigures the whole system. The user can only
> configure some few things like network settings. So I build my own
> configuration dialogs e.g. one for configuring the network settings like
> IP-Adress, DNS etc. The IP-settings I set with 'netsh', the computer-name
> I
> set with Win32-API call 'SetComputerName'. But unfortunately there is no
> API
> call like 'SetWorkgroupName'. So I'am looking for a solution to set the
> workgroup at runtime from within my own configuration dialog.
>
> Klaus
>
> "jetq88" wrote:
>
>> you can change it when you build xpe image, go to whatever pc component
>> you use(ie, standard pc, ACPI uniprocessor pc etc, ) click on setting,
>> then system identification, you can change there.
>>
>> jet
>>
>> Klaus wrote:
>> > Hello,
>> >
>> > I want to modify the workgroup, which the computer joins when it starts
>> > up.
>> > But I don't want to use the GUI for this purpose, instead I want to
>> > change
>> > the workgroup programmatically e.g. with a script or a Win-API call or
>> > something like this. Does anybody know how to do this?
>> >
>> > Any hints are welcome,
>> > Klaus

>>
>>



 
Reply With Quote
 
JoP
Guest
Posts: n/a
 
      7th Jul 2006
Like Sean said WMI offers a solution. You can create a simple C#
application that use System.Management.dll to access the
Win32_ComputerSystem class in the WMI Service. Workgroup value and some
others can be modified programatically.

Jonathan Proulx


Sean Liming (eMVP) wrote:
> I thought there might be a WMI solution, but
> Win32_NetworkAdapterConfiguration doesn't seem to yield a solution. You
> might want to try asking the Visual Studio NG.
>
> Regards,
>
> Sean Liming
> www.sjjmicro.com / www.seanliming.com
> XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
> Toolkit
>
>
>
> "Klaus" <(E-Mail Removed)> wrote in message
> newsC847BF8-2039-4336-9C1E-(E-Mail Removed)...
> > Thank you for your answer. But what I need, is something different:
> >
> > My image runs from CF-Card with a custom shell and is write protected by
> > EWF. The user does not have access to the control panel, because I don't
> > want
> > that he accidentally misconfigures the whole system. The user can only
> > configure some few things like network settings. So I build my own
> > configuration dialogs e.g. one for configuring the network settings like
> > IP-Adress, DNS etc. The IP-settings I set with 'netsh', the computer-name
> > I
> > set with Win32-API call 'SetComputerName'. But unfortunately there is no
> > API
> > call like 'SetWorkgroupName'. So I'am looking for a solution to set the
> > workgroup at runtime from within my own configuration dialog.
> >
> > Klaus
> >
> > "jetq88" wrote:
> >
> >> you can change it when you build xpe image, go to whatever pc component
> >> you use(ie, standard pc, ACPI uniprocessor pc etc, ) click on setting,
> >> then system identification, you can change there.
> >>
> >> jet
> >>
> >> Klaus wrote:
> >> > Hello,
> >> >
> >> > I want to modify the workgroup, which the computer joins when it starts
> >> > up.
> >> > But I don't want to use the GUI for this purpose, instead I want to
> >> > change
> >> > the workgroup programmatically e.g. with a script or a Win-API call or
> >> > something like this. Does anybody know how to do this?
> >> >
> >> > Any hints are welcome,
> >> > Klaus
> >>
> >>


 
Reply With Quote
 
Susanne Stoehr
Guest
Posts: n/a
 
      10th Jul 2006
Hi Klaus,

I used "NetJoinDomain()" in a C-Program. The return code was OK, but it
took quite some time until the computer was to be seen in the network.

Regards,
Susanne Stöhr

 
Reply With Quote
 
=?Utf-8?B?S2xhdXM=?=
Guest
Posts: n/a
 
      10th Jul 2006
Hi Sean, JoP and Susanne,

first I tried WMI. Because I don't have .Net Framework on my image I used
WMIC instead of C# program. I used the alias "ComputerSystem" for
Win32_ComputerSystem class. I could read all attributes like "Domain" which
is the domain- or workgroup-name. But I wasn't able to change any of the
attributes, don't know why.

Then I tried 'NetJoinDomain' from Platform SDK. Return code was
'NERR_Success', which means OK. The function call takes some time (about 5
sec.) but then the workgroup name was changed correctly. Wonderfull - it
works.

Thank you all for your help. This newsgroup is really a great help for me!
Klaus



"Susanne Stoehr" wrote:

> Hi Klaus,
>
> I used "NetJoinDomain()" in a C-Program. The return code was OK, but it
> took quite some time until the computer was to be seen in the network.
>
> Regards,
> Susanne Stöhr
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto iterate over objects stored in one column of a DataTable ----Or howto get an array, collection, ... of objects stored in one column ofa DataTable Gordian Microsoft ADO .NET 3 27th Jul 2005 01:58 PM
get another workgroup compu under ma workgroup Jenz Windows XP Networking 1 25th Nov 2003 09:48 PM
quick howto- howto disable tftp.exe anyweb Windows XP Security 0 13th Aug 2003 10:06 PM
Re: HowTo Change from Internet Mail only To Corporate Or workgroup In Outlook 2002 Sue Mosher [MVP] Microsoft Outlook Installation 0 18th Jul 2003 12:37 PM
Re: File sharing works on one workgroup pc but not on other workgroup pc. Please help. Steve Winograd [MVP] Windows XP Networking 0 9th Jul 2003 01:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:11 PM.