| View previous topic :: View next topic |
| Author |
Message |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri May 14, 2004 5:46 am Post subject: How do I delete shortcuts from the Desktop? |
|
|
In olden days it was easy! Just delete the .pif file. In win98, win2000 and winXP, I cannot find a reliable method! Over many iterations of my programs I find there are many redundant shortcuts on the desktop that are no longer required and that confuse the user.
Anyone here any ideas?
Thanks in advance! _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
Protected Valued Contributor


Joined: 02 Jan 2001 Posts: 228 Location: Portugal
|
Posted: Fri May 14, 2004 7:34 am Post subject: |
|
|
| I thought windows shortcuts were files? .lnk files or something (even though windows won't ever show their extension). And the desktop is a folder in whatever:\windows\ for 98\me or whatever:\documents and settings\username\ (or 'All users') for XP (don't know about 2000, never used it). So you should be able to remove them with the file delete command... |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Fri May 14, 2004 9:42 am Post subject: |
|
|
i agree with protected...they are files that you can just delete from the appropriate folder if you want to remove them
serge _________________
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri May 14, 2004 10:08 am Post subject: |
|
|
Here's some code that can work.
Thanks to Dr. Dread for the path finding routine.
| Code: | title Link delete
gosub paths
# %%shortcut holds the value of the shortcut to delete
%%shortcut = "Internet Explorer.lnk"
# %%desktop holds the path to the desktop with out a trailing backslash
file delete,%%desktop"\"%%shortcut
info @file(%%desktop"\"%%shortcut)
exit
:Paths
# Paths routine from Dr. Dread
%%sourcepath = @path(%0)
%%WinDir = @windir()
%%WinSys = @windir(S)
REM Watch out! The following comes out with a trailing backslash
%%WinTemp = @windir(T)
%%ProgramFiles = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion,ProgramFilesDir)
%%CommonFiles = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion,CommonFilesDir)
%%StartMenu = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Start Menu)
%%Startup = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Startup)
%%ProgFolder = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Programs)
%%FontsFolder = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Fonts)
%%Favorites = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Favorites)
%%Desktop = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Desktop)
%%SendTo = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,SendTo)
%%MyDocs = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Personal)
%%AppData = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,AppData)
REM All Users Folders - NT/W2K/XP
%%All_Startup = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Common Startup)
%%All_AppData = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Common AppData)
%%All_Desktop = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Common Desktop)
%%All_Documents = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Common Documents)
%%All_Favorites = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Common Favorites)
%%All_Startmenu = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Common Start Menu)
%%All_ProgFolder = @REGREAD(LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Common Programs)
EXIT |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri May 14, 2004 10:33 am Post subject: |
|
|
Thanks FreezingFire, that looks like what I want! _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri May 14, 2004 10:35 am Post subject: |
|
|
No problem. Glad to help. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
|
|
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 can attach files in this forum You can download files in this forum
|
|