?
Solved

Login script

Posted on 2006-07-03
1
Medium Priority
?
194 Views
Last Modified: 2010-04-17
I would like to send add the following to a bat script but it doesn't work

del C:\Documents and Settings\%username%\desktop\epf.lnk
0
Comment
Question by:cogit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 38

Accepted Solution

by:
Shift-3 earned 2000 total points
ID: 17032579
For one thing you've got to have quotes around the path if it's got spaces in it.  It also might be easier to use the %userprofile% variable instead of C:\Documents and Settings\%username%.  I'd write the command like this instead:

if exist "%userprofile%\desktop\epf.lnk" del "%userprofile%\desktop\epf.lnk"
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Progress

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question