I need to make some changes in an xml file after I've installed a couple of MSI
. For that I was thinking calling a vbscript using the bat file with the %*
trick. My problem is that I get an 0X80070001
error, but when I run the script manually it works fine.
Code in chain:
<ExePackage
Id="CultureChange"
SourceFile="run.bat"
DisplayName="Changing Default Language"
InstallCommand='cscript Script.vbs "[DefaultCulture]"'
PerMachine="yes"
Cache="yes"
Compressed="yes">
<Payload SourceFile="Script.vbs"/>
</ExePackage>
I also tried calling cscript
with C:\windows\SysNative\cscript.exe
but same result.
log:
Applying execute package: CultureChange, action: Install, path: C:\ProgramData\Package Cache\1608BB75347CD8C40187E5F3C0A969ED73A98D51\run.bat, arguments: '"C:\ProgramData\Package Cache\1608BB75347CD8C40187E5F3C0A969ED73A98D51\run.bat" C:\windows\SysNative\cscript.exe Script.vbs "it-IT"'
Error 0x80070001: Process returned error: 0x1
Error 0x80070001: Failed to execute EXE package.
Error 0x80070001: Failed to configure per-machine EXE package.
Also note that the MSI can't be modified so I can't make the changes in the xml file there.
I gave a solution that worked on Windows 8.1 but when I tested it on Windows 7 it still gave me the same error. here is the code:
@echo off
pushd %~dp0
C:\Windows\SysWOW64\cmd.exe /c cscript Script.vbs "%1"
I also found some documentation on the error:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd319335(v=vs.85).aspx
A write request was made to a resource on the device that was opened in Read mode using IPortableDeviceResources::GetStream, or a read request was made to a resource opened for Write or Create.
I watched the vbscript file and it was never accessed. Anyway, I went with editing the xml file in my managed bootstrapper in c# and not trying to run the vbscript but I'm leaving this question open since it's not really a good enough solution.
User contributions licensed under CC BY-SA 3.0