Page 2 of 4 <1234>
Topic Options
#176170 - 2007-05-10 09:14 AM Re: Problem!! [Re: roedie]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
ok. I want to try an another thing now.

i will put in the script that a user group is added in the security of the map with full controll. maybe that is the sollution to my problem.

does someone know what i have to put in my script to let that thing work :$?


Edited by roedie (2007-05-10 09:30 AM)

Top
#176171 - 2007-05-10 10:41 AM Re: Problem!! [Re: roedie]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
I'd send my pennies on doing this with runnas, and then 'encrypt' the scriptfile into a kx, if you still need to do this with a script.

check the InGroup in the kix ref-guide.

Second, even if you alter the security settings for that map, you still wanna kick off the adding of the dll, right?
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#176172 - 2007-05-10 10:49 AM Re: Problem!! [Re: Björn]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
after doing some talking with my boss i found out that the users have the rights to have full controll at the c:\program files\infostrait dir so i can make a new folder end put a dll file in it.

it's only at a couple of pc's where it goes wrong. (from the 10 pc i tested 2 didn't work)

so i want to add the user group "werknemers" with full controll to the folder.


Edited by roedie (2007-05-10 11:43 AM)

Top
#176173 - 2007-05-10 01:22 PM Re: Problem!! [Re: roedie]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
anyone ??????
Top
#176177 - 2007-05-10 04:30 PM Re: Problem!! [Re: roedie]
Adolfo Offline
Fresh Scripter
*****

Registered: 2007-01-25
Posts: 49
Loc: Cali, CO
Roedie

Keep present the Mart and Les recommendations.

Top
#176178 - 2007-05-10 04:31 PM Re: Problem!! [Re: roedie]
Adolfo Offline
Fresh Scripter
*****

Registered: 2007-01-25
Posts: 49
Loc: Cali, CO
Roedie

Keep present the Mart and Les recommendations.

Top
#176179 - 2007-05-10 04:56 PM Re: Problem!! [Re: roedie]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
I never changed the file or folder permissions using pure kix but you might take a look at xcacls.exe.

HOW TO: Use Xcacls.exe to modify NTFS permissions

Or you could use the just a few minutes ago posted code from: COM Scripting » NTFSPerms.... Finally!. Beware that this not a final release. Read the rest of the post before using the code.


Edited by Mart (2007-05-10 07:22 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176198 - 2007-05-11 09:17 AM Re: Problem!! [Re: Mart]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
Xcacls.exe is indeed a nice tool to use. but it does not work for me.. yet :p.

I will try some lines and i will let you know if it worked.

Top
#176199 - 2007-05-11 09:19 AM Re: Problem!! [Re: roedie]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
I got some working stuff with xcacls at home. Sadly I temporarily have no internet at home. I'll see if I can remember to bring it to work Monday.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176200 - 2007-05-11 09:21 AM Re: Problem!! [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
 Originally Posted By: Mart
So security is not an issue for your boss. Then you might as well make everyone admin.

If it has to be done in the logon script you are stuck with something like runas which is a huge security risk


Actually that idea isn't as bad as you think. Everyone could be made LOCAL admins. That way there is no real security issue and this can be done trough GPO. Also this poses not treat to network security.

Top
#176201 - 2007-05-11 09:39 AM Re: Problem!! [Re: Arend_]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
i have now this line:

shell "run xcacls "c:\program files\infostrait" /g "DOMAIN\Werknemers":f;f /E"

this command runs perfect in batch (without the shell & run command) but not yet in kix..

has anyone an idea to let it work?


Edited by roedie (2007-05-11 10:09 AM)

Top
#176205 - 2007-05-11 01:48 PM Re: Problem!! [Re: roedie]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
It is all about the quotes..

 Code:
shell "xcacls 'c:\program files\infostrait' /g 'Domain\Werknemers':f;f /E"


That and you have both shell and run in the command, just one or the other.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#176206 - 2007-05-11 02:28 PM Re: Problem!! [Re: Gargoyle]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
hm.. it's still not working.. i also tryd to run it with cmd.exe but then i get a message that there is an infalid flag files\infostrait.. but anyway.. i shall try some other things..
Top
#176207 - 2007-05-11 02:32 PM Re: Problem!! [Re: roedie]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
 Quote:

....
infalid flag files\infostrait..
....


That would be because of missing quotes. Because there are spaces in
the path you need to protect them by wrapping it in quotes.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176208 - 2007-05-11 02:35 PM Re: Problem!! [Re: Mart]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
its about this part of the code. 'c:\program files\infostrait'

the script sees c:\progam as a seperate part of the whole thing.

Top
#176209 - 2007-05-11 02:51 PM Re: Problem!! [Re: roedie]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Keep in mind that many "DOS" commands only work with double quotes! I've gotten into the habit of using single quotes for nearly all Kix strings, so embedding double quotes into commands are not an issue. Also - you should try this when building Shell or Run commands:
 Code:
$Cmd = 'xcacls "c:\program files\infostrait" /g "Domain\Werknemers":f;f /E'
'running: ' $Cmd ?
Shell $Cmd
@SERROR ?

I'd even comment out the shell command the first time - you should be able to copy the command from the screen and run it manually - successfully. If that's so - then you know the command will work from within the script.

Again, it's my "best practice" for any scripts I write - lets me confirm what's being run.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#176211 - 2007-05-11 03:04 PM Re: Problem!! [Re: Glenn Barnas]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
when i run your script Glenn i get this message

C:\kix>kix32.exe test4.kix
running: xcacls.exe "c:\program files\infostrait" /g "DOMAIN\Werknemers":f;f /E
The system cannot find the file specified.

Top
#176212 - 2007-05-11 03:09 PM Re: Problem!! [Re: roedie]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
This works.

 Code:
Break on

Shell 'xcacls.exe "c:\new folder" /E /G "domain\Group":F'
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176214 - 2007-05-11 03:26 PM Re: Problem!! [Re: Mart]
roedie Offline
Getting the hang of it

Registered: 2005-11-15
Posts: 52
Loc: balk friesland/holland
Mart the code that you gave i already tried but that one doesnt work nighter.

I will stop with it for today on monday i will continu this thing.

if anyone has an sollution please post it then i wil test is monday morning.

Roedie


Edited by roedie (2007-05-11 03:29 PM)

Top
#176215 - 2007-05-11 03:48 PM Re: Problem!! [Re: roedie]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Changed the folder to the folder you use and it works great.

 Code:
Break on

Shell 'xcacls.exe "c:\program files\infostrait" /E /G "domain\group":F'


The user running the code should also have permission on c:\program files. if not he/she cannot set permissions on sub folders. It does shout a bit when checking the permissions on the folder that they are not in the correct order. You will have to watch out for that.


Edited by Mart (2007-05-11 03:49 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 2 of 4 <1234>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.076 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org