Bashmak
(Lurker)
2006-12-27 03:00 PM
Greets 1 problem with auto creating shortcuts...

I'm using Kixtart to bind networks drives to groups of users, can i also add auto creating of icon on desktop to group of users???

And please can you write script here, because i cant fully use syntaxis of kixtart yet...

I'l be in debt :o)


Mart
(KiX Supporter)
2006-12-27 03:08 PM
Re: Greets 1 problem with auto creating shortcuts...

This should work. You may need to change the app it points to unless you want to make a shortcut to notepad on the desktop.

You will need to paste the wshshortcut UDF in the script or call it from the script
wshShortcut() - v1.3 - Create File & Web Shortcuts


Code:
Break on

If InGroup("groupname")
	$rc=wshShortcut("Notepad","%systemroot%\system32\notepad.exe")
EndIf


Bashmak
(Lurker)
2006-12-27 03:34 PM
Re: Greets 1 problem with auto creating shortcuts...

Thank you very much, but i'm totaly noob if scripting, can you plz tell me what and where to paste from http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=84115 to make it work

also will it work with?:

IF INGROUP("DIALOG\Diasoft", "DIALOG\Diasoft_Admins") = 1
USE S: /DELETE
USE S: "\\server\diasoft"
ENDIF

with path name ("Notepad","S:\winnt\system32\notepad.exe")

and 1 more question, wount that script create multiple icons on each logon?


Mart
(KiX Supporter)
2006-12-27 04:32 PM
Re: Greets 1 problem with auto creating shortcuts...

Quote:

....
also will it work with?:

IF INGROUP("DIALOG\Diasoft", "DIALOG\Diasoft_Admins") = 1
USE S: /DELETE
USE S: "\\server\diasoft"
ENDIF

with path name ("Notepad","S:\winnt\system32\notepad.exe")
....


The first part creates drive mappings and has nothing to do with wshshortcut. It will work with all apps even if they are on network drives, external drives, CD/DVD's, etc... If the path to the app is the correct path it will work.

Quote:

....
and 1 more question, wount that script create multiple icons on each logon?
....

This will create an icon on the desktop for each user in the group you check on. It recreates the shortcut at each logon to be sure it point to the correct app and path.

This is an example of a script that recreates the shortcut on every logon when the user is in the specified group.
You should copy all the code from the first post into this script or into a separate file, save it somewhere (in the same folders as the script would be nice and add this call @scriptdir + "\wshshortcut.kix" to the script.

Code:
Break on

If InGroup("groupname")
	$rc=wshShortcut("Notepad","%systemroot%\system32\notepad.exe")
EndIf


[edit]
Removed the long line. Ripped out the entire UDF and put in an explanation. Thanx for pointing it out Benny
[/edit]


Sealeopard
(KiX Master)
2006-12-27 05:53 PM
Re: Greets 1 problem with auto creating shortcuts...

Please also read the FAQ on how to use UDFs.

Bashmak
(Lurker)
2006-12-28 09:00 AM
Re: Greets 1 problem with auto creating shortcuts...

Thank you all very much, personal /bow to Mart :o)

You've helped me very much! All works just perfectly :o)