Mike Burgener | 3 Feb 2009 14:41
Favicon

Special install command not working

Hi guys

Thanks for all the help already.

This special install command does not succeed.

Any suggestions?

<install cmd="&quot; echo yes | \\server\installer.bat&quot;" />

Thanks a lot

Mike
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Mike Burgener | 5 Feb 2009 09:36
Favicon

Possible to have subfolders with packagexyz.xml?

Hi all

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 ?

King regards and thanks in advance

Mike Burgener
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Tomasz Chmielewski | 5 Feb 2009 10:41
Favicon

Re: Special install command not working

Mike Burgener schrieb:
> Hi guys
> 
> Thanks for all the help already.
> 
> This special install command does not succeed.
> 
> Any suggestions?
> 
> <install cmd="&quot; echo yes | \\server\installer.bat&quot;" />

As some "DOS" commands are not executables, you have to start them with 
cmd.exe interpreter:

cmd /C echo yes | \\server\installer.bat

Also, for simplicity, you could place all that in one script (your 
installer.bat).

--

-- 
Tomasz Chmielewski
http://wpkg.org
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Chris Wilcox | 5 Feb 2009 10:55
Picon
Favicon

Copying a shortcut from a network share to desktop?

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

Share your photos with Windows Live Photos – Free Find out more!
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users <at> lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users
Frank Lee | 5 Feb 2009 11:09
Picon
Picon
Favicon

Re: Copying a shortcut from a network share to desktop?

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/
Rainer Meier | 5 Feb 2009 11:16
Favicon

Re: Possible to have subfolders with packagexyz.xml?

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/
Pendl Stefan | 5 Feb 2009 11:56
Picon

Re: Copying a shortcut from a network share to desktop?

Chris Wilcox wrote:
<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'<file://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.

---

Chris,
I would place all into one batch file and execute this, if you do not want this you need to precede any DOS
command with "CMD.EXE /C", since DOS commands are not executables.

 <install cmd='cmd.exe /c copy "x:\CH4 Environmental Change.lnk" "%ALLUSERSPROFILE%\Desktop"' />
Notice that I used the ALLUSERSPROFILE DOS environment variable to make things work on any configuration.

---
Stefan

-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Falko Trojahn | 5 Feb 2009 12:08
Picon
Favicon

Re: Copying a shortcut from a network share to desktop?

Helo 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>
>
> 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!
>

This works here flawlessly:

<install cmd='cmd /c copy /y "w:\packages\spybotsd15\Spybot - Search &amp;
Destroy.lnk" "%ALLUSERSPROFILE%\Desktop\"' />

But, IMHO you shouldn't use "net use" within a package, but e.g.
in the pre-action command from wpkg-client or in your wpkg-start.bat.

Of course it would be a better solution, too, if you use "%SOFTWARE%"
 - defined within WPKG-Client or in wpkg-start.bat.

Then your settings and package would be like this:

wpkg-start.bat or within Wpkg Client:

set SOFTWARE=\\10.251.193.3\MMedia\

<package id="CH4EnvChangeShortcut"
   name="CH4 Environmental Change Shortcut"
   revision="1"
   reboot="false"
   priority="0">

   <install cmd='cmd /c copy /y "%SOFTWARE%\Shortcuts\CH4 Environmental
Change.lnk" "%ALLUSERSPROFILE%\Desktop\"' />
</package>

Any variable name apart from "%SOFTWARE%" is possible, too.

Best regards,
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 archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Chris Wilcox | 5 Feb 2009 13:05
Picon
Favicon

Re: Copying a shortcut from a network share to desktop?

> From: stefan.pendl <at> haidlmair.at
> To: wpkg-users <at> lists.wpkg.org
> Date: Thu, 5 Feb 2009 11:56:39 +0100
> Subject: Re: [wpkg-users] Copying a shortcut from a network share to desktop?
>
> Chris Wilcox wrote:
> <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'<file://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.
>
> ---
>
> Chris,
> I would place all into one batch file and execute this, if you do not want this you need to precede any DOS command with "CMD.EXE /C", since DOS commands are not executables.
>
> <install cmd='cmd.exe /c copy "x:\CH4 Environmental Change.lnk" "%ALLUSERSPROFILE%\Desktop"' />
> Notice that I used the ALLUSERSPROFILE DOS environment variable to make things work on any configuration.
 
Quite a few bits of advice there, many thanks to all replies!
 
Chris

Share your photos with Windows Live Photos - Free Try it Now!
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users <at> lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users
Daniel Dehennin | 5 Feb 2009 13:50
Picon
Favicon

Problem with variables

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/

Gmane