#1 2020-05-09 16:51

les renardeaux
Member
Registered: 2020-05-09
Posts: 6

Batch script with XXCOPY in System32

Hi all,

I just installed Shutter Pro (under Win7 Pro 64 bits), all in French, and I intended to use it to launch backup batches.
For these backups I have long used EXCELLENT xxcopy(.exe) (from PIXELAB now no longer available) and also XcopyEx(.exe) from ASTASE for example.

In short, in the top window (1a) of Shutter I have in Event the scheduled time and in the bottom window (2a) of Shutter I have in Action my batch command line {"E:\BAT\ESSA.BAT"}
This batch is for example (tested example):
[xxcopy E:\Chantier\Travails\*. * F:\Chantier\Travails\]

But I still get the message in the cmd window:
"'xxcopy' is not recognized as an internal or external command, an executable program or a batch file."
I specify that this batch works for years on the 'Task Scheduler' of Windows, that xxcopy.exe is the 64-bit version, that it is located at C:\Windows\System32\XXCOPY.EXE and that this path is well in the environment variable Path: xxcopy.exe can be called from the simple command [xxcopy] in a simple ordinary cmd.exe console.

Writing the command line in Shutter (instead of calling the batch) causes the following 'Statut' message [ Error: Failed to execute C:\Windows\System32\XXCOPY.EXE E:\Chantier\Travails\*. * F:\Site\Works\: 2 ]

Just for xxcopy. XcopyEx, xcopy (Windows)... are launched without problem.
Never before seen this type of bug.

If anyone knows how to deal with this error I am interested because I find Shutter Pro pleasant and I wish I could keep it for the job.

Last edited by les renardeaux (2020-05-09 16:53)

Offline

#2 2020-05-10 09:24

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Batch script with XXCOPY in System32

Hello.

I have just tested the following scenarios using the latest Shutter 4.4 on Windows 10:

1. Execute XCOPY in a command prompt window.
2. Execute *.bat file (which calls XCOPY) in a command prompt window.
3. Execute XCOPY in Shutter via the Run Program action.
4. Execute *.bat file (which calls XCOPY) in Shutter via the Run Program action.

All cases worked as expected. In all cases XCOPY was called without specifying the full path.

In your case, if it works with XCOPY but not with XXCOPY, it suggests an issue specific to your setup of XXCOPY. It could be security related.

Try the following batch file with both XCOPY and XXCOPY. Try calling it from a command prompt window and via Shutter. It will display the PATH variable and the exit code from XCOPY/XXCOPY. It might help identify discrepancies in your setup.

@echo off
timeout 2
echo %PATH%
echo Executing...
xcopy C:\Temp\Copy1 C:\Temp\Copy2
echo Error code...
echo %ERRORLEVEL%
pause

Offline

#3 2020-05-10 13:17

les renardeaux
Member
Registered: 2020-05-09
Posts: 6

Re: Batch script with XXCOPY in System32

Thank you for your quick reply.

I just tested your batch:

1 / - essa.bat with xcopy:

E:\Chantier\Travails>essa

Attendre 0 secondes, appuyez sur une touche pour continuer...
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Python36\Scripts\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramFiles\Python38\Scripts\;C:\Program Files\Python38\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\outils\process;C:\outils\MRS\PSTools;C:\outils\closeapp;C:\outils\cmdow;C:\outils\chp;C:\outils\switch;C:\outils\PT\cmdconrg;C:\Program Files (x86)\Conceptworld\Copywhiz\CopywhizCopy.exe;C:\outils\PT\filetypes;C:\outils\PT\fixexelnk;C:\outils\enumser\Release\EnumSer.exe;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Acronis\CommandLineTool\;C:\outils\MC;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\BAT;E:\BAT;C:\QBASIC;E:\Chantier\QBASIC;C:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files (x86)\Runtime Software\ShadowCopy;C:\Program Files (x86)\AOMEI Backupper;C:\ProgramFiles\Windows Imaging\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Intel\UCRT\;C:\Program Files\Intel\UCRT\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\outils\nssm-2.24\win64;C:\Program Files\santesocial\galss\;C:\Perl64\bin\;C:\Program Files (x86)\Gpg4win\bin;C:\Program Files (x86)\Gpg4win\bin_64;C:\Program Files (x86)\GnuPG\bin;C:\Cygwin\bin;C:\Program Files\PuTTY\;C:\Program Files (x86)WinSCP\;C:\Program Files\Le Robert Correcteur\wow64\Libs\;C:\Program Files\Le Robert Correcteur\Libs\;C:\Program Files\Bandizip\7z;C:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files\Intel\WiFi\bin\;C:\ProgramFiles\Common Files\Intel\WirelessCommon\;C:\Program Files\Bandizip\7z;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Common Files\Acronis\TibMounter64;C:\Program Files (x86)\EaseUS\Todo Backup\bin\x64\
Executing...
Fichier introuvable - Copy1
0 fichier(s) copié(s)
Error code...
4
Appuyez sur une touche pour continuer...

