Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2006
    Posts
    4

    Newb with a Question...

    I'm new to using Setup Factory (And let me tell you, it's very easy to use and does anything I need it to). What I want to do:
    On a Post Uninstall, I want to check for a folder and a shortcut. If neither exist, I want to delete the folder.

    Code:
    if (not Folder.DoesExist("C:\\Documents and Settings\\All Users\\Start Menu\\My Apps\\AppsOne")) and (not File.DoesExist("C:\\Documents and Settings\\All Users\\Start Menu\\My Apps\\AppTwo.lnk")) then
    Folder.DeleteFolder("C:\\Documents and Settings\\All Users\\Start Menu\\My Apps\\", nil);
    end
    Where'd I screw up? Lol.

  2. #2
    Join Date
    Sep 2004
    Posts
    60
    It will probably work better if you use the actual delete folder command which is Folder.Delete

  3. #3
    Join Date
    Mar 2006
    Posts
    4
    Ooops! Well, in my script I have it correct, I just typed it wrong when I posted here.

    Anyone know why it's not working?

  4. #4
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    Hi there, probably missing the 'programs' folder in your path as below.

    Code:
    "C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\My Apps\\AppsOne"
    try this though and makes use of a builtin shell action aswell:

    Code:
    --set a lua variable for the shell.get folder action
    SMenuPgmCmn = Shell.GetFolder(SHF_STARTMENUPROGRAMS_COMMON); --full path to all users startmenu\\programs folder
    if (SMenuPgmCmn ~= "") then	
    	if (not Folder.DoesExist(SMenuPgmCmn.."\\My Apps\\AppsOne")) and (not File.DoesExist(SMenuPgmCmn.."\\My Apps\\AppTwo.lnk")) then
    		Folder.Delete(SMenuPgmCmn.."\\My Apps");
    	end
    end
    the above code makes the main path generic for any windoz system

    (if it still does not work then in theory both the conditions have not been met or there is a subfolder present)
    could also explore the folder.deletetree action (use caution with this one)

    hth
    Last edited by Eagle; 03-06-2006 at 02:37 PM.

  5. #5
    Join Date
    Mar 2006
    Posts
    4
    I can't believe I forgot \\Programs\\...

    It works now.

  6. #6
    Join Date
    Mar 2006
    Posts
    4
    Well, I have another problem/question (I'm sure it's another case of idiocy on my part).

    I'm adding a registry key and want the data for "Path" to change depending on where the user decided to install the software. How would I code it? I have tried several times but the end result is never correct.

    Code:
    Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\App.exe", "Path", "C:\\Program Files\\My App", REG_SZ);

  7. #7
    Join Date
    Dec 2006
    Posts
    4
    Search the help files for %AppFolder%
    I think that will help.

Similar Threads

  1. Dumb Newb Question - File Attachments
    By jimriley in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 06-04-2005, 03:30 PM
  2. question about sound mp3
    By Rapido78840 in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 10-10-2003, 11:19 AM
  3. NEWB Question #2
    By RobertB in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 04-15-2003, 12:50 PM
  4. Need Assistance with Random Question Quiz
    By marc3515 in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 02-16-2003, 06:25 AM
  5. ** Question for all AutoPlay Menu Studio Users **
    By Ted in forum AutoPlay Menu Studio 3.0
    Replies: 4
    Last Post: 10-09-2000, 09:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts