Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Writing files to Root Folder c:\ in Vista

Reply
Thread Tools Display Modes

Writing files to Root Folder c:\ in Vista

 
 
Bill Armitage
Guest
Posts: n/a

 
      09-25-2007
I have just installed VISTA Ultimate but programs that ran in Windows XP fail
because I cant write files on the C:\ folder. How can I make the C:\ folder
accept files written to it? I want to do this once so that all my programs
can run under VISTA.
Can I write a program in VB6 to automatically change the folder attributes
on the C:\ folder so that clients, who may install VISTA, won't have this
problem when I send them programs that need to write to the C:\ folder?
 
Reply With Quote
 
 
 
 
Andrew McLaren
Guest
Posts: n/a

 
      09-26-2007
"Bill Armitage" <> wrote ...
>I have just installed VISTA Ultimate but programs that ran in Windows XP
>fail
> because I cant write files on the C:\ folder. How can I make the C:\
> folder
> accept files written to it? I want to do this once so that all my
> programs
> can run under VISTA.
> Can I write a program in VB6 to automatically change the folder attributes
> on the C:\ folder so that clients, who may install VISTA, won't have this
> problem when I send them programs that need to write to the C:\ folder?


Hi Bill,

You can change the permissions to the root directory manually, using the ACL
editor in Explorer (right-click C:\, choose Properties, then Security).

However, the root directory in Vista is write-protected for a Very Good
reason! Writing files to the root directory is a known and proven avenue
for viruses, trojans and other exploits. By weakening the security on the
root directory, you are increasing your clients' risk of infection.

By far the better solution, would be to investigate the programs trying to
write to the root, and see if you can configure them to write to some
acceptable location, such as %TEMP% or %APPDATA%. Writing files to the root
directory has been deprecated as a programming practice, for many years.
Applications which do this are bad programs. There's a limit to how far the
operating system needs accommodate these bad, insecure applications.

For example, one of my customers had a legacy application (c.1996) built on
top of the Borland Data Engine (BDE, aka Paradox Runtime). By default this
created files in the root, and thus failed to run on Vista. However, a bit
of tweaking in BDE Admin, changed the path from C:\ to C:\TEMP ... problem
solved! This was by far a better solution.

Amongst other things, if you're not extremely careful while changing
permissions on the root directory, the changes could cascade down the whole
directory tree, seriously eroding your overall security.

I'm sure you could write a VB6 app to do this; you'd probably need to
"Declare" GetSecurityDescriptorDacl() and related Win32 APIs from Lib
AdvAPI.dll. Or, it would probably be easier to do a ShellExecute(icacls.exe,
<params>). But distributing a program like this is tantamount to
distributing a virus, IMHO. It will weaken and possibly comprise the
security of the users' systems.

Anyway, if you want to experiment changing the root permissions, just modify
the root the same as you would any other directory: either in Explorer, or
via icacls.exe at the command line.

Regards,
--
Andrew McLaren
amclar (at) optusnet dot com dot au


 
Reply With Quote
 
parabola
Guest
Posts: n/a

 
      09-26-2007
another test. sorry guys...
"Andrew McLaren" <> wrote in message
news:26857230-34A5-45ED-A815-...
> "Bill Armitage" <> wrote ...
>>I have just installed VISTA Ultimate but programs that ran in Windows XP
>>fail
>> because I cant write files on the C:\ folder. How can I make the C:\
>> folder
>> accept files written to it? I want to do this once so that all my
>> programs
>> can run under VISTA.
>> Can I write a program in VB6 to automatically change the folder
>> attributes
>> on the C:\ folder so that clients, who may install VISTA, won't have this
>> problem when I send them programs that need to write to the C:\ folder?

