[wpkg-users] Copying a shortcut from a network share to desktop?

2009-02-05 Thread Chris Wilcox

Hi all,
 
I've been trying to work this out but have tried for too long - is there any 
way I can copy a shortcut from a network share (within the WPKG %SOFTWARE% 
directory on our server) to the desktop of a computer?
 
I think I have got close but it continues to tell me that the file does not 
exist when WPKG processes line 2:
 
package id=CH4EnvChangeShortcut name=CH4 Environmental Change Shortcut 
revision=1 reboot=false priority=0 install cmd='net use x: 
\\10.251.193.3\MMedia\Shortcuts' / install cmd='copy x:\CH4 Environmental 
Change.lnk C:\Documents and Settings\All Users\Desktop' / install cmd='net 
use x: /delete /yes' //package
 
The shortcut definetly exists and is named as above.
 
Help much appreciated, I have a number of apps which only need a shortcut 
placed for the user to access and getting this to work would be excellent!
 
Thanks,
 
Chris
_
Twice the fun—Share photos while you chat with Windows Live Messenger. Learn 
more.
http://www.microsoft.com/uk/windows/windowslive/products/messenger.aspx-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Possible to have subfolders with packagexyz.xml?

2009-02-05 Thread Rainer Meier
Hi Mike,

Mike Burgener wrote:
 Is it possible when i have package-path \\server\wpkg\packages\ 
 containing different files with [packagename].xml having a subfolder 
 like \\server\wpkg\packages\packagefolder1\[packagename].xml ?

WPKG does not traverse subfolders when opening XML files from a
directory. It's also not intended to change this mainly due to
performance and possible recursion problems.

So the packages directory is a flat directory but you might give any
name to your XML files so there is no reason why sub-directories would
be required.

br,
Rainer
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


[wpkg-users] Problem with variables

2009-02-05 Thread Daniel Dehennin
Hello,

I have a problem when using variables in a package definition:

=
?xml version='1.0' encoding='utf-8'?
packages
  package
  id='disable-network-services'
  name='Windows XP disabled network services'
  revision='1'
  reboot='false'
  priority='700'

variable name='NETCFG' value='%WPKGBIN%\snetcfg_wxp.exe'/

check type='logical' condition='and'
  check type='execute' path='%ComSpec% /c %NETCFG% -q ms_psched | 
%WPKGBIN%\grep.exe is not installed'/
  check type='execute' path='%ComSpec% /c %NETCFG% -q ms_alg | 
%WPKGBIN%\grep.exe is not installed'/
  check type='execute' path='%ComSpec% /c %NETCFG% -q ms_gpc | 
%WPKGBIN%\grep.exe is not installed'/
/check

install cmd='%ComSpec% /c %NETCFG% -u ms_psched'
exit code='0'/
exit code='1'/
/install

install cmd='%ComSpec% /c %NETCFG% -u ms_alg'
exit code='0'/
exit code='1'/
/install

install cmd='%ComSpec% /c %NETCFG% -u ms_gpc'
exit code='0'/
exit code='1'/
/install

  /package
/packages
=

The check works:


Execute check for program 'C:\WINDOWS\system32\cmd.exe /c 
%WPKGBIN%\snetcfg_wxp.exe -q ms_psched \| %WPKG%\bin\grep.exe is not 
installed' returned '0'. Evaluating condition 'null' revealed true when 
comparing to expected value of '0'

Execute check for program 'C:\WINDOWS\system32\cmd.exe /c 
%WPKGBIN%\snetcfg_wxp.exe -q ms_alg \| %WPKG%\bin\grep.exe is not installed' 
returned '1'. Evaluating condition 'null' revealed false when comparing to 
expected value of '0'
Result of logical 'AND' check is false


but not the install commands with the variable:


