Is there a reason you aren't doing the Directory Share in the 'normal' manner with User rights, etc. set by a Network Administrator at the domain level?
And to set permissions you can use cacls on XP and xcacls for Vista or higher. You have to dig a bit into user names to SID conversion etc. and know your system.
In he end it might be easier to set this up manually by a network administrator. Folders can be set to let their permissions be inherited by new subfolders, actually it's the default, so normal folder/file creation of your application into such a prepared folder would be sufficient. There is no need to set permissions at runtime, just have folders already having the wanted permissions to store files for such users. And manage this on windows account groups, not single windows accounts.
Setup one tablet, use Acronis or other Imaging Software (Ghost, Partition Magic, whatever) and copy the final image on further tablets. That would be my idea. That unbinds you from redoing anything, neither manual nor via scripts. That's the best practice today.
The reason I ask why the 'share' would not be set up by the Network Admin is that this is done Once and only once - not needing to be done time and time again when an Application runs.
As to adding User's to the Share Rights - that also only needs to be done a single time as new users are added - again not needing to run time and time again when an Application runs.
Since the Domain users will have to be added by the Network Admin anyway so that they will have ANY login access, they can be made part of a Domain User Group at that time and, as part of the Group, they would 'inherit' the Group's rights to the shared directory at that time as well.
I have developed a deploy tool. The master copy of the tablet program resides on the server.
When the deploy tool is run on the tablet, it will detect if a copy of the program resides on the tablet.
If not, it will copy all the required files from the server to the tablet.
It creates the database on the tablet, and creates the tables and indexes
Creates required directories as well
If the deploy runs and there is a copy of the program on the server, it starts in "update mode"
It will compare the databases and update any field changes, re-index the tables, update files including the main exe
I would like this tool to set specific sharing and permissions on folders created.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.