2/- essai.bat with xxcopy

E:\Chantier\Travails>essai

Attendre 0 secondes, appuyez sur une touche pour continuer...
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Python36\Scripts\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramFiles\Python38\Scripts\;C:\Program Files\Python38\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\outils\process;C:\outils\MRS\PSTools;C:\outils\closeapp;C:\outils\cmdow;C:\outils\chp;C:\outils\switch;C:\outils\PT\cmdconrg;C:\Program Files (x86)\Conceptworld\Copywhiz\CopywhizCopy.exe;C:\outils\PT\filetypes;C:\outils\PT\fixexelnk;C:\outils\enumser\Release\EnumSer.exe;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Acronis\CommandLineTool\;C:\outils\MC;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\BAT;E:\BAT;C:\QBASIC;E:\Chantier\QBASIC;C:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files (x86)\Runtime Software\ShadowCopy;C:\Program Files (x86)\AOMEI Backupper;C:\ProgramFiles\Windows Imaging\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Intel\UCRT\;C:\Program Files\Intel\UCRT\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\outils\nssm-2.24\win64;C:\Program Files\santesocial\galss\;C:\Perl64\bin\;C:\Program Files (x86)\Gpg4win\bin;C:\Program Files (x86)\Gpg4win\bin_64;C:\Program Files (x86)\GnuPG\bin;C:\Cygwin\bin;C:\Program Files\PuTTY\;C:\Program Files (x86)WinSCP\;C:\Program Files\Le Robert Correcteur\wow64\Libs\;C:\Program Files\Le Robert Correcteur\Libs\;C:\Program Files\Bandizip\7z;C:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files\Intel\WiFi\bin\;C:\ProgramFiles\Common Files\Intel\WirelessCommon\;C:\Program Files\Bandizip\7z;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Common Files\Acronis\TibMounter64;C:\Program Files (x86)\EaseUS\Todo Backup\bin\x64\
Executing...

XXCOPY64  == Pro Edition ==    Ver 3.33.3  (c)1995-2016 Pixelab, Inc.

C:\Temp\Copy2

Do you want to create this new directory ? Y
-------------------------------------------------------------------------------
 Directories Processed = 1
 Total Data in Bytes   = 0
 Elapsed time in sec.  = 0.001
 Action speed (MB/min) =   0
 Files Copied          = 0
 Exit code             = 100 (No files were found to copy)

Error code...
100
Appuyez sur une touche pour continuer...

From a command prompt window all is right.

Now let's try from Shutter:

1 / - Action: "E:\BAT\ESSA.BAT" (xcopy)

