[wpkg-users] Questions about offline mode and executing the wpkg service

Tomasz Chmielewski mangoo at wpkg.org
Thu Apr 3 19:13:29 CEST 2008


Dieter Scholz schrieb:
> Hi,
> 
>> Ha! Bad boy! Microsoft does not support running Windows in virtualized
>> environments (unless it's Microsoft virtualized environment) and so WPKG
>> don't support it neither!
>>
>> (WPKG part was a late Aprils Fools' joke; Microsoft part is true)
> 
> So far I haven't had any problems running Windows under VMware. For me it's a 
> very convenient way for testing different configurations. Any known concrete 
> problems?

Didn't you just describe one problem in this thread? :)


>> I'm not sure what happens with Windows when you set the network to
>> disconnected in VMware (i.e. how does system see a card which doesn't
>> want to send or receive any packages).
>>
>> If you test it on a real laptop (or any other real system), it should
>> work just fine for you.
>>
>> I can only guess that when you disconnect an interface in VMware,
>> Windows can't send any packets, but the system doesn't get any
>> confirmation (or not immediate) that the packages were not sent? But
>> it's only a guess.
> 
> Afaik it makes no difference if you disconnect a network device in Vmware or 
> if you disconnect a network cable. But of course I will try it with a real 
> pc ... but it would be a pity if I couldn't use Vmware  for testing ... I 
> love this snapshot functionality :-)

So, did you try it on a real machine?


> Just for better understanding:
> 
> Am I right that the wpkg Windows service first checks - using the method 
> defined in the offline tab - if the wpkg script is available somewhere on a 
> server and only if it is calls the network ressource?

No, it sends a packet to port 139 of the server and looks at the reply.

You can see "live" by starting i.e. tcpdump on the server machine.


> I just wonder because if you look at my event log you see that wpkg reports 
> that offline mode is activated and it reports that the wpkg server is 
> unavailable (so the wpkg service knows it could not reach the script). Why it 
> still waits the max logon delay time until it cancels operation? Or have I 
> misconfigured something.

I have no idea. A bug? Which doesn't show up on real machines, though, 
which is either good or bad.
Or maybe VMware, instead of showing a "disconnected network interface", 
replies to packets sent by WPKG Client with packets which confuse it 
(i.e., something like a proper reply from the server)?
I don't know. I guess it could be checked with some packet sniffer 
started on a Windows machine:

- log in, network connected, server available

- in cmd.exe:
   net stop "WPKG service"

- start a sniffer
- in cmd.exe:
   net start "WPKG service"

- stop the sniffer when it's done.

Repeat the test with a network disconnected in VMware and compare the 
results.


>> If for some reason VMware was not only for testing, but you have to use
>> it in normal day operation, you may have more luck with a "Custom
>> script" instead of sending packets to a server. There, you could detect
>> if VMware network card is connected or not etc.
>> How to detect if a VMware network card is connected or disconnected in
>> Windows is perhaps a question for VMware forum.
> 
> I have tested this and have written the following (rather primitive) batch 
> script (servertest.bat):
> 
>   @echo off
>   ping -n 1 <IP of server> >NUL
>   exit /b %errorlevel%
> 
> This script returns 0 if the server is reachable and 1 if not. I've tested 
> this on the command line.

The script is rather simple and primitive, but already contains an error 
;) - it won't work with /b switch.
Although this script will exit with non-zero code, /b prevents closing 
of cmd.exe. A while later cmd.exe exits with code 0, and...


> But when I activate this configuration the following error appears in the 
> event log:
> 
> "WNetAddConnection2 -> Der Netzwerkname wurde nicht gefunden"
> (in engl: -> "network name was not found")
> 
> The script is configured as an absolute path and is stored on the local 
> harddisk. Why does it need a network name?

...we are farther - it already tries to connect as a user etc.


> Another question I ask myself is: Where is the information stored the service 
> needs for setting itself up. I couldn't find any related entries searching 
> with regedit and there is no file with this information?

Some entries (logon delay messages etc.) you will find by looking for 
WPKG in regedit.
Other entries (usernames, passwords) are "hidden" in lockers provided by 
the system.




-- 
Tomasz Chmielewski
http://wpkg.org



More information about the wpkg-users mailing list