Sign in to follow this  
Followers 0
willwatters

Check a desktop icon exits

5 posts in this topic

I want to check if an icon exists on desktop and if not i will send an error message and exit the code. The desktop icon is called CLMS.

What is the code for this please?

Share this post


Link to post
Share on other sites



is the icon a shortcut?

$details = FileGetShortcut(@DesktopDir & "\Shortcut Test.lnk")

MsgBox(0, "Path:", $details[0])

6)


NEWHeader1.png

Share this post


Link to post
Share on other sites

What i'm trying to do is test if a shortcut icon does not exist on a desktop then i will log an error to file. I changed the CLMS icon to a different name. what is the code to check if the CLMS icon does not exist and if so I can log an error. I tried the above code, but it fails to run with an error message as the CLMS icon does not exist.

what is the code for this please

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

this is the format

$location = **put the location here**

If Not FileExists($location) then

_FileWriteLog("C:\Text.log", "Menu Setup incomplete")

exit

endif

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

this is the format

$location = **put the location here**

If Not FileExists($location) then

_FileWriteLog("C:\Text.log", "Menu Setup incomplete")

exit

endif

8)

<{POST_SNAPBACK}>

Don't Forget to put this at the top of the script.

#Include<File.au3>

Also if the file is a shortcut on the desktop called CLMS then.

$Location=@DesktopDir & "\CLMS.lnk"

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0