Attendre 0 secondes, appuyez sur une touche pour continuer...
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Python36\Scripts\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramFiles\Python38\Scripts\;C:\Program Files\Python38\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\outils\process;C:\outils\MRS\PSTools;C:\outils\closeapp;C:\outils\cmdow;C:\outils\chp;C:\outils\switch;C:\outils\PT\cmdconrg;C:\Program Files (x86)\Conceptworld\Copywhiz\CopywhizCopy.exe;C:\outils\PT\filetypes;C:\outils\PT\fixexelnk;C:\outils\enumser\Release\EnumSer.exe;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Acronis\CommandLineTool\;C:\outils\MC;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\BAT;E:\BAT;C:\QBASIC;E:\Chantier\QBASIC;C:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files (x86)\Runtime Software\ShadowCopy;C:\Program Files (x86)\AOMEI Backupper;C:\ProgramFiles\Windows Imaging\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Intel\UCRT\;C:\Program Files\Intel\UCRT\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\outils\nssm-2.24\win64;C:\Program Files\santesocial\galss\;C:\Perl64\bin\;C:\Program Files (x86)\Gpg4win\bin;C:\Program Files (x86)\Gpg4win\bin_64;C:\Program Files (x86)\GnuPG\bin;C:\Cygwin\bin;C:\Program Files\PuTTY\;C:\Program Files (x86)WinSCP\;C:\Program Files\Le Robert Correcteur\wow64\Libs\;C:\Program Files\Le Robert Correcteur\Libs\;C:\Program Files\Bandizip\7z;C:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files\Intel\WiFi\bin\;C:\ProgramFiles\Common Files\Intel\WirelessCommon\;C:\Program Files\Bandizip\7z;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
Executing...
0 fichier(s) copié(s)
Error code...
0
Appuyez sur une touche pour continuer...

2/- Action: "E:\BAT\ESSAI.bat" (xxcopy)

Attendre 0 secondes, appuyez sur une touche pour continuer...
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Python36\Scripts\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramFiles\Python38\Scripts\;C:\Program Files\Python38\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\outils\process;C:\outils\MRS\PSTools;C:\outils\closeapp;C:\outils\cmdow;C:\outils\chp;C:\outils\switch;C:\outils\PT\cmdconrg;C:\Program Files (x86)\Conceptworld\Copywhiz\CopywhizCopy.exe;C:\outils\PT\filetypes;C:\outils\PT\fixexelnk;C:\outils\enumser\Release\EnumSer.exe;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Acronis\CommandLineTool\;C:\outils\MC;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\BAT;E:\BAT;C:\QBASIC;E:\Chantier\QBASIC;C:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files (x86)\Runtime Software\ShadowCopy;C:\Program Files (x86)\AOMEI Backupper;C:\ProgramFiles\Windows Imaging\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Intel\UCRT\;C:\Program Files\Intel\UCRT\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\outils\nssm-2.24\win64;C:\Program Files\santesocial\galss\;C:\Perl64\bin\;C:\Program Files (x86)\Gpg4win\bin;C:\Program Files (x86)\Gpg4win\bin_64;C:\Program Files (x86)\GnuPG\bin;C:\Cygwin\bin;C:\Program Files\PuTTY\;C:\Program Files (x86)WinSCP\;C:\Program Files\Le Robert Correcteur\wow64\Libs\;C:\Program Files\Le Robert Correcteur\Libs\;C:\Program Files\Bandizip\7z;C:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files\Intel\WiFi\bin\;C:\ProgramFiles\Common Files\Intel\WirelessCommon\;C:\Program Files\Bandizip\7z;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
Executing...
'xxcopy' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
Error code...
9009
Appuyez sur une touche pour continuer...

I think the error code 9009 is a Shutter error code.

For info the xxcopy output error code:

XXCOPY's standard exit codes:

     Exit Code  Comment (in default mode with /ER0)
   ---------------------------------------------------------
         0     No error, Successful operation
        1-32   DATMAN software package error code
        33     Aborted by user
        34     Illegal command parameter
        35     Invalid DOS version
        36     The current directory is invalid
        37     Resident DATMAN wrong version
        38     Cannot create the destination directory
        40     Some fatal error has occurred
        41     Invalid source specifier
        42     Invalid destination specifier
        43     Invalid exclusion item specifier
        44     Disk Full
        45     Share violation error
        46     Conditional termination
        47     Path name exceeds the file system's limit
        48     Cannot overwrite read-only file
        49     Problem in network
       100     No files were found to copy
      101-254  # errors in file copy (1-154, biased by 100)
        255    # errors exceeding 154 files


XCOPY-compatible exit codes:

    Exit Code  Comment (in XCOPY-compatible mode with /ER)
   ---------------------------------------------------------
         0     No error, Successful operation
         1     No files were found to copy
         2     Aborted by user
         4     Disk Full, command syntax error, etc.
         5     Disk write error.

