[wpkg-users] frequency of wpkgservice checking for new installs

Falko Trojahn nospam_ft at smi-softmark.de
Wed Jun 13 11:51:39 CEST 2007


> Mandi! Tomasz Chmielewski
>   In chel di` si favelave...
>
>> There is one slight problem with that: WPKG Client and wpkg.js are not
>> very well integrated (it will change slowly in the future; right now,
>> there are even problems with restarts initiated by wpkg.js etc.).
>> This means, we would have to learn WPKG Client to read and parse files
>> used by wpkg.js. Which means - parsing profiles.xml is not enough, and
>> profiles can be also kept in "profiles" directory.
>
> A note: this is a very good point about wpkg: if client are smaller,
> and totally indipendent from the server, and all of the core 'code' are
> server side, there's little or no possibility to break something.
>
> So, i clearly interesting in new featue, but please don't break this
> simple and robust approach.
>
>
> In this topic: why not writing a recipe/package that simply add a
> task (with schtasks) that run wpkg as a regular basis?
Ack. Just a
 net stop "windows packager"
 net start "windows packager"
(or "wpkg service") would do it, too.

Just created a little vbs script which asks for Computer name(s)
(and user/password if you like) to remotely restart wpkg service:

--------------------------------
Set WshShell = WScript.CreateObject("WScript.Shell")

Wscript.StdOut.Write "Please enter one or several remote computer "
Wscript.StdOut.Write "(comma separated):"
strComputer = Wscript.StdIn.ReadLine

'If needed: uncomment to ask for user and/or password

'Wscript.StdOut.Write "Please enter your DS AD user name:"
'strUser = Wscript.StdIn.ReadLine
'or:
'strUser = "admin_name_here"

'Set objPassword = CreateObject("ScriptPW.Password")
'Wscript.StdOut.Write "Please enter the password for " & strUser & ":"
'strPassword = objPassword.GetPassword()

Wscript.StdOut.Write " "
Wscript.StdOut.Write "Restarting wpkg Service on " & strComputer

strCommand1 = " net stop " & chr(34) & "windows packager" & chr(34)
strCommand2 = " net start " & chr(34) & "windows packager" & chr(34)

'Return = WshShell.Run("psexec.exe \\" & strComputer & " -u " & strUser &
" -p " & strPassword & strCommand1, 4, true)
'Return = WshShell.Run("psexec.exe \\" & strComputer & " -u " & strUser &
" -p " & strPassword & strCommand2, 4, true)
Return = WshShell.Run("psexec.exe \\" & strComputer & strCommand1, 4, true)
Return = WshShell.Run("psexec.exe \\" & strComputer & strCommand2, 4, true)

------------------------------

HTH
Falko

-- 
Falko Trojahn                     fon +49-341-3581294
Dipl-Ingenieur Netzwerke/Support  fax +49-341-3581295

SMI Softmark Informationstechnologien GmbH
Sitz: D-04416 Markkleeberg, Friedrich-Ebert-Str. 51
Registergericht: Amtsgericht Leipzig HRB 164
Geschäftsführer: Andreas Griesmann



wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list