Executing command : %ComSpec% /c %WPKGBIN%\snetcfg_wxp.exe -u ms_psched
Command '%ComSpec% /c %WPKGBIN%\snetcfg_wxp.exe -u ms_psched' returned  exit 
code [1]. This exit code is not an error
Command in installation of Windows XP disabled network services returned exit 
code [1]. This exit code indicates success
Executing command : %ComSpec% /c %WPKGBIN%\snetcfg_wxp.exe -u ms_alg
Command '%ComSpec% /c %WPKGBIN%\snetcfg_wxp.exe -u ms_alg' returned  exit code 
[0]. This exit code is not an error.
Command in installation of Windows XP disabled network services returned exit 
code [0]. This exit code indicates success.
Executing command : %ComSpec% /c %NETCFG% -u ms_gpc
Command '%ComSpec% /c %NETCFG% -u ms_gpc' returned  exit code [1]. This exit 
code is not an error.
Command in installation of Windows XP disabled network services returned exit 
code [1]. This exit code indicates success.


Before WPKG runs:
- ms_psched (QoS) is not installed
- ms_alg is installed
- ms_gpc is installed

ms_gpc is never removed, the return code should be 0 like with ms_alg but it's 
not.

wpkg.js version 1.1.0-M8 from[1].

Regards.

Footnotes: 
[1]  http://wpkg.svn.sourceforge.net/svnroot/wpkg/wpkg/current-development

-- 
Daniel Dehennin
RAIP de l'Orne
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Copying a shortcut from a network share to desktop?

2009-02-05 Thread Frank Lee
Hi Chris,

 package id=CH4EnvChangeShortcut name=CH4 Environmental Change 
 Shortcut revision=1 reboot=false priority=0 install cmd='net 
 use x: \\10.251.193.3\MMedia\Shortcuts' / install cmd='copy x:\CH4 
 Environmental Change.lnk C:\Documents and Settings\All Users\Desktop' 
 / install cmd='net use x: /delete /yes' //package

I think the problem here is that copy is a command built in to the 
command interpreter CMD, not an executable program.

Two ways around this:
1) Start a CMD session to run the command: cmd /c copy x:\path\go.lnk 
%AllUsersProfile%\Desktop
or
2) Use the 'xcopy' command, which is provide by a separate program: xcopy 
x:\path\go.lnk %AllUsersProfile%\Desktop

As an aside, I think the following commands are built-in to the CMD shell 
and therefore will need the 'cmd /c' treatment if anyone is to use them.

ASSOC BREAK CALL CD CHCP CHDIR CLS COLOR COPY DEL DISKCOMP DISKCOPY 
ENDLOCAL ERASE EXIT FOR FORMAT FTYPE GOTO GRAFTABL IF MD MODE MOVE PATH 
PAUSE POPD PROMPT PUSHD RD REM REN SET SETLOCAL SHIFT START TIME TITLE 
TREE TYPE VER VERIFY VOL

Yours,

Frank
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Problem with variables

2009-02-05 Thread Daniel Dehennin
Rainer Meier r.me...@wpkg.org writes:

 Hi Daniel,

Hi,

 It's correct that the code to set variables needs some
 re-work/re-design. This is one of the reasons I recommend not to use
 them extensively at the moment.

Ok.
 Did you think about moving these extensive execute script from the
 single-liner within the package XML file to a CMD script?  Such a

[...]

 This gives you much more flexibility to extend/refine checks as needed
 and format them in a much more user-readable way.

Yes, I already said that I need to give a try to your cmd scripts ;-)

Regards.
-- 
Daniel Dehennin
RAIP de l'Orne
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Problem with variables

2009-02-05 Thread Rainer Meier
Hi,

 Yes, I already said that I need to give a try to your cmd scripts ;-)

Oh, didn't remember that it was you - sorry, it was not my intention to
offend you in any way :-)

This is just my point of view and my personal way of working with WPKG.
I just hope it helps you to achieve your goals with WPKG.
WPKG became a very flexible system and there are always multiple ways to
 reach the target functionality. Some ways might work better and others
might not be reliable at all ;-)

br,
Rainer
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users