>
> Hi Bill,
>
> You can change the permissions to the root directory manually, using the
> ACL editor in Explorer (right-click C:\, choose Properties, then
> Security).
>
> However, the root directory in Vista is write-protected for a Very Good
> reason! Writing files to the root directory is a known and proven avenue
> for viruses, trojans and other exploits. By weakening the security on the
> root directory, you are increasing your clients' risk of infection.
>
> By far the better solution, would be to investigate the programs trying to
> write to the root, and see if you can configure them to write to some
> acceptable location, such as %TEMP% or %APPDATA%. Writing files to the
> root directory has been deprecated as a programming practice, for many
> years. Applications which do this are bad programs. There's a limit to how
> far the operating system needs accommodate these bad, insecure
> applications.
>
> For example, one of my customers had a legacy application (c.1996) built
> on top of the Borland Data Engine (BDE, aka Paradox Runtime). By default
> this created files in the root, and thus failed to run on Vista. However,
> a bit of tweaking in BDE Admin, changed the path from C:\ to C:\TEMP ...
> problem solved! This was by far a better solution.
>
> Amongst other things, if you're not extremely careful while changing
> permissions on the root directory, the changes could cascade down the
> whole directory tree, seriously eroding your overall security.
>
> I'm sure you could write a VB6 app to do this; you'd probably need to
> "Declare" GetSecurityDescriptorDacl() and related Win32 APIs from Lib
> AdvAPI.dll. Or, it would probably be easier to do a
> ShellExecute(icacls.exe, <params>). But distributing a program like this
> is tantamount to distributing a virus, IMHO. It will weaken and possibly
> comprise the security of the users' systems.
>
> Anyway, if you want to experiment changing the root permissions, just
> modify the root the same as you would any other directory: either in
> Explorer, or via icacls.exe at the command line.
>
> Regards,
> --
> Andrew McLaren
> amclar (at) optusnet dot com dot au
>


--
---
Continued Success!

Brett Dix | Account Manager

OfferFusion, Inc
www.offerfusion.com

1530 140th ave ne ste-200
Bellevue WA 98005
d. 800.618.6838x711
f. 425.401.8808
c. 425.772.7942

 
Reply With Quote
 
Bill Armitage
Guest
Posts: n/a

 
      09-26-2007
Andrew, many thanks for your advice - I'll need to re-do a number of programs
and change the folder from 'root' to one of the ones you suggest. A very
helpful response - it is appreciated - Bill

"Andrew McLaren" wrote:

> "Bill Armitage" <> wrote ...
> >I have just installed VISTA Ultimate but programs that ran in Windows XP
> >fail
> > because I cant write files on the C:\ folder. How can I make the C:\
> > folder
> > accept files written to it? I want to do this once so that all my
> > programs
> > can run under VISTA.
> > Can I write a program in VB6 to automatically change the folder attributes
> > on the C:\ folder so that clients, who may install VISTA, won't have this
> > problem when I send them programs that need to write to the C:\ folder?

>
> Hi Bill,
>
> You can change the permissions to the root directory manually, using the ACL
> editor in Explorer (right-click C:\, choose Properties, then Security).
>
> However, the root directory in Vista is write-protected for a Very Good
> reason! Writing files to the root directory is a known and proven avenue
> for viruses, trojans and other exploits. By weakening the security on the
> root directory, you are increasing your clients' risk of infection.
>
> By far the better solution, would be to investigate the programs trying to
> write to the root, and see if you can configure them to write to some
> acceptable location, such as %TEMP% or %APPDATA%. Writing files to the root
> directory has been deprecated as a programming practice, for many years.
> Applications which do this are bad programs. There's a limit to how far the
> operating system needs accommodate these bad, insecure applications.
>
> For example, one of my customers had a legacy application (c.1996) built on
> top of the Borland Data Engine (BDE, aka Paradox Runtime). By default this
> created files in the root, and thus failed to run on Vista. However, a bit
> of tweaking in BDE Admin, changed the path from C:\ to C:\TEMP ... problem
> solved! This was by far a better solution.
>
> Amongst other things, if you're not extremely careful while changing
> permissions on the root directory, the changes could cascade down the whole
> directory tree, seriously eroding your overall security.
>
> I'm sure you could write a VB6 app to do this; you'd probably need to
> "Declare" GetSecurityDescriptorDacl() and related Win32 APIs from Lib
> AdvAPI.dll. Or, it would probably be easier to do a ShellExecute(icacls.exe,
> <params>). But distributing a program like this is tantamount to
> distributing a virus, IMHO. It will weaken and possibly comprise the
> security of the users' systems.
>
> Anyway, if you want to experiment changing the root permissions, just modify
> the root the same as you would any other directory: either in Explorer, or
> via icacls.exe at the command line.
>
> Regards,
> --
> Andrew McLaren
> amclar (at) optusnet dot com dot au
>
>

 
Reply With Quote
 
f/fgeorge
Guest
Posts: n/a

 
      09-26-2007
