Jump to content

Recommended Posts

Posted

I hope this is the right thread /forum to place this topic in. :unsure:

I'm trying to execute a .vbs file (double-click) on Windows 2000 Advanced Server with Service Pack 4 (on administrator account) and it gives me this startup error:

wsherror1gh.jpg

Here is the entire contents (code) of the .vbs file when viewed via Notepad: (line by line)

wsherror28nw.jpg

The highlighted text indicates changes that reflect my system requirements.

I already have "Windows Script 5.6 for Windows XP and Windows 2000 " installed.

So does anyone know what is wrong with my problem?

Please help me get this code working so I can encode multiple AVI files. As always, your help is appreciated. :D

Thank you.


Posted (edited)

strFullCommand = """C:\Program Files\vso\ConvertXtoDVD\ConvertXtoDVD.exe"" /file=" & strFullLocation & " /auto=true /close"

<Edit>

You may also find the quotes easier to grasp if you were to use the concatenation operator and a continuation character in this case.

strFullCommand = """C:\Program Files\vso\ConvertXtoDVD\ConvertXtoDVD.exe""" &_

" /file=" & strFullLocation & " /auto=true /close"

The first line would show your file name using the "" convention to signify the set of double quotes, ("), within the quoted string, due to the space in the filename path.

</Edit>

Edited by Yzöwl
Posted

Since I do not know the purpose of your script here is what I wrote up for you to try.

You may have to make some changes.

Dim Act	   : Set Act = CreateObject("Wscript.Shell")
Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim ObjFolder : Set ObjFolder = Fso.GetFolder("D:\MyAviFiles")
Dim ColFiles : Set ColFiles = ObjFolder.Files
Dim Cmd1 : Cmd1 = Act.ExpandEnvironmentStrings("%Programfiles%\Vso\ConverXtoDVD\ConverXToDVD.Exe")

Dim ObjFile
For Each ObjFile In ColFiles
If Fso.FileExists(Cmd1) Then
Act.Run(Cmd1 & " /auto=true /close " & ObjFile.Path), 1 , True
End If
Next

Posted
strFullCommand = """C:\Program Files\vso\ConvertXtoDVD\ConvertXtoDVD.exe"" /file=" & strFullLocation & " /auto=true /close"

<Edit>

You may also find the quotes easier to grasp if you were to use the concatenation operator and a continuation character in this case.

strFullCommand = """C:\Program Files\vso\ConvertXtoDVD\ConvertXtoDVD.exe""" &_

" /file=" & strFullLocation & " /auto=true /close"

The first line would show your file name using the "" convention to signify the set of double quotes, ("), within the quoted string, due to the space in the filename path.

</Edit>

OK we're getting somewhere but the program only loads one file at a time. I want the program to load all the files in my folder.

Posted

Ok i already figured out the whole thing. The only problem I have is the program is too stubborn to auto-close, which is on the program's fault. So i'll have to wait for another update release of the program for it to work properly. THanks anyway.

Posted

From my understanding of the program you are using, should you not be using a file listing like this:

  • "C:\Program Files\vso\ConvertXtoDVD\ConvertXtoDvd.exe" /fl=filelist.txt /auto=true /close

If so you may be able to use:

If wscript.Arguments.Count = 0 then
msgbox "drop a Directory onto me..."
Wscript.Quit
End If
objin = wscript.Arguments(0)
Const TemporaryFolder = 2
Set wshell = wScript.CreateObject("WScript.Shell")
Set fileobj = CreateObject("Scripting.FileSystemObject")
Set objfolder = fileobj.GetFolder(objin)
Set filelist = objfolder.files
Set tfolder = fileobj.GetSpecialFolder(TemporaryFolder)
With wshell.CreateShortcut("none.lnk")
.TargetPath = tfolder.Path
temppath = .TargetPath & "\"
End With
tfile = "filelist.txt"
Set filetxt = fileobj.CreateTextFile(temppath & tfile, true)
For Each f In filelist
filetxt.writeline chr(34) & f.path & chr(34)
Next
strexe = wshell.ExpandEnvironmentStrings("%ProgramFiles%\vso\ConvertXtoDVD\" &_
"ConvertXtoDvd.exe")
strarg = " /fl=" & chr(34) & temppath & tfile & chr(34) & " /auto=true /close"
wshell.Run(strexe & strarg, 1, true)

I don't know the program so you may need to remove or add double quotes in places, but it shouldn't be too far away. To use it just drop your folder containing your files to be added onto the vbs file.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...