forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Is it possible to change permissions on a folder?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Wed Apr 16, 2003 8:16 am    Post subject: Is it possible to change permissions on a folder? Reply with quote

I distribute a VDS 4.5 database application that requires administrative priviledges to be installed (using Inno Setup 3.0.6) on the server. After installation the data files are stored in a folder of the user's choice. All subsequent installations on workstations should also point to this folder on the server.

This data folder needs to have the permissions set to allow full access to all users. This is fairly trivial to do if you know how, but I am discovering that a lot of users out there do not!

Is there a way for VDS, or a DLL, to set permissions for a folder in an NT, or XP enviroment.

Thanks in advance

_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Wed Apr 16, 2003 2:00 pm    Post subject: Reply with quote

I've used a program thats either from the nt resource kit or that's included with NT/2000. It's called cacls.exe. The below code is a non working sample. Just change the varibles to what you need and it should add the current user to change permissions "%%username:C "and local administrators to full permissions "Administrators:F"

link to cacls useage: http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/winxppro/proddocs/cacls.asp

Code:

%%progpath = @shortname(@CURDIR()\cacls.exe
%%username = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon,DefaultUserName)
%%dirpath = directory you want to change permissions on

runh cmd /c echo y| @shortname(%%progpath) %%dirpath\%%username /G %%username:C Administrators:F,WAIT
   
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group