What about you?

Thanks for your help

Last edited by den4b (2020-05-10 18:07)

Offline

#4 2020-05-10 17:58

les renardeaux
Member
Registered: 2020-05-09
Posts: 6

Re: Batch script with XXCOPY in System32

Of course, I looked for myself.
After downloading and installing (just for testing) another task sheduler I have the same behavior.
Tease, so I tried another test but, after having compiled my batch in exe, by launching this time the compiled exe. And there it works!

The question remains why the xxcopy program is not seen when it is called by the batch in a task sheduler ?
So for example if I call with Schutter this batch

esso.bat:

@echo off
echo:
DIR / W C: \ Windows \ System32
PAUSE

Output of esso.bat:

Utilman.exe
uudf.dll
UXInit.dll
uxlib.dll
uxlibres.dll
uxtheme.dll
VAN.dll
Vault.dll
vaultcli.dll
VB40032.DLL
VB4FR32.DLL
VB5DB.DLL
VB5FR.dll
VB5StKit.dll
VB6FR.DLL
vbajet32.dll
VBAR332.DLL
VBICodec.ax
vbisurf.ax
vbscript.dll
vcamp110.dll
vcamp120.dll
vcamp140.dll
vccorlib110.dll
vccorlib120.dll
vccorlib140.dll
vcomp100.dll
vcomp110.dll
vcomp120.dll
vcomp140.dll
vcruntime140.dll
vdmdbg.dll
vdsbas.dll
vdsdyn.dll
vdsvd.dll
vds_ps.dll
verclsid.exe
verifier.dll
verifier.exe
version.dll
vfpodbc.dll
vfwwdm32.dll
vidcap.ax
VIDRESZR.DLL
virtdisk.dll
vpnikeapi.dll
vssadmin.exe
vssapi.dll
vsstrace.dll
vss_ps.dll
vulkan-1-1-0-26-0.dll
vulkan-1.dll
vulkaninfo-1-1-0-26-0.exe
vulkaninfo.exe
w32tm.exe
w32topl.dll
WABSyncProvider.dll
waitfor.exe
wamregps.dll
[Wat]
wavemsp.dll
[wbem]
wbemcomn.dll
[WCN]
WcnApi.dll
wcncsvc.dll
WcnEapAuthProxy.dll
WcnEapPeerProxy.dll
wcnwiz.dll
WcsPlugInService.dll
wdc.dll
[wdi]
wdi.dll
wdigest.dll
wdmaud.drv
wdscore.dll
WEB.rs
webcheck.dll
WebClnt.dll
webio.dll
webservices.dll
wecapi.dll
wecutil.exe
wer.dll
werdiagcontroller.dll
WerFault.exe
WerFaultSecure.exe
wermgr.exe
werui.dll
wevtapi.dll
wevtfwd.dll
wevtutil.exe
wextract.exe
WF.msc
wfapigp.dll
WfHC.dll
whealogr.dll
where.exe
whhelper.dll
whoami.exe
wiaacmgr.exe
wiaaut.dll
wiadefui.dll
wiadss.dll
WiaExtensionHost64.dll
wiascanprofiles.dll
wiashext.dll
wiatrace.dll
wiavideo.dll
wimgapi.dll
wimserv.exe
win32spl.dll
winbio.dll
winbrand.dll
wincredprovider.dll
windcpfbs.dll
windflfbs.dll
WindowsAccessBridge-32.dll
WindowsCodecs.dll
WindowsCodecsExt.dll
[WindowsPowerShell]
WinFax.dll
winhttp.dll
wininet.dll
wininit.exe
winipsec.dll
winmm.dll
winnsi.dll
[winrm]
winrm.cmd
winrm.vbs
winrnr.dll
winrs.exe
winrscmd.dll
winrshost.exe
winrsmgr.dll
winrssrv.dll
wins.mib
WinSATAPI.dll
WinSCard.dll
winsevr.dat
winshfhc.dll
winsockhc.dll
winspool.drv
WINSRPC.DLL
winsta.dll
WinSync.dll
WinSyncMetastore.dll
WinSyncProviders.dll
wintrust.dll
winusb.dll
winver.exe
wkscli.dll
wksprtPS.dll
wlanapi.dll
wlancfg.dll
WLanConn.dll
wlandlg.dll
wlanext.exe
wlangpui.dll
wlanhlp.dll
wlaninst.dll
WlanMM.dll
wlanmsm.dll
wlanpref.dll
wlansec.dll
wlanui.dll
wlanutil.dll
Wldap32.dll
wlgpclnt.dll
WlS0WndH.dll
WMADMOD.DLL
WMADMOE.DLL
WMASF.DLL
wmcodecdspps.dll
wmdmlog.dll
wmdmps.dll
wmdrmdev.dll
wmdrmnet.dll
wmdrmsdk.dll
wmerror.dll
wmi.dll
wmidx.dll
wmiprop.dll
WMNetMgr.dll
wmp.dll
wmpcm.dll
WmpDui.dll
wmpdxm.dll
wmpeffects.dll
WMPEncEn.dll
WMPhoto.dll
wmploc.DLL
wmpmde.dll
wmpps.dll
wmpshell.dll
wmpsrcwp.dll
wmsgapi.dll
WMSPDMOD.DLL
WMSPDMOE.DLL
WMVCORE.DLL
WMVDECOD.DLL
wmvdspa.dll
WMVENCOD.DLL
WMVSDECD.DLL
WMVSENCD.DLL
WMVXENCD.DLL
wow32.dll
wowreg32.exe
Wpc.dll
wpcao.dll
wpcsvc.dll
wpdshext.dll
WPDShextAutoplay.exe
WPDShServiceObj.dll
WPDSp.dll
wpdwcn.dll
write.exe
WRusr.dll
ws2help.dll
ws2_32.dll
wscapi.dll
wscinterop.dll
wscisvif.dll
wscmisetup.dll
wscproxystub.dll
wscript.exe
wscui.cpl
WSDApi.dll
wsdchngr.dll
WSDEWSProxy.DLL
WSDRCWSProxy.DLL
wsecedit.dll
wshbth.dll
wshcon.dll
wshelper.dll
wshext.dll
wship6.dll
wshirda.dll
wshom.ocx
wshqos.dll
wshrm.dll
WSHTCPIP.DLL
wsmanconfig_schema.xml
WSManHTTPConfig.exe
WSManMigrationPlugin.dll
WsmAuto.dll
wsmplpxy.dll
wsmprovhost.exe
WsmPty.xsl
WsmRes.dll
WsmSvc.dll
WsmTxt.xsl
WsmWmiPl.dll
wsnmp32.dll
wsock32.dll
WSTPager.ax
wtsapi32.dll
wuapi.dll
wuapp.exe
wudriver.dll
wups.dll
wusa.exe
wuwebv.dll
wvc.dll
WWanAPI.dll
wwapi.dll
wzcdlg.dll
xcopy.exe
XInput9_1_0.dll
xmlfilter.dll
xmllite.dll
xmlprovi.dll
xolehlp.dll
XpsFilt.dll
XpsGdiConverter.dll
XpsPrint.dll
XpsRasterService.dll
xpsrchvw.exe
xpsrchvw.xml
xpsservices.dll
XPSSHHDR.dll
xpssvcs.dll
[XPSViewer]
xwizard.dtd
xwizard.exe
xwizards.dll
xwreg.dll
xwtpdui.dll
xwtpw32.dll
xxconsole.ini
[zh-CN]
[zh-Hans]
[zh-Hant]
[zh-HK]
[zh-TW]
zipfldr.dll
            2532 file (s) 1 252 328 701 bytes
             118 Ans (s) 130,015 330,304 free bytes
Press any key to continue ...

And if I compile my batch in exe and call this exe by Schutter I get:

Output of esso.exe:

wecutil.exe
wer.dll
werconcpl.dll
wercplsupport.dll
werdiagcontroller.dll
WerFault.exe
WerFaultSecure.exe
wermgr.exe
wersvc.dll
werui.dll
wevtapi.dll
wevtfwd.dll
wevtsvc.dll
wevtutil.exe
wextract.exe
WF.msc
wfapigp.dll
WfHC.dll
[wfp]
WFS.exe
WFSR.dll
whealogr.dll
where.exe
whhelper.dll
whoami.exe
wiaacmgr.exe
wiaaut.dll
wiadefui.dll
wiadss.dll
WiaExtensionHost64.dll
wiarpc.dll
wiascanprofiles.dll
wiaservc.dll
wiashext.dll
wiatrace.dll
wiavideo.dll
wiawow64.exe
wimgapi.dll
wimserv.exe
win32k.sys
win32spl.dll
winbio.dll
[WinBioDatabase]
[WinBioPlugIns]
winbrand.dll
wincredprovider.dll
WindowsAnytimeUpgrade.exe
WindowsAnytimeUpgradeResults.exe
WindowsAnytimeUpgradeui.exe
WindowsCodecs.dll
WindowsCodecsExt.dll
[WindowsPowerShell]
winethc.dll
[winevt]
WinFax.dll
winhttp.dll
wininet.dll
wininit.exe
winipsec.dll
winload.efi
winload.exe
winlogon.exe
winmm.dll
winnsi.dll
[WinPatrol]
winresume.efi
winresume.exe
[winrm]
winrm.cmd
winrm.vbs
winrnr.dll
winrs.exe
winrscmd.dll
winrshost.exe
winrsmgr.dll
winrssrv.dll
wins.mib
WinSAT.exe
WinSATAPI.dll
WinSCard.dll
WinSetupUI.dll
winshfhc.dll
winsockhc.dll
winspool.drv
WINSRPC.DLL
winsrv.dll
winsta.dll
WinSync.dll
WinSyncMetastore.dll
WinSyncProviders.dll
wintrust.dll
winusb.dll
winver.exe
wireguard-log-2019-11-07T204549.txt
wisptis.exe
wkscli.dll
wksprt.exe
wksprtPS.dll
wkssvc.dll
wlanapi.dll
wlancfg.dll
WLanConn.dll
wlandlg.dll
wlanext.exe
wlangpui.dll
WLanHC.dll
wlanhlp.dll
wlaninst.dll
WlanMM.dll
wlanmsm.dll
wlanpref.dll
wlansec.dll
wlansvc.dll
wlanui.dll
wlanutil.dll
Wldap32.dll
wlgpclnt.dll
wlihvui.dll
wlrmdr.exe
WlS0WndH.dll
WMADMOD.DLL
WMADMOE.DLL
WMALFXGFXDSP.dll
WMASF.DLL
wmcodecdspps.dll
wmdmlog.dll
wmdmps.dll
wmdrmdev.dll
wmdrmnet.dll
wmdrmsdk.dll
wmerror.dll
wmi.dll
wmicmiplugin.dll
wmidx.dll
WmiMgmt.msc
wmiprop.dll
WMNetMgr.dll
wmp.dll
wmpcm.dll
WmpDui.dll
wmpdxm.dll
wmpeffects.dll
WMPEncEn.dll
WMPhoto.dll
wmploc.DLL
wmpmde.dll
wmpps.dll
wmpshell.dll
wmpsrcwp.dll
wmsgapi.dll
WMSPDMOD.DLL
WMSPDMOE.DLL
WMVCORE.DLL
WMVDECOD.DLL
wmvdspa.dll
WMVENCOD.DLL
WMVSDECD.DLL
WMVSENCD.DLL
WMVXENCD.DLL
wow64.dll
wow64cpu.dll
wow64mib.dll
wow64win.dll
wowreg32.exe
Wpc.dll
wpcao.dll
wpccpl.dll
wpcmig.dll
wpcsvc.dll
wpcumi.dll
wpdbusenum.dll
WpdMtp.dll
WpdMtpUS.dll
wpdshext.dll
WPDShextAutoplay.exe
WPDShServiceObj.dll
WPDSp.dll
wpdwcn.dll
wpd_ci.dll
wpnpinst.exe
write.exe
WRusr.dll
ws2help.dll
ws2_32.dll
wscapi.dll
wscinterop.dll
wscisvif.dll
wscmisetup.dll
wscproxystub.dll
wscript.exe
wscsvc.dll
wscui.cpl
WSDApi.dll
wsdchngr.dll
WSDEWSProxy.DLL
WSDMon.dll
WSDPrintProxy.DLL
WSDRCWSProxy.DLL
WSDScanProxy.dll
wsecedit.dll
wsepno.dll
wshbth.dll
wshcon.dll
wshelper.dll
wshext.dll
wship6.dll
wshirda.dll
wshnetbs.dll
wshom.ocx
wshqos.dll
wshrm.dll
WSHTCPIP.DLL
wsmanconfig_schema.xml
WSManHTTPConfig.exe
WSManMigrationPlugin.dll
WsmAuto.dll
wsmplpxy.dll
wsmprovhost.exe
WsmPty.xsl
WsmRes.dll
WsmSvc.dll
WsmTxt.xsl
WsmWmiPl.dll
wsnmp32.dll
wsock32.dll
wsqmcons.exe
WSTPager.ax
wtsapi32.dll
wu.upgrade.ps.dll
wuapi.dll
wuapp.exe
wuauclt.exe
wuaueng.dll
wucltux.dll
WUDFCoinstaller.dll
WUDFHost.exe
WUDFPlatform.dll
WUDFSvc.dll
WUDFx.dll
wudriver.dll
wups.dll
wups2.dll
wusa.exe
wuwebv.dll
wvc.dll
Wwanadvui.dll
WWanAPI.dll
wwancfg.dll
wwanconn.dll
WWanHC.dll
wwaninst.dll
wwanmm.dll
Wwanpref.dll
wwanprotdim.dll
wwansvc.dll
wwapi.dll
wzcdlg.dll
xcopy.exe
xcopy.txt
XInput9_1_0.dll
xmlfilter.dll
xmllite.dll
xmlprovi.dll
xolehlp.dll
XpsFilt.dll
XpsGdiConverter.dll
XpsPrint.dll
XpsRasterService.dll
xpsrchvw.exe
xpsrchvw.xml
xpsservices.dll
XPSSHHDR.dll
xpssvcs.dll
xwizard.dtd
xwizard.exe
xwizards.dll
xwreg.dll
xwtpdui.dll
xwtpw32.dll
XX3218n.EXE
XX3320n.EXE
XXConsole.lnk
XXCOPY.CHM
XXCOPY.chw
XXCOPY.EXE
XXCOPY.LIC
xxcopy.txt
xxcopyex.txt
XXCOPYSU.EXE
XXPBAR64.EXE
zgmprxy.dll
[zh-CN]
[zh-Hans]
[zh-Hant]
[zh-HK]
[zh-TW]
zipfldr.dll
            3046 fichier(s)    1 844 513 488 octets
             129 Rép(s)  130 014 470 144 octets libres
