Page 1 of 1 1
Topic Options
#176719 - 2007-06-04 01:41 PM Another noob that needs help :-)
DyingPhoenix Offline
Fresh Scripter

Registered: 2007-05-30
Posts: 11
Haven't found anything on seach here, neither in the documentation; or maybe I am just blind :-) Is there any chance to call a batch file out of a kix script?
Top
#176720 - 2007-06-04 01:50 PM Re: Another noob that needs help :-) [Re: DyingPhoenix]
Mart Moderator Offline
KiX Supporter
*****

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

Have a look at Shell, Call and/or Run.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176721 - 2007-06-04 01:54 PM Re: Another noob that needs help :-) [Re: Mart]
DyingPhoenix Offline
Fresh Scripter

Registered: 2007-05-30
Posts: 11
Thanks, couldn't find call in the docs, but shell does what I want.
One more: any chance to get the hostname of the workstation?

Top
#176722 - 2007-06-04 02:05 PM Re: Another noob that needs help :-) [Re: DyingPhoenix]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Sure. Have a look at @wksta. There are more macro's to get info from a workstation. Have a look at page 115 and up in the 4.53 manual.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176723 - 2007-06-04 02:06 PM Re: Another noob that needs help :-) [Re: Mart]
DyingPhoenix Offline
Fresh Scripter

Registered: 2007-05-30
Posts: 11
Thanks :-)
Top
#176737 - 2007-06-05 08:59 AM Re: Another noob that needs help :-) [Re: DyingPhoenix]
DyingPhoenix Offline
Fresh Scripter

Registered: 2007-05-30
Posts: 11
One more problem I got...
I tested for groups to map different network drives.. single group testing works fine, but multiple does not.. don't know why.

 Code:
If (InGroup("51-Jugendamt-Lernen") OR InGroup("51-Jugendamt FB-510") OR InGroup("51-Jugendamt FB-511") OR InGroup("51-Jugendamt FB-512") OR InGroup("51-Jugendamt FB513") OR InGroup("51-Jugendamt FB-Leit"))
		USE G: /DELETE
		USE G: "\\server\share"
	else
		USE G: /DELETE
		USE G: "\\server\otherShare"
	endif 


Any ideas? Sorry if that maybe is a silly questions (like most of mine are atm)

Top
#176740 - 2007-06-05 09:36 AM Re: Another noob that needs help :-) [Re: DyingPhoenix]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
You have an extra unneeded ) at the end of the first line.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176742 - 2007-06-05 09:52 AM Re: Another noob that needs help :-) [Re: Mart]
DyingPhoenix Offline
Fresh Scripter

Registered: 2007-05-30
Posts: 11
Not really. I put that whole if-clause in brackets.. no need for them?
Top
#176743 - 2007-06-05 09:55 AM Re: Another noob that needs help :-) [Re: DyingPhoenix]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
Try this
 Code:
If InGroup("51-Jugendamt-Lernen") OR InGroup("51-Jugendamt FB-510") OR InGroup("51-Jugendamt FB-511") OR InGroup("51-Jugendamt FB-512") OR InGroup("51-Jugendamt FB513") OR InGroup("51-Jugendamt FB-Leit")
  Use G: /DELETE
  Use G: "\\server\share"
Else
  Use G: /DELETE
  Use G: "\\server\otherShare"
EndIf 

Top
#176754 - 2007-06-05 01:41 PM Re: Another noob that needs help :-) [Re: DyingPhoenix]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Try this:
 Code:
If InGroup("51-Jugendamt-Lernen", "51-Jugendamt FB-510", "51-Jugendamt FB-511", "51-Jugendamt FB-512", "51-Jugendamt FB513", "51-Jugendamt FB-Leit")
		USE G: /DELETE
		USE G: "\\server\share"
	else
		USE G: /DELETE
		USE G: "\\server\otherShare"
	endif 


Simplifies the test, as InGroup accepts a single group, list of groups, or a 1-dimension array of groups as an argument. The default is "or" - membership in any one group, but an optional arg < InGroup(list, 1) > changes it to "and" - membership in all listed groups.

BTW - you might want to D/L the login script from my web site - it handles all kinds of group and OU membership tests (including complex constructs like - member of group a AND group b, but Not group c), and has cool features like path-rewriting. I've used it at dozens of clients without any code changes, and first deployed the core code in 1997 (so its well tested). It uses an INI file for configuration, and even supports user-specific config files (great for testing).

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

Top
#176755 - 2007-06-05 01:42 PM Re: Another noob that needs help :-) [Re: Glenn Barnas]
DyingPhoenix Offline
Fresh Scripter

Registered: 2007-05-30
Posts: 11
Thanks for the help :-)
Top
#176757 - 2007-06-05 02:18 PM Re: Another noob that needs help :-) [Re: DyingPhoenix]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
 Originally Posted By: DyingPhoenix
Not really. I put that whole if-clause in brackets.. no need for them?


A bit late but nope there is no need to put the entire if statement between brackets.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#176770 - 2007-06-05 03:46 PM Re: Another noob that needs help :-) [Re: Mart]
DyingPhoenix Offline
Fresh Scripter

Registered: 2007-05-30
Posts: 11
OK I'll keep that in mind :-)
Top
Page 1 of 1 1


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.065 seconds in which 0.023 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