Page 1 of 1 1
Topic Options
#187283 - 2008-04-25 12:00 AM Runs regardless?
cwhitmore Offline
Starting to like KiXtart

Registered: 2001-05-23
Posts: 102
Loc: Austin, Texas, USA
I'd like to limit the number of users who install this program, but even if they aren't part of the "IT" OU in Active Directory it still runs. What am I doing wrong? (InOU is a UDF I downloaded from InOU UDF )

 Code:
If InOU(IT)=1
  If Exist("C:\Program Files\Out'n About! For Outlook")
       Return
  Else
  Run '\\Oak2003\Publicdr\AI Download\OutnAbout\OutAboutClientSetup.exe /server Intake1'

       Return
 EndIf
EndIf


Edited by Allen (2008-04-25 12:13 AM)
Edit Reason: Added code tags

Top
#187284 - 2008-04-25 12:16 AM Re: Runs regardless? [Re: cwhitmore]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
You forgot quotes here...
If InOU("IT")=1

You might consider using Shell instead of Run. Shell waits until the exe finishes, where run goes on doing stuff while the exe is running.

What's the need for the returns, are you using Gosub elsewhere?


Top
#187309 - 2008-04-25 04:12 PM Re: Runs regardless? [Re: Allen]
cwhitmore Offline
Starting to like KiXtart

Registered: 2001-05-23
Posts: 102
Loc: Austin, Texas, USA
Thanks for the info. Here is what I ended up with:

If InOU("IT")=1
If Exist("C:\Program Files\Out'n About! For Outlook")
Else
Shell 'cmd /c "\\Oak2003\Publicdr\AI Download\OutnAbout\OutAboutClientSetup.exe" /server Intake1'
EndIf
EndIf

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 476 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.051 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