Appuyez sur une touche pour continuer...

This time the files all xxcopy *. * Are read.
I cannot explain this situation. And you ?
(Note that with exe it speaks french !?!?)

Last edited by den4b (2020-05-10 18:12)

Offline

#5 2020-05-10 18:20

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Batch script with XXCOPY in System32

The 9009 exit code is issued by the operating system. It corresponds to "file not found" error.

From your posts it is pretty clear that your scripts execute with different environment variables and maybe even by different users! That is the only way how I can explain different %PATH% variables, different directory listing (possibly due to permissions of different users), and even the difference in language (also a per-user locale configuration).

I think you should check what shell is executing your BAT files. Some configuration is not normal in your system.

Also, one directory listing shows "wow32.dll" but the other "wow64.dll", which suggests even a different executable architecture, i.e. 32-bit vs 64-bit.

Last edited by den4b (2020-05-10 18:26)

Offline

#6 2020-05-10 22:26

les renardeaux
Member
Registered: 2020-05-09
Posts: 6

Re: Batch script with XXCOPY in System32

I think you're right. I came to the conclusion that Shutter (32 bit) launches the batch in a 32-bit environment.
XXopy is 64-bit and is therefore not read by the batch in its 32-bit environment.
So presumably it is impossible for Shutter to launch batch 64-bit exes.

And I don't see any solutions to work around this.

Offline

#7 2020-05-10 22:37

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Batch script with XXCOPY in System32

I think installing appropriate versions of XXCOPY into both System32 and SysWOW64 directories should resolve the issue.

See this article for the differences between these two directories, for example:
https://www.howtogeek.com/326509/whats- … n-windows/

Alternatively, you can specify the full path to the XXCOPY executable, or call XXCOPY directly within Shutter, instead of the BAT file.

By the way, installing 3rd party applications into the Windows system folders is not the best practice. It is safer to just add arbitrary paths to the %PATH% environment variable.

Offline

#8 2020-05-11 14:44

les renardeaux
Member
Registered: 2020-05-09
Posts: 6

Re: Batch script with XXCOPY in System32

You said:

> Alternatively, you can specify the full path to the XXCOPY executable,
> or call XXCOPY directly within Shutter, instead of the BAT file.

This gives the error:
'xxcopy' is not recognized as an internal command
or external, an executable program or a batch file.
In fact, calling a batch from Shutter opens the prompt from C:\Windows\SysWOW64\cmd.exe (and not C:\Windows\System32\cmd.exe). You mentioned the differences between System32 and SysWOW64 (we know them), in this case it fully plays their role.

Indeed so you are proposing:

> I think installing appropriate versions of XXCOPY into both
> System32 and SysWOW64 directories should resolve the issue.

