Indigo Rose Software
  #1  
Old 10-27-2008
levanduyet levanduyet is offline
Forum Member
 
Join Date: Oct 2008
Posts: 5
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
Reply With Quote
  #2  
Old 10-27-2008
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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()
When you have downloaded XCACLS note that the readme file does not contain all of the switches, Use XCACLS /? to get a full run-down of what is available via the script.

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
Reply With Quote
  #3  
Old 06-04-2009
levanduyet levanduyet is offline
Forum Member
 
Join Date: Oct 2008
Posts: 5
Dear JXBURNS
Quote:
Originally Posted by JXBURNS
-- Allow the SubFolderName folder files to be modifiable
Args2Run = SessionVar.Expand(" %AppFolder%\\XML /G USERS:B874321 /SPEC A /E")
Is this code correct?

Tks,

LVD
Reply With Quote
  #4  
Old 06-04-2009
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,900
you should be aware that some virus scanners (and system policies) may block a visual basic script -- especially one that alters system security.
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


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.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software