Heaventools
Contact Sales
|
About Us
| Forum |
Site Map
English
Deutsch
Русский
Home
Products
PE Explorer
Resource Tuner
ResTuner Console
FlexHex Editor
Solutions
Solutions Overview
For Developers
For IT Security
For Business
For Home Users
Downloads
Purchase
Order Online
Purchase Order
Request Quote
Renew License
Regional Resellers
Contact Sales
Technical Support
Contact Support
Support FAQs
Support Forums
Company
About Heaventools
Our Customers
Press Room
Contact Us
Site Map
May 22, 2013, 04:16:06 am
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Heaventools Support Forums
>
Resource Tuner Console
>
RTC Support Forum
(Moderator:
TechMan
) >
PEFileProxy.OpenFile() fails when file path is absolute and includes ..
Pages: [
1
]
« previous
next »
Print
Author
Topic: PEFileProxy.OpenFile() fails when file path is absolute and includes .. (Read 3060 times)
0 Members and 1 Guest are viewing this topic.
chris
New Member
Posts: 2
Offline
PEFileProxy.OpenFile() fails when file path is absolute and includes ..
«
on:
September 08, 2010, 04:45:41 am »
Hi!
When calling my rtc script, PEFileProxy.OpenFile() fails if the file path is absolute (that is begins with a drive letter) and contains '..':
Opening the file 'E:\chris\Documents\AW\AW\trunk\Packager\AW\msw\..\..\..\Staging\bin\win32\ArchiWIZARD.exe'...
Open file: E:\chris\Documents\AW\AW\trunk\Packager\AW\msw\..\..\..\Staging\bin\win32\ArchiWIZARD.exe
Error: Failed to open file. Process cancelled.
Opening the file produced a fatal error.
Running the same script on the same file, but using a relative path works:
Opening the file '..\..\..\Staging\bin\win32\ArchiWIZARD.exe'...
Open file: E:\chris\Documents\AW\AW\trunk\Staging\bin\win32\ArchiWIZARD.exe
File Size: 15360 bytes
...
The file do exists: another error message is emitted when the file is not found.
Additionally, the script (CreateObject("Scripting.FileSystemObject").GetFile()) can successfully open the file:
Getting CreationTime, LastAccessTime and LastWriteTime for file 'E:\chris\Documents\AW\AW\trunk\Packager\AW\msw\..\..\..\Staging\bin\win32\ArchiWIZARD.exe'...
Created : 12/07/2010 17:30:36
Last Modified: 01/09/2010 16:12:20
Last Accessed: 12/07/2010 17:30:36
I can provide the script.
I am using RTC 1.90 on Seven x64.
Is there a fix or a workaround (a way to produce the canonical path)?
Thanks for your help,
Chris.
chris
New Member
Posts: 2
Offline
Re: PEFileProxy.OpenFile() fails when file path is absolute and includes ..
«
Reply #1 on:
September 08, 2010, 06:09:28 am »
I have found a workaround:
replace
PEFileProxy.OpenFile SRCFILE
with
set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.GetFile(SRCFILE)
PEFileProxy.OpenFile f.Path
as f.Path is in canonical form.
TechMan
Heaventools
Support
Posts: 221
Location:
On Air
Offline
Re: PEFileProxy.OpenFile() fails when file path is absolute and includes ..
«
Reply #2 on:
September 10, 2010, 09:48:25 am »
Quote
Is there a fix or a workaround (a way to produce the canonical path)?
Thanks for spotting and reporting this issue. We will fix it up in the next RTC release.
TechMan Robot
Heaventools Software
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Customer Support
-----------------------------
=> Product News and Updates
=> Ping the Support Team
-----------------------------
PE Explorer
-----------------------------
=> PE Explorer Support Forum
=> PE Explorer Wish List
-----------------------------
Resource Tuner
-----------------------------
=> Resource Tuner Support Forum
=> Resource Tuner Future Releases
-----------------------------
Resource Tuner Console
-----------------------------
=> RTC Support Forum
=> RTC - Did we miss anything?
Loading...