1

This is a tough one to describe as lots of facets. Basically, I have a VB Script integrated into a batch script via:

<!-- : Begin Batch Script
    {Batch here}
WSF script ----------->
<package>
    <job id="CleanString">
        <script language="VBScript">
            {VBScript Here}
        </script>
    </job>
</package>

This is called via (an example) batch line, thus:

call cscript //nologo "%appPath%\CPWizBiz.bat?.wsf" //job:IniCommand /cmd:ReadValue /section:"1" /file:"C:\CPWizBiz.ini"

I don't think the code is the problem. It has been working for 2 months now without hitch. No direct changes to the relevant code.

However, I've started getting a mysterious error:

C:\Scripts\CPWizBiz.bat?.wsf(1663, 15) Windows Script Host: Expecting a valid name

Occurs at all points throughout my code. Nothing to do with the %appPath% variable, paths or anything else. I can't help but think it's something to do with a WSH setting or something. Unfortunately, I know very little about WSH.

Also, I don't think those numbers were there in the console output before "(1663, 15)".

I'm praying someone can help, as this is a devastating error and one I feel quite powerless to do anything about. :(

I appreciate a lot more relevant info might be needed... Thanks

Ňɏssa Pøngjǣrdenlarp
  • 38,411
  • 12
  • 59
  • 178
stigzler
  • 793
  • 2
  • 12
  • 29
  • what do you have on line `1663` ? – npocmaka Feb 20 '15 at 01:10
  • In the end, I just cut my losses and placed the integrated vbs code into a separate vbs script in the home directory. Running now no problems. Exactly the same script. Either the whole wsh thing is sticky, or a bit beyond my reach... – stigzler Feb 20 '15 at 01:10
  • How on earth does your filename contain `.bat?.wsf` in it? – Dai Feb 20 '15 at 01:23
  • @Dai - See the last update at http://stackoverflow.com/a/9074483/1012053 – dbenham Feb 20 '15 at 05:57
  • apologies, npocmaka - done a lot fo coding since then + line will have moved! However - oh yeah! I didn't think of that. – stigzler Feb 20 '15 at 19:29

1 Answers1

0

Closing this off, as ended up just using a separate vb script and calling via cscript.

stigzler
  • 793
  • 2
  • 12
  • 29