New topic: shell problems
<http://forums.realsoftware.com/viewtopic.php?t=25813> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message DanSandbergUCONN Post subject: shell problemsPosted: Mon Dec 29, 2008 4:56 pm Joined: Fri Dec 21, 2007 9:50 am Posts: 115 Hi All - As some of you know I'm working on a graphical installer/uninstaller for a science-related software package. To uninstall the package I need to execute the following command where x a shell object, passwd is a string variable containing the password and c34b2 is the folder containing the program. : Code:x.execute "echo "+passwd+" | sudo -S /usr/bin/true ; sudo "+"rm -R /Applications/c34b2"+" ; sudo -K" Now when I execute this command by itself the folder is NOT removed. To troubleshoot the problem I did the following: Code:x.execute "echo "+passwd+" | sudo -S /usr/bin/true ; sudo "+"rm -R /Applications/c34b2"+" ; sudo -K" msgbox x.result The msgbox returns blank but this time the folder is erased! Shocked by this I tried again with something else in the message box, i.e. just a standard text message. It worked again! So now I convinced myself the previous failure was a fluke and I comment out the message box. Now it fails! So bottom line, it seems the only way the program successfully executes the command to erase the folder is by having a msgbox with ANYTHING in it directly following. What is going on here? Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
