|
#1
|
|||
|
|||
|
How to share the %AppFolder%
Dear All,
When the installation process with Administator right, how can I set the security %AppFolder%. So, after installing, log-in again (not Aministrator right), then can use %AppFolder%. Tks, LVD |
|
#2
|
||||
|
||||
|
For reliable control of security permissions I use XCACL.VBS (search Google) and install it as a PRIMER file into the %TEMPLAUNCHFOLDER%
Then I use something like this in the ON PRE-INSTALL to create the %APPFOLDER% first before SUF8 installs any files. By doing this the files inherit the rights of the folder. Note I have removed any error trapping which you need to insert to check things go well.. Code:
-- Make sure that XCACLS is in the Windows folder
result = File.Install(SessionVar.Expand("%TempLaunchFolder%\\XCACLS.vbs"), SessionVar.Expand("%WindowsFolder%\\XCACLS.VBS"), FILE_INSTALL_ALWAYS, false, false, nil, nil);
-- Set up the security on it so that the files inherit the same security.
File2Run = SessionVar.Expand("%SystemFolder%\\cscript.exe ")..SessionVar.Expand("%WindowsFolder%\\xcacls.vbs")
StatusDlg.Show()
StatusDlg.ShowProgressMeter(false)
StatusDlg.SetMessage("Creating folders and setting security...")
-- Now lets create the installation folder
Folder.Create(SessionVar.Expand("%AppFolder%"));
-- Set main folder to be read only for the security group USERS
Args2Run = SessionVar.Expand(" %AppFolder% /G USERS:X /E")
result = File.Run(File2Run..Args2Run, "","", SW_MINIMIZE, true);
-- And a subfolder that needs read/write access but don't allow deletion of the folder itself.
Folder.Create(SessionVar.Expand("%AppFolder%\\SubFolderName"));
-- Allow the SubFolderName folder files to be modifiable
Args2Run = SessionVar.Expand(" %AppFolder%\\XML /G USERS:B874321 /SPEC A /E")
Args2Run = SessionVar.Expand(" %AppFolder%\\SubFolderName /G USERS:BA987654321 /SPEC E /E")
result = File.Run(File2Run..Args2Run, "","", SW_MINIMIZE, true);
StatusDlg.Hide()
The reason I use File.Run(File2Run..Args2Run...) is a hang-up from SUF7 where passing command arguments often failed whereas running them as the complete command line worked every time. I have not tested whether this is fixed in SUF8 as my philosophy is not to change something that works. I have used this many times on both Windows Server and XP/Vista without any problems. Rgds John |
|
#3
|
|||
|
|||
|
Dear JXBURNS
Quote:
Tks, LVD |
|
#4
|
||||
|
||||
|
you should be aware that some virus scanners (and system policies) may block a visual basic script -- especially one that alters system security.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| share song and movies ? | saricnet | AutoPlay Media Studio 6.0 | 2 | 08-03-2007 08:28 AM |
| Some libraries to share | sside | AutoPlay Media Studio 5.0 | 0 | 06-10-2006 08:30 PM |
| Something to share.. | tengku | AutoPlay Media Studio 5.0 | 4 | 05-07-2005 12:14 PM |
| Something to share (File Finder) | sside | AutoPlay Media Studio 5.0 | 0 | 02-21-2005 01:47 PM |
| created a folder, but how do i share it? | Kon | Setup Factory 5.0 | 2 | 05-15-2001 06:23 AM |
All times are GMT -6. The time now is 11:15 PM.








Linear Mode

