Page 1 of 1 1
Topic Options
#174309 - 2007-02-27 01:11 PM check for file then delete
Kratos31 Offline
Lurker

Registered: 2007-02-27
Posts: 4
IF EXIST ("C:\Documents and Settings\All Users\Start Menu\Programs\Startup\program neighbourhood agent.lnk")
DEL "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\program neighbourhood agent.lnk"
ELSE
ENDIF

EXIT

thought this would be easy, sure its a simple fix, any help would be appreciated.

thanks

Top
#174310 - 2007-02-27 01:13 PM Re: check for file then delete [Re: Kratos31]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Users do not have the rights to mess with the "all users" folder
_________________________
Today is the tomorrow you worried about yesterday.

Top
#174311 - 2007-02-27 01:17 PM Re: check for file then delete [Re: Gargoyle]
Kratos31 Offline
Lurker

Registered: 2007-02-27
Posts: 4
even if they are an admin??
Top
#174312 - 2007-02-27 01:24 PM Re: check for file then delete [Re: Kratos31]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Have you debugged it to see if it is finding the file?

 Code:
IF EXIST ("C:\Documents and Settings\All Users\Start Menu\Programs\Startup\program neighbourhood agent.lnk")
"File Found"?
DEL "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\program neighbourhood agent.lnk"
"Delete results are :"@Serror?
ELSE
"File not found"?
ENDIF



Edited by Gargoyle (2007-02-27 01:25 PM)
_________________________
Today is the tomorrow you worried about yesterday.

Top
#174313 - 2007-02-27 01:35 PM Re: check for file then delete [Re: Gargoyle]
Kratos31 Offline
Lurker

Registered: 2007-02-27
Posts: 4
no output to screen with that i'm afraid, the script just runs and dissappears.
Top
#174314 - 2007-02-27 02:05 PM Re: check for file then delete [Re: Kratos31]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Are you launching from a CMD window? From a login? WKIX32 or KIX32

Launch with the debug option [/d] so that you can step through it...

c:\scripts\kix32 text.kix /d
_________________________
Today is the tomorrow you worried about yesterday.

Top
#174315 - 2007-02-27 02:37 PM Re: check for file then delete [Re: Gargoyle]
Kratos31 Offline
Lurker

Registered: 2007-02-27
Posts: 4
great thanks for that, as you can tell not done much Kix before.

Wasnt finding the file, i have spelt neighborhood incorrectly.

thanks for your help.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.057 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org