After experiencing a lot of down time, We decided to move this site to
CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.
"Write To File Failed" - Need Expertise!!! - SeeqPodDR
|
Author |
Message
|
yfki
-
Total Posts
:
97
- Scores: 0
-
Reward points
:
0
- Joined: 12/12/2007
-
Status: offline
|
"Write To File Failed" - Need Expertise!!! - SeeqPodDR
Wednesday, December 26, 2007 4:35 AM
( permalink)
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 on Thursday, December 27, 2007 4:58 AM>
|
|
|
|
kirrilian
-
Total Posts
:
629
- Scores: 3
-
Reward points
:
0
- Joined: 3/15/2005
- Location:
-
Status: offline
|
RE: "Write To File Failed" - Need Expertise!!!
Wednesday, December 26, 2007 10:30 AM
( permalink)
are you sure that strMatch has a value?
Have you searched [url="http://www.google.com"]here [/url]? [url="http://tinyurl.com/as7xm"]VBScript Fundamentals[/url] [url="http://kirrilian.dyndns.org/projects/code/"]My Site[/url]
|
|
|
|
yfki
-
Total Posts
:
97
- Scores: 0
-
Reward points
:
0
- Joined: 12/12/2007
-
Status: offline
|
RE: "Write To File Failed" - Need Expertise!!!
Wednesday, December 26, 2007 10:37 AM
( permalink)
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.
|
|
|
|
yfki
-
Total Posts
:
97
- Scores: 0
-
Reward points
:
0
- Joined: 12/12/2007
-
Status: offline
|
RE: "Write To File Failed" - Need Expertise!!! - SOLVED - Hi "SeeqPodDR"
Wednesday, December 26, 2007 10:15 PM
( permalink)
Well I figured out a way around the ADODB.Stream problem, had to do with running in .HTA context.
<message edited by yfki on Thursday, December 27, 2007 10:12 PM>
|
|
|
|
Online Bookmarks Sharing: