Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating desktop shortcut via kix script 2

Status
Not open for further replies.

andrew12

IS-IT--Management
Jun 28, 2002
56
0
0
GB
hello,

I know this isn't strictly the right forum for this but I need to do the above...

I guess I would need to set the script up to modify the target PCs' registry and add a value in to whichever key deals with the all users desktop.

Unfortunately scripting is not my strong point. Can anyone help or point me in the direction of a decent scripting site...
 
I'd say stay away from kixStart and visit the VBSCript forum here at Tek-Tips.

Give some details of what you want to do and I can help you.

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
I'm with markdmac. Kix was good for nt and 98, but VBscript is the way to go with 2003, XP, and 2000 systems.
 
Thanks everyone - I'll look into those sites.
 
andrew12, don't you want to give the script a shot?

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
If all of your clients are Windows 2000 Pro/XP Pro, you could actually try the following from a batch file (.BAT) login script:
Code:
copy \\server\share\shortcutname.lnk "%allusersprofile%\desktop"
No need to mess with KiXtart or VBScript at all. The Registry has nothing to do with copying files to the desktop.

This assumes that you've already created the shortcut, and placed it in a publicly accessible share that everyone has read access to. Note that if the name of the shortcut has spaces in it, you will need to use quotes around the first part of the command too, i.e. "\\server\share\shortcutname.lnk
 
The only problem with the above is that is assumes that all the Win2K and XP machines will have the same file paths if the shortcut points to a file locally. An example of what I am talking about would be creating a shortcut to Calc.exe. If a Win2K box the path would be C:\Winnt\calc.exe and id a WinXP box it would be c:\Windows\calc.exe.

A script can determine these differences and tailor the shortcut to point to the right location.

Also, if using the above as a login script, it will always copy the shortcut. With a VBScript I would have it look to see if the file is already there and in so not create the shortcut again.

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
I was mainly going for quickness, not completeness :)

You are correct about the potential different paths.

For the existence of the file, you could do this:
Code:
if not exist "%allusersprofile%\desktop\shortcutname.lnk" copy \\server\share\shortcutname.lnk "%allusersprofile%\desktop"
And yes, I realize there is a lot more that can be done with VBScript or even KiXtart; this was just a quick solution to get the shortcut out quickly (if needed)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top