gcue Posted May 20, 2004 Share Posted May 20, 2004 (edited) im trying to delete a folder AND its contents within @UserProfileDir but it doesn't work--nothing gets deleted. i've tried several combinations but nothing works, any ideas? DirRemove(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5", 1) Any help would be greatly appreciated! Edited May 20, 2004 by gcue Link to comment Share on other sites More sharing options...
Valik Posted May 20, 2004 Share Posted May 20, 2004 It works for me, so are you sure the folder name is correct (I don't have Roxio installed so I changed to something I did have installed)? Also, you should be able to just use @ProgramsDir & "\folder". Link to comment Share on other sites More sharing options...
gcue Posted May 20, 2004 Author Share Posted May 20, 2004 yea its spelt exactly the same (copied pasted) cool hadnt noticed i could use @ProgramsDir anyway, tried this to and it didnt work.. DirRemove(@ProgramsDir & "\Roxio Easy CD Creator 5", 1) Link to comment Share on other sites More sharing options...
Valik Posted May 20, 2004 Share Posted May 20, 2004 Just to be sure, you aren't using any RunAsSet calls earlier in your script are you? Link to comment Share on other sites More sharing options...
gcue Posted May 20, 2004 Author Share Posted May 20, 2004 nope. i think the problem may be that my profile has a number attached to it. username.001 (we have problems with roaming profiles on our network) maybe i can try @userprofile.001 lol Link to comment Share on other sites More sharing options...
emmanuel Posted May 20, 2004 Share Posted May 20, 2004 nope.i think the problem may be that my profile has a number attached to it. username.001 (we have problems with roaming profiles on our network)maybe i can try @userprofile.001lolodd, but possible, why not try popping the @userprofile into a msgbox to see what's being returned? "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
gcue Posted May 20, 2004 Author Share Posted May 20, 2004 MsgBox("@UserProfileDir", "") ?? Link to comment Share on other sites More sharing options...
emmanuel Posted May 20, 2004 Share Posted May 20, 2004 (edited) oh fer crying out loud. rtfm, please. to be specific, see faq 9 Edited May 20, 2004 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
bshoenhair Posted May 20, 2004 Share Posted May 20, 2004 (edited) I always check for a known file in the dir then use If FileExists(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5\Known file.* ) Then Do DirRemove(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5", 1) Until 1 EndIf Edited May 20, 2004 by bshoenhair Link to comment Share on other sites More sharing options...
emmanuel Posted May 20, 2004 Share Posted May 20, 2004 I always useDo DirRemove(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5", 1)Until 1pardon me, I don't understand.(yes, it is taking all my strength to not be cruel and I understand sometimes we hit post before we mean it, or your grip on the english language may not be the best, I just don't understand what you mean... the example of msgbox you used has several things wrong with it that I are detailed both in the function reference for msgbox and faq 9 that if you're saying you always use the help file, it doesn't look like it... forgive me, that just came out.) "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
bshoenhair Posted May 20, 2004 Share Posted May 20, 2004 (edited) emmanuelthe example of msgbox you usedWhat are you talking about if you look at your quote there is no msgbox in it(yes, it is taking all my strength to not be cruel and I understand sometimes we hit post before we mean it, or your grip on the english language may not be the best,Don't get me started, seems you need to read alittle before making a post !!!The only MsgBox I see is four posts up by another user, whats up with that ?Maybe you need to get closer to the monitor like your avatar picture is, just kidding, lighten up buddy. Edited May 20, 2004 by bshoenhair Link to comment Share on other sites More sharing options...
emmanuel Posted May 20, 2004 Share Posted May 20, 2004 (edited) this is what I was talking about when I was refering to the faq and msgbox. MsgBox("@UserProfileDir", "") ??when I quoted:I always useDoDirRemove(@UserProfileDir & "\Start Menu\Programs\Roxio Easy CD Creator 5", 1)Until 1 that's all that was there.Don't get me started, seems you need to read alittle before making a post. you mean I should wait till you edit your post at least once before I reply? (just noticed as I'm writing this that you've edited the reply that I'm already replying to)lightening up:sigh. ok, I wasn't replying to bshoenhair when I wrote my rtfm comment, I was replying to gcue, as would make sense by it following directly after it the message with the msgbox line that needed some help... and yeah, I did slip-up and get confused, I read it as a conversation and took bshoenhair's "I always use..." as a natural continuation on what gcue had said, I apologize for not catching that...and just to clear anything else up, "fer crying out loud" is meant in good humor. oh fer crying out loud.edit to fix my messed up quote boxes Edited May 20, 2004 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
bshoenhair Posted May 20, 2004 Share Posted May 20, 2004 you mean I should wait till you edit your post at least once before I reply?No, what I was saying you should reply with proper content to the proper user. I knew that you made a mistake but I wanted to clarify it and clear my name. I make mistakes all the time and hopefuly there are not hard feelings against me pointing this out. Link to comment Share on other sites More sharing options...
emmanuel Posted May 20, 2004 Share Posted May 20, 2004 No, what I was saying you should reply with proper content to the proper user. I knew that you made a mistake but I wanted to clarify it and clear my name. I make mistakes all the time and hopefuly there are not hard feelings against me pointing this out.definately no hard feelings... it's always too easy to mis-understand with text only interaction... "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
Administrators Jon Posted May 20, 2004 Administrators Share Posted May 20, 2004 (edited) Are you sure the shortcuts are in the users start menu or are they in "All Users"? (in which case use @ProgramsCommonDir instead of @ProgramsDir) Something like this may help: MsgBox(0, "@ProgramsDir is currently:", @ProgramsDir) $result = DirRemove(@ProgramsDir & "\Roxio Easy CD Creator 5", 1) MsgBox(0, "Result of DirRemove operation was:", $result) Edited May 20, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now