Of course we could ... But there is obviously an interest in using the 64-bit version, in copying speed and in cache management. So maybe a 64bit version of Schuller would be welcome for 64-bit OS.

> By the way, installing 3rd party applications into the Windows
> system folders is not the best practice. It is safer to just
> add arbitrary paths to the %PATH% environment variable.

Yes. Surely. But xxcopy has its own installer which places the different files where they should be. It is not a program badly hacked and simply copied into a directory.


Finally I think that in the absence of an upcoming availability of Schuller in a 64-bit version we will uninstall this application. Too bad, however.

Last edited by les renardeaux (2020-05-11 14:46)

Offline

#9 2020-05-11 19:23

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Batch script with XXCOPY in System32

There is no noticeable benefit in having a 64-bit version of Shutter.

Processor architecture (32 vs 64 bit) plays a big role when applications need to address a continuous block of memory larger than 4GB, or when prolong and complex operations on 64-bit words are required. For example, encryption and video encoding operations can see noticeable benefit if coded up appropriately. Shutter spends more than 99% of the time just waiting for user and system events, so 64-bit architecture will offer no benefit, but would increase maintenance cost.

There is also no issue with interoperability between 32-bit and 64-bit applications, i.e. 32-bit applications can call 64-bit applications as well as in reverse without any issues. That means that Shutter can execute either 32-bit or 64-bit version of XXCOPY, without any difference.

You can install a 64-bit version of XXCOPY in to the %PATH% variable, or install 64-bit version into both System32 and SysWOW64 directories. This will make sure that both 32-bit and 64-bit applications will always call a 64-bit version of XXCOPY.

It really does not not matter which processor architecture is used by Shutter.

Offline

#10 2020-05-12 16:03

les renardeaux
Member
Registered: 2020-05-09
Posts: 6

Re: Batch script with XXCOPY in System32

OK, here is one solution (thanks to Otomatic) that I put here, it could be used for others...

We have already encountered this problem in the past with some 32 bit applications and file opening dialogs. Without being able to intervene on them to circumvent this limitation

In fact, with these 32 bit software under Windows 64 bit, when you request the system32 folder you are redirected transparently to the SysWOW64 folder while seeing system32.

As you know, when a 32-bit program is run on a 64-bit Windows (except 32 bit programs running at low level), a 32-bit emulator will be invoked to handle this 32-bit program.

To get the "right" system32 folder, you must type type (or choose if visible depending on your machine) [sysnative] in the "File name" area of the file opening form (instead of sytem32). In the case mentioned here we will call xxcopy by entering
C:\Windows\Sysnative\xxcopy or %windi%\Sysnative\xxcopy in the batch when called by Schutter.


Here some info to know more about sysnative
https://www.samlogic.net/articles/sysna … indows.htm

Regards.

Last edited by les renardeaux (2020-05-12 16:06)

Offline

Board footer

Powered by FluxBB