Jump to content
Sign in to follow this  
HockeyFan

Windows Variable's

Recommended Posts

HockeyFan

:) How do I use Windows XP variables within a script.

For example...If I wanted to see if a file existed on any logged on user's desktop.

IF FileExists("C:\Documents and Settings\%USERNAME%\Desktop\'Any icon.ico'") Then

Share this post


Link to post
Share on other sites
MHz

You can use Macro's for general use.

IF FileExists(@DesktopDir & "\Any icon.ico") Then

Edit:

Removed extra quotes from line of code.

Edited by MHz

Share this post


Link to post
Share on other sites
HockeyFan

You can use Macro's for general use.

IF FileExists(@DesktopDir & "\'Any icon.ico'") Then
COOL! I'm not familiar with a lot of the macros...like @DesktopDir. I'll check them out.

Thanks, :)

Share this post


Link to post
Share on other sites
seandisanti

You can use Macro's for general use.

IF FileExists(@DesktopDir & "\'Any icon.ico'") Then
yes, macros are definitely the way to go, you could just use @DesktopDir for that path.

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  

×