forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How do I delete shortcuts from the Desktop?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Fri May 14, 2004 5:46 am    Post subject: How do I delete shortcuts from the Desktop? Reply with quote

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
View user's profile Send private message Send e-mail
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Fri May 14, 2004 7:34 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Fri May 14, 2004 9:42 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri May 14, 2004 10:08 am    Post subject: Reply with quote

Here's some code that can work. Smile
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
View user's profile Send private message Visit poster's website
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Fri May 14, 2004 10:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri May 14, 2004 10:35 am    Post subject: Reply with quote

No problem. Smile Glad to help.
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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 can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group