This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Write to file with installscript fails on windows vista
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
01:34 AM
Write to file with installscript fails on windows vista
The installscript command OpenFile failes on Windows Vista are there any other installscript command to use in Vista that will work?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
09:24 AM
I'm not aware of any problems with the file APIs on Vista. However there are a lot of tricks that the UAC-related elevation can play on where your files really are vs. where you originally thought they were. Could you be running into a case where the path your code tries to open becomes incorrect?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
10:08 AM
The path is correct.
When Im using
I get negative result from OpenFile on Vista (not on XP)
With the following code the return value is greater then 0 on both XP and Vista:
I no longer need to write to the specific file via Installscript, but maybe some other user searching the forum would like to know how to do..
Thanks anyway MichaelU.
When Im using
OpenFileMode(FILE_MODE_APPEN);
if(OpenFile(nvFileHandle, sDir, sFile) < 0) then
...
I get negative result from OpenFile on Vista (not on XP)
With the following code the return value is greater then 0 on both XP and Vista:
OpenFileMode(FILE_MODE_NORMAL);
if(OpenFile(nvFileHandle, sDir, sFile) < 0) then
...
I no longer need to write to the specific file via Installscript, but maybe some other user searching the forum would like to know how to do..
Thanks anyway MichaelU.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)