On Tue, 25 Sep 2007 23:46:05 -0700, Bill Armitage
<> wrote:

>Andrew, many thanks for your advice - I'll need to re-do a number of programs
>and change the folder from 'root' to one of the ones you suggest. A very
>helpful response - it is appreciated - Bill
>

Andrew's reasoning is why Mac's don't get viruses like Windows
machines do and why Vista is trying to change things around a bit.

>"Andrew McLaren" wrote:
>
>> "Bill Armitage" <> wrote ...
>> >I have just installed VISTA Ultimate but programs that ran in Windows XP
>> >fail
>> > because I cant write files on the C:\ folder. How can I make the C:\
>> > folder
>> > accept files written to it? I want to do this once so that all my
>> > programs
>> > can run under VISTA.
>> > Can I write a program in VB6 to automatically change the folder attributes
>> > on the C:\ folder so that clients, who may install VISTA, won't have this
>> > problem when I send them programs that need to write to the C:\ folder?

>>
>> Hi Bill,
>>
>> You can change the permissions to the root directory manually, using the ACL
>> editor in Explorer (right-click C:\, choose Properties, then Security).
>>
>> However, the root directory in Vista is write-protected for a Very Good
>> reason! Writing files to the root directory is a known and proven avenue
>> for viruses, trojans and other exploits. By weakening the security on the
>> root directory, you are increasing your clients' risk of infection.
>>
>> By far the better solution, would be to investigate the programs trying to
>> write to the root, and see if you can configure them to write to some
>> acceptable location, such as %TEMP% or %APPDATA%. Writing files to the root
>> directory has been deprecated as a programming practice, for many years.
>> Applications which do this are bad programs. There's a limit to how far the
>> operating system needs accommodate these bad, insecure applications.
>>
>> For example, one of my customers had a legacy application (c.1996) built on
>> top of the Borland Data Engine (BDE, aka Paradox Runtime). By default this
>> created files in the root, and thus failed to run on Vista. However, a bit
>> of tweaking in BDE Admin, changed the path from C:\ to C:\TEMP ... problem
>> solved! This was by far a better solution.
>>
>> Amongst other things, if you're not extremely careful while changing
>> permissions on the root directory, the changes could cascade down the whole
>> directory tree, seriously eroding your overall security.
>>
>> I'm sure you could write a VB6 app to do this; you'd probably need to
>> "Declare" GetSecurityDescriptorDacl() and related Win32 APIs from Lib
>> AdvAPI.dll. Or, it would probably be easier to do a ShellExecute(icacls.exe,
>> <params>). But distributing a program like this is tantamount to
>> distributing a virus, IMHO. It will weaken and possibly comprise the
>> security of the users' systems.
>>
>> Anyway, if you want to experiment changing the root permissions, just modify
>> the root the same as you would any other directory: either in Explorer, or
>> via icacls.exe at the command line.
>>
>> Regards,
>> --
>> Andrew McLaren
>> amclar (at) optusnet dot com dot au
>>
>>


 
Reply With Quote
 
Andrew McLaren
Guest
Posts: n/a

 
      09-26-2007
"Bill Armitage" <> wrote...
> Andrew, many thanks for your advice - I'll need to re-do a number of
> programs
> and change the folder from 'root' to one of the ones you suggest. A very
> helpful response - it is appreciated - Bill


Hi Bill,

I'm glad it was useful - especially as maybe not the answer you really
wanted :-)

BTW to investigate this and other issues which can arise for developers of
applicationas running on Vista, I highly recommend:

The Windows Vista Developer Story: Application Compatibility Cookbook
http://msdn2.microsoft.com/en-au/library/aa480152.aspx

There's a ton of fascinating info there for the programmer, about Vista's
inner workings.

Good luck with it,
--
Andrew McLaren
amclar (at) optusnet dot com dot au


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to an XP Folder Zach Windows Vista Networking 6 12-10-2007 12:17 AM
Over writing vista files Toshanco Windows Vista Installation 5 10-19-2007 02:36 AM
Vista Will Not Let Administrator Create Folder In Root of System Volume? Will Windows Vista Security 4 06-22-2007 01:02 PM
Second Try. Strange new named folders in Vista root folder. John Monahan Windows Vista General Discussion 7 05-26-2007 02:39 AM
Folder Issues when writing to an Ipod annoyedipodguy Windows Vista General Discussion 4 10-10-2006 02:22 PM



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