![]() |
| |||||||
| Notices |
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| My VB6 program is installed by setup created in InstallShield 12. Before Vista everything was working fine. On Vista one of the operations (replace file located in c:\program files\my program with another file) fails - my research showed me than there is an error 70, 'Access denied' After I set manually Full Control to Users of that machine everything works fine. Any advice how to set Full Control to Users programmatically from VB6 or from InstallShield project. Thank you Vovan | Guest
Posts: n/a
|
|
| | #2 (permalink) | |
| I guess you need to change the design. Do not use c:\program files folder. "vovan" <someone@vovan.com> wrote in message news:eIggYsLTHHA.5060@TK2MSFTNGP06.phx.gbl... Quote:
| Guest
Posts: n/a
| |
|
| | #3 (permalink) | ||
| Most programs (at least before Vista) use this design. There should be some other solution not related to change the design, I hope. Thanks Vovan "Jack" <replyto@it> wrote in message news:u7h0CiMTHHA.3592@TK2MSFTNGP03.phx.gbl... Quote:
| Guest
Posts: n/a
| ||
|
| | #4 (permalink) |
| Two things you are doing wrong here: 1) Your program can only modify Program Files during install time, from a Windows Service, a privileged scheduled task, of if your program prompts the user for administrator permission. If this is part of the "setup" process for your app, it needs to be implemented as a custom action in the setup program (marked as do not impersonate). Otherwise, as Jack suggested, there is probably a better way to do what you need to do. In Windows Vista, only programs that ask the user for admin permission can perform administrative tasks, such as modifying files in Program Files. Programs that do not have admin permission can only save files to the personal folders associated with the user (such as their documents folder), or folders set aside by the system for application storage. 2) DO NOT CHANGE SECURITY SETTINGS ON SYSTEM FILES PROGRAMATICALLY. *EVER*. ![]() -- - JB Microsoft MVP - Windows Shell/User Windows Vista Support Faq http://www.jimmah.com/vista/ | Guest
Posts: n/a
|
|
| | #5 (permalink) | |
| I need a full control for Users on "C:\Program Files\My Program" folder. I had it for more than 10 years with no problem (before Vista). What's wrong with my wish now? It looks like you lived your live with 2 legs, you drove many cars. Now somebody created a new kind of car requirening you to have 3 legs. And they say that it's much better for you not allowing you to have any choice. They are going to replace all existing models with new ones. I found some way (using Windows script) to give Users full control on "C:\Program Files\My Program", not on entire "C:\Program Files\". Just on my folder. It looks like adjustment will take much less time than full redesign. What is wrong with this approach? Thank you Vovan "vovan" <someone@vovan.com> wrote in message news:eIggYsLTHHA.5060@TK2MSFTNGP06.phx.gbl... Quote:
| Guest
Posts: n/a
| |
|
| | #6 (permalink) | ||
| It destroys the built-in security provided by Windows. Changing this security setting allows ANY PROGRAM ran by ANY USER to modify your program's files. This is unacceptable - Program Files is only to be modified by administrators. If you want to do this on your computer - hey, that's your choice, go right ahead. But you CANNOT make this choice for the users of your program - you will weaken the security of their system, without their consent, as a result of your actions. You must follow the programming guidelines enforced by Microsoft on behalf of all the users of their operating system. -- - JB Microsoft MVP - Windows Shell/User Windows Vista Support Faq http://www.jimmah.com/vista/ "vovan" <someone@vovan.com> wrote in message news:ubfrk6STHHA.1552@TK2MSFTNGP05.phx.gbl... Quote:
| Guest
Posts: n/a
| ||
|
| | #7 (permalink) | ||
| Quote:
Quote:
How do you achieve that? (My best idea for a solution so far is a note saying something like: "If you have the misfortune to be using Windows Vista, and you want to use this software, then you will need to give yourself permission to fully use your PC." ![]() | Guest
Posts: n/a
| ||
|
| | #8 (permalink) | |||
| I created a function: Public Function SetUsersPermission(strFolder As String) As Integer 'Call this function when a new folder is created in Coordinator Folder 'to give a Full Access to Users Dim objShell As Object Dim intRunError As Integer On Error Resume Next intRunError = 1 'in case of error that value will be returned Set objShell = CreateObject("Wscript.Shell") 'objShell.Run returns 0 if success intRunError = objShell.Run("cmd /c cacls " & strFolder & " /e /g Users:F", 0) SetUsersPermission = intRunError End Function I call it every time I'm creating a new folder which is going to be accessed by my program to save there some file. Vovan "mayayana" <mayayana1a@mindspring.com> wrote in message news:Zzmzh.22883$w91.11915@newsread1.news.pas.eart hlink.net... Quote:
| Guest
Posts: n/a
| |||
|
| | #9 (permalink) | ||||
| Why would you want to risk doing this? What will happen when some user finds out you modified their system needlessly and lowered their security. It is their computer not yours. Are you so arrogant that you think your program can do whatever it wants to someone else's computer or are you just too lazy to lean how to do things properly? You will potentially alienate your customers at best and possibly set yourself up for a lawsuit at worst. Vista is here. Learn to program for it. -- Kerry Brown Microsoft MVP - Shell/User http://www.vistahelp.ca "vovan" <someone@vovan.com> wrote in message news:e1oiMzTTHHA.4404@TK2MSFTNGP03.phx.gbl... Quote:
| Guest
Posts: n/a
| ||||
|
| | #10 (permalink) | |||
| I'm doing it for the folder with my program. What is wrong with this? I said I do not give permission to the entire Program Files folder. What is the difference if I move my program to different location and will allow to access its folders there? What about a lawsuit for such companies like Adobe with their Photoshop, which stores temp files in its folder. I did not test it on Vista yet, but I think there might be some problems with permission too. I'm looking for the fastest way to adopt my program to Vista for now. Later I will think about the need to redisign it. Now my clients are going to by new machines with Vista. I tested my program on it and many features do not work. So, what is the best way from your point of view to give them the ability to use my program on Vista. Ask them to wait until I redesign everything? I also woud ask if there is anybody else as stupid as me who did not have any problem with security before, but with Vista has them. Or it's just me? Everybody else knew all the time that it's a bad idea to install his (her ) program in Program Files folder. Everybody always knew that it's a bad idea to store temporary files in its program folder. Everybody always knew that Microsoft is going to change their security phylosophy. Only I did not know anything. Thank you Vovan "Kerry Brown" <kerry@kdbNOSPAMsys-tems.c*a*m> wrote in message news:uJ1SLPUTHHA.4260@TK2MSFTNGP06.phx.gbl... Quote:
| Guest
Posts: n/a
| |||
|
![]() |
| Tags |
| None |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sharing folder on desktop shares 'c:\users' everybody full access? | Mr.Nobody | Windows Vista Networking & Sharing | 2 | 04-05-2008 01:17 AM |
| Full Control to Users programmatically | vovan | Windows Vista Networking & Sharing | 55 | 05-25-2007 07:54 PM |
| Sharing folder on desktop shares c:\users for everybody (full acce | Mr.Nobody | Windows Vista Networking & Sharing | 4 | 09-25-2006 07:33 PM |
| How get Full Access Control Files for Pemissions files? | kcv12110 | Windows Vista Administration | 3 | 06-26-2006 12:47 AM |
| Including Full Control Panel | Windows XP Embedded | 4 | 10-24-2003 07:32 PM | |