#32210 - 2002-11-12 08:56 AM
Copy to Desktop
|
ladybird
Fresh Scripter
Registered: 2002-08-11
Posts: 19
|
I am trying to copy some shortcut which i created through ADDPROGRAMGROUP and synchronise to Desktop by creating same folder
Shell '%comspec% /c MD "%USERPROFILE%\Desktop\Application Folder"' Shell '%comspec% /c COPY "%USERPROFILE%\Start Menu\Programs\Application Folder\*.*" "%USERPROFILE%\Desktop\Application Folder\*.*"'
My questions: 1. Is there better way? 2. How can I change the folder icon to something else?
Thanks in advance
|
Top
|
|
|
|
#32213 - 2002-11-12 04:04 PM
Re: Copy to Desktop
|
ladybird
Fresh Scripter
Registered: 2002-08-11
Posts: 19
|
Correct me if i am wrong. I see all the link that you have given to me, it's creating shortcut one by one.
It means that i should create one line of code for each shortcut.
For my case, i just put my code at the bottom of my script, it will copy whatever shortcut which is created by ADDPROGRAMGROUP earlier.
Please advise me on this
Is there any disadvantage of using shell command?
Thanks
|
Top
|
|
|
|
#32215 - 2002-11-12 06:10 PM
Re: Copy to Desktop
|
ladybird
Fresh Scripter
Registered: 2002-08-11
Posts: 19
|
Alright, i am getting understand. Just another a few questions. I need to create the shortcut on the specific folder on desktop. That folder will contain all the shortcut.
I won't use shortcut() UDF, because it use another program (shortcut.exe). For wshshortcut(), I believe all workstation should install with WSH program. Am I right?
$desktop = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Desktop")copy "Yourshortcut.LNK" $desktop
This code is only for existing folder. I can't point to new specific folder e.g Application folder.
Softlink() UDF, it might work. I will test it. I am new in Kixtart, and not sure how to run by using UDF.
|
Top
|
|
|
|
#32217 - 2002-11-13 04:37 AM
Re: Copy to Desktop
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Well, if you aren't averse to using WSH you can give this a try to get your 'special folder' variables...
code:
$objWshShell = CreateObject("WScript.Shell") $sDesktop = $objWshShell.SpecialFolders("Desktop") $sDesktop ?
|
Top
|
|
|
|
#32218 - 2002-11-13 05:37 AM
Re: Copy to Desktop
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Here, I even turned it into a UDF for you... fnGetSpecialFolder()
|
Top
|
|
|
|
#32220 - 2002-11-15 02:52 AM
Re: Copy to Desktop
|
ladybird
Fresh Scripter
Registered: 2002-08-11
Posts: 19
|
I guess i found what i want. I just use showprogramgroup command.
It works. So, the user just refer to this program group for any shortcut rather on desktop.
Thanks all of you!!!
|
Top
|
|
|
|
#32221 - 2002-11-15 01:48 PM
Re: Copy to Desktop
|
ladybird
Fresh Scripter
Registered: 2002-08-11
Posts: 19
|
I thought it's successful.
I am using this code:
IF ShowProgramGroup("Application Folder", 5, 0) = 0 SHOWPROGRAMGROUP("Application Folder",6,0) ENDIF
The result is not consistent. How can I keep the window always active? [ 15. November 2002, 14:48: Message edited by: ladybird ]
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 248 anonymous users online.
|
|
|