Page 1 of 1 1
Topic Options
#152846 - 2005-12-05 05:05 PM Hopefully simple problem
Jural Offline
Lurker

Registered: 2005-12-02
Posts: 1
My script was working fine friday. Now it says there is a missing ")". Can anyone find anythig wrong?

if ingroup(Intranet) and EXIST (%WINDIR%\Desktop\RMCINT~1.url) = 0
COPY "\\RSHDR\NETLOGON\RMCINTRA.ico" "%WINDIR%"
COPY "\\RSHDR\NETLOGON\INTRANET.url" "%WINDIR%\DESKTOP"
DEL "%WINDIR%\Desktop\RMCINT~1.lnk"
ENDIF


Thanks for the help.

Jural

Top
#152847 - 2005-12-05 05:09 PM Re: Hopefully simple problem
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What happens if you use proper quoting

if ingroup("Intranet") and EXIST ("%WINDIR%\Desktop\RMCINT~1.url") = 0
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#152848 - 2005-12-05 06:56 PM Re: Hopefully simple problem
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
As Howard says. You need the quotes around STRINGS and you should also reference the Domain name to reduce the time required to locate the group.

If InGroup("SomeDomain\MyGroup")
  ;Do something
EndIf
 

Top
#152849 - 2005-12-06 02:55 AM Re: Hopefully simple problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
maybe not.

but the quotes are must.
_________________________
!

download KiXnet

Top
#152850 - 2005-12-06 02:57 AM Re: Hopefully simple problem
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If they are a must, why did it work on friday?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152851 - 2005-12-06 03:22 AM Re: Hopefully simple problem
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well if you don't supply the Domain it typically will still find it, but it will take longer even if it is only milli-seconds. Same with batch etc.. .COM,.EXE,.BAT in that order are still located by a Windows system in that order when not specified.

KiXtart will lookup the data and find it, but if as an example you had 5 Domains (it could look in all 5 Domains for the group) but would be slower and would work on the first one found which typically would be from the Domain you logged onto, but not necessarilly the one you wanted.

Just saying. Specifying extensions, and prefacing when required will be quicker, not that it won't work. By being quicker we're not talking about speeds that are noticeable to the human eye.
 

Top
#152852 - 2005-12-06 02:29 PM Re: Hopefully simple problem
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Is this the complete script? Is there more that you may have edited or added since it worked? did you check for an unmatched quote somewhere above the problem.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#152853 - 2005-12-07 10:02 AM Re: Hopefully simple problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hoby, you don't think that missing quotes would render a script non-working?
_________________________
!

download KiXnet

Top
#152854 - 2005-12-07 02:37 PM Re: Hopefully simple problem
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Yes, I do, but he stated it worked previously and we know that KiX is forgiving at times. So I just wanted to be sure that some other issue other than what was posted was not the prime reason for the failure.
_________________________
Home page: http://www.kixhelp.com/hb/

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
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.071 seconds in which 0.043 seconds were spent on a total of 12 queries. Zlib compression enabled.

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