[VB]VB Script start niet meer op

Pagina: 1
Acties:

  • amiga1260
  • Registratie: Juni 2003
  • Laatst online: 30-04 05:48
Deze code werkte vorige week vrijdag wel, maar nu niet meer. Ik heb het geprobeerd met Viual Basic 6 om het op te lossen. Het bestand heb ik gekoppeld aan de Wscript.exe, maar werkt ook niet. Zelfs als ik de paden veranderd, geeft het geen melding.

Dit programma draait op eenn Windows 2000 +SP4 en Visual Webtask 4.

Deze script heb ik ook geprobeerd met een ander machine met Windows XP Pro.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
dim sf,x,par
dim WshShell
dim PathToSpider
dim PathToVWT,workDirectory
dim counter,outputFileVWT,outputFile
counter = 0
Set WshShell = CreateObject("WScript.Shell")
Set par = WScript.CreateObject("Scripting.Dictionary")
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")


PathToSpider = "C:\PROGRA~1\LENCOM~1\VISUAL~1\Spider.exe" 'path to Spider.exe
PathToVWT =   "C:\FUNDAS~1\OPDRAC~1\test.vwt"  'path to .vwt

outputFileVWT = "C:\FUNDAS~1\OPDRAC~1\test.txt"  'file output
outputFile = "C:\FUNDAS~1\EINDRE~1\test.txt"  'target file
workDirectory = "C:\FUNDAS~1\temp"

Dim currentParams



Sub Runtask()
   dim k,v,i,pp,na
   pp = ""
   k = par.Keys
   v = par.items
   for i=0 to par.count-1
    pp = pp & " /parameter/" & k(i) & "/" & v(i)
   next
   na = workDirectory & "\L_" & Replace(currentParams,"%","") & ".txt" 
   
   if fs.FileExists (na) then
       exit sub                      '''''''''''''''''if file exists not to repeat task       
   end if

   if fs.FileExists (outputFileVWT) then
       fs.DeleteFile outputFileVWT       
   end if

   WshShell.run PathToSpider & " " & PathToVWT & " /finishOnDone" & pp, , True
   
     if fs.FileExists  (outputFileVWT) then
       counter = counter +1
       fs.CopyFile outputFileVWT ,na,True
       if fs.FileExists  (na) then
          WshShell.run "cmd /C copy " & workDirectory & "\L_*.txt " & outputFile,7,True
       end if
       fs.DeleteFile outputFileVWT       

     end if
    
End Sub


par.RemoveAll
par.Add "plaatspostcode","1000"

currentParams = "1000"
Runtask

Verwijderd

Als er niets aan de code is gewijzigd, dan lost het niest op om de code te posten, aangezien daar het probleem niet zit. Er is waarschijnlijk iets gewijzigd in de configuratie, bijvoorbeeld paden naar gebruikte applicaties, te weinig disk ruimte, veranderde toegangsrechten, e.d.

Verder geef je ook niet aan of je een foutmelding krijgt. Heb je bjivoorbeeld in de event log gekeken voor rare meldingen?

  • raptorix
  • Registratie: Februari 2000
  • Laatst online: 17-02-2022
Zet je virusscanner eens uit.

  • amiga1260
  • Registratie: Juni 2003
  • Laatst online: 30-04 05:48
Virusscanner heb ik uigezet maar doet nog steeds niets. Zou het komen dat ik ook IIIS heb geinstalleerd?

  • amiga1260
  • Registratie: Juni 2003
  • Laatst online: 30-04 05:48
Ik heb de paden van deze code veranderd:

code:
1
2
3
4
5
6
PathToSpider = "C:\PROGRA~1\LENCOM~1\VISUAL~1\Spider.exe" 'path to Spider.exe
PathToVWT =   "C:\FUNDAS~1\OPDRAC~1\test.vwt"  'path to .vwt

outputFileVWT = "C:\FUNDAS~1\OPDRAC~1\test.txt"  'file output
outputFile = "C:\FUNDAS~1\EINDRE~1\test.txt"  'target file
workDirectory = "C:\FUNDAS~1\temp"



Nu werkt het weer :*)

Bedankt voor jullie tips.

  • raptorix
  • Registratie: Februari 2000
  • Laatst online: 17-02-2022
Ben je trouwens funda aan het spideren?
Pagina: 1