Photo Gallery Member List Search Calendars FAQ Ticket List Log Out



"Write To File Failed" - Need Expertise!!! - SeeqPodDR

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,54710
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> "Write To File Failed" - Need Expertise!!! - SeeqPodDR
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 "Write To File Failed" - Need Expertise!!! - ... - 12/26/2007 3:35:23 AM   
  yfki

 

Posts: 79
Score: 0
Joined: 12/12/2007
Status: offline
I wrote an .HTA/.vbs Package to do the following:
  • Run HTTP Request
  • Parse XML Response
  • Take Node (Which is a URL)
  • Fill a drop down with the values
  • Upon change of the ComboBox (A URL is selected) the binary file is downloaded
        However, if I use strMatch instead of "C:\Temp\123.mp3"  inside  "Download(URL,myMatch)
    it fails everytime time :(   Please Please Help !!

I have done everything I can think of regarding passing this value, ensuring its a string etc... Nothing works unless I specifically hardcode the path/filename
I think it has somethign to do with the .HTA side of things because I have used this code before and passed it a string... (Just not in an .HTA)
I have checked file permissions, everything seems fine, plus the script can write to the directory no problem if I hardcode sDest

           Error Output
Err.Number:  3004
Err.Description: Write To File Failed
Err.HelpContext: 1240664
Err.Source: ADODB.Stream


< Message edited by yfki -- 12/27/2007 3:58:58 AM >
 
 
Post #: 1
 
 RE: "Write To File Failed" - Need Expertise!!! - 12/26/2007 9:30:35 AM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
are you sure that strMatch has a value?

_____________________________

Have you searched here ?
VBScript Fundamentals
My Site

(in reply to yfki)
 
 
Post #: 2
 
 RE: "Write To File Failed" - Need Expertise!!! - 12/26/2007 9:37:32 AM   
  yfki

 

Posts: 79
Score: 0
Joined: 12/12/2007
Status: offline
Yup, 10000% sure, I have done plenty of reading.

My guess... Because its running as .hta, the context, locale, does not allow the stream to save without having some type of hardcoded name.
The exact same code works if I pass it a string, but thats run as .vbs, which is clearly different then mshta.exe

I suppose this was the result of security exploits against the "ADODB.STREAM" spyware etc...

I am working to see if I can use a script packager to resolve the issue, call an external script to do some utility work, either download the file, or perform the rename.

(in reply to kirrilian)
 
 
Post #: 3
 
 RE: "Write To File Failed" - Need Expertise!!... - 12/26/2007 9:15:24 PM   
  yfki

 

Posts: 79
Score: 0
Joined: 12/12/2007
Status: offline
Well I figured out a way around the ADODB.Stream problem, had to do with running in .HTA context.

< Message edited by yfki -- 12/27/2007 9:12:44 PM >

(in reply to yfki)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> "Write To File Failed" - Need Expertise!!! - SeeqPodDR Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts