|
-
Mar 20th, 2003, 07:48 AM
#1
Thread Starter
Retired VBF Adm1nistrator
Can I always write to the windows system directory ?
My application uses a number of DLLs that I have packaged with it.
But for ease of deployment I have included the .dlls into the .exe, and at runtime if the system doesn't have the .dlls it extracts them to the windows system directory.
But is there any situation in which I would not be able to write to the system directory ?
I personally can't think of one, but I thought I'd ask just in case...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 20th, 2003, 07:53 AM
#2
Well, the odds of the system admin restricting file i/o access are pretty slim (if its even possible), but that is all I can think of.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Mar 20th, 2003, 07:56 AM
#3
Thread Starter
Retired VBF Adm1nistrator
Yeah that's what I was thinking of...
I suppose in situations like that, they'd already be expecting most apps to fall flat on their faces.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 20th, 2003, 07:59 AM
#4
Banned
Actually, I have a reason that you cannot. We are working on deploying a program right now for the military. Many people on government machines do not have full admin rights. For whatever reason, certain downloads cannot occur, and changing the system files. This is a problem that we are having to work out. On many machines we are installing this program for testing, we are getting the following error.
"Cannot update system file 'C\WINNT\system32\xceedzip.dll'. You do not have permission to update system files on this machine."
Yes you can always have an administrator do it for you, but we are trying to have it so each user can just do it themself. Hope this helps you out some.
-
Mar 20th, 2003, 08:01 AM
#5
I believe the default permissions on the system directory (system32) on NT based OS's is read and execute for normal users, full control for administrators and Modify (or change) for power users.
Normal users cannot write anything to the system directory (so they need an admin to install a program, just like most admins would like).
If you also need to register a dll, a normal user couldn't do that, because a normal user does not have write permission on HKEY_CLASSES_ROOT.
Your approach would restrict the program to be used by power users and administrators only.
-
Mar 20th, 2003, 08:05 AM
#6
Thread Starter
Retired VBF Adm1nistrator
Well I don't need to update any files or register any files.
If the file isn't present in that folder, then the file should be created.
That, in italics, is the logic behind what I need to do.
That should be okay shouldn't it ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 20th, 2003, 08:09 AM
#7
Banned
Originally posted by plenderj
Well I don't need to update any files or register any files.
If the file isn't present in that folder, then the file should be created.
That, in italics, is the logic behind what I need to do.
That should be okay shouldn't it ?
I would say yes. Problems with this are more common on government machines. Some people have permissions to do everything, and others aren't even able to turn off their machines without an admin password. I don't think though that there would be a problem creating the files.
-
Mar 20th, 2003, 08:11 AM
#8
Originally posted by plenderj
That should be okay shouldn't it ?
No!!!
With only read and execute permissions the user can change nothing in this folder. They can NOT create files, they can not modify files. They can do nothing that changes anything in the folder.
They can only read files, and execute files (if the file is executable: exe's, dll's ocx's etc).
-
Mar 20th, 2003, 08:12 AM
#9
Thread Starter
Retired VBF Adm1nistrator
Okay assuming its not a military or government machine with restricted rights, there shouldn't be too many problems?
Basically this is just a failsafe if the admin has not followed the instructions and deployed the app correctly...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 20th, 2003, 08:26 AM
#10
-
Mar 20th, 2003, 11:03 AM
#11
Lively Member
Frans is correct - the default for 2k and XP is to exclude normal users from being able to create/write to the WINNT folder. It also keeps them from updating the registries. If you want them to be able to do these things - rights will need to be granted.
Just working the help desk - we have had lots of trouble with non-government machines where tech departments actually create non-admin users. Disables the users .ini file and other troubles - we end up having to redirect those files to some directory where users do have access. I know that they do not have access to the HKEY_Local_Machine branch - but I would assume that they can get to HKEY_Local_User (we don't use that much yet).
I have seen some corporate users that cannot even see their Windows/WINNT folder. As the lockdown continues, it can only get worse.
-
Dec 2nd, 2005, 09:39 PM
#12
Member
Re: Can I always write to the windows system directory ?
What about \WINDOWS directory (not \WINDOWS\SYSTEM32 ) ?
Could any user (not admin) write or modify a file there (for example a text file)?
Last edited by myn01; Dec 3rd, 2005 at 04:34 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|