Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

IWshShortcut fails
Hi,

I have a problem using IWshShortcut which just seems to affect Windows
2000??

Im creating shortcuts on the desktop as follows:

Dim oShell As New IWshRuntimeLibrary.IWshShell_Class
Dim oShortcut As New IWshRuntimeLibrary.IWshShortcut_Class
'
ShortcutName = "MY Shortcut"
Set oShortcut = oShell.CreateShortCut(DestinationDirectory & "\" &
ShortcutName & ".lnk"
'
With oShortcut
.WindowStyle = 1
.TargetPath = cTargetFile
.Description = cShortcutName
.Arguments = cArguments
.WorkingDirectory = cStart
.Save
End With

Now this works perfectly under Windows XP but falls over on Windows 2000 at
.Save.  Ive checked that all the values are correct and the shortcut is
valid so don;t understand why it doesn't work?

Anyone any ideas as to why this maybe??

Cheers
d



Report this thread to moderator Post Follow-up to this message
Old Post
DooM³d
04-29-05 08:55 PM


Re: IWshShortcut fails
hi Doomed,

You might also try posting this on:

news://microsoft.public.scripting.wsh

cheers, jw

Report this thread to moderator Post Follow-up to this message
Old Post
mr_unreliable
04-29-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:30 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.