I am creating an uninstall app for my install wizard and almost done. I have run into a problem however. I am able to delete the shortcuts placed in the start menu leaving my start menu folder empty however my remove directory will not work. The code i am using is
    Invoke SHGetSpecialFolderPath, NULL, addr StartMBuff, CSIDL_STARTMENU, 0
    Invoke lstrcat, addr StartMBuff, addr ProgFolder
    Invoke lstrcat, addr StartMBuff, addr StartPathBuff
    Invoke lstrcpy, ADDR Buffer, ADDR StartMBuff
    Invoke lstrcat, addr Buffer, addr szUninstlnk
    Invoke DeleteFile, addr Buffer
    Invoke lstrcpy, ADDR Buffer, ADDR StartMBuff
    Invoke lstrcat, addr Buffer, addr IconPath
    Invoke DeleteFile, addr Buffer
    Invoke RemoveDirectory, addr StartMBuff
Anyone removed folders from the start menu in vista without taking away from it working in previous OS's? If i use removedirectory and place the path to the folder it will remove it. The problem is vista using a roaming profile setup and the path you get from SHGetSpecialFolderPath is that of the roaming folder. The thing i dont understand is why it will work to remove the .lnk files but not remove the diretory.
i take it no one has an idea?
I don't run Vista so I don't have a way of testing the problem but vaguely I remember that Vista controls all of the directories that are defined as system based so it may not allow you to delete the directory if its in a tree that starts as a system defined directory.
i think you are correct as GetLastError is telling me Access is Denied.. I guess i need to find out how to get access. It will let me delete the link files just not the directory. Sometimes i dont understand microsofts reasonings for things.