KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

shortcut only if programs exists

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
graesdal
KiXforms Novice
KiXforms Novice


Joined: 21 Jan 2008
Posts: 1

PostPosted: Mon Jan 21, 2008 11:10 am    Post subject: shortcut only if programs exists Reply with quote

is there a way to only make shortcut on a pc if the program exists the problem i have is that some of my machines run office 2003 and some run office 2007 i want to make shortcut on desktop for word and outlook
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Mon Jan 21, 2008 12:08 pm    Post subject: Reply with quote

Welcome to the kixforms forums ... allthough you've asked a kixtart question, I'll provide you with an answer Smile


depending on the checks you may take you can either use
Quote:


Exist( )

Action: Checks for the existence of one or more files.

Syntax: Exist ("file name")

Parameters: File name
Identifies the file(s) you want to locate.

Remarks: Supports wildcards.

Returns: 0
File not found

1
File found



Examples: IF EXIST (@LDRIVE + "\users.txt")
DISPLAY @LDRIVE + "\users.txt"
ENDIF

IF EXIST (@LDRIVE + "\*.INI")
; Etc, etc.
ENDIF



for a file check or

Quote:


KeyExist( )

Action: Checks for the existence of a registry subkey.

Syntax: KEYEXIST ("subkey")

Parameters: Subkey
Identifies the subkey you want to locate.

Remarks: KEYEXIST is a replacement to the EXISTKEY function found in previous versions of KiXtart. While functionally equivalent, the Return Codes are now inverted, resulting in behavior similar to the EXIST function.

Returns: 1
Subkey found

0
Subkey not found



See Also: AddKey( ), DelKey( ), DelTree( )

Example: $ReturnCode = KeyExist("HKEY_CURRENT_USER\Console\Configuration")
If $ReturnCode
? "Key exists...."
Endif



for checking the relevant registry keys before copying/creating shortcuts...


Future questions regarding KiXtart problems may be better answered on kixtart.org forums here: http://www.kixtart.org/forums/ubbthreads.php?ubb=cfrm

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group