#257 some special folders don't always work in Windows 9x

2.0 Series
closed-fixed
General (291)
5
2005-11-11
2004-08-13
TDMFraggle
No

"SetShellVarContext all" uses different directories for
install and uninstall in Windows 98 SE.

Current settings for install are:
$SMPROGRAMS: "C:\Windows\Startmenu\Program Files"
(should be "C:\Windows\All Users\Startmenu\Program
Files"
$DESKTOP: "C:\Windows\All Users\Desktop" (correct)

Current settings for uninstall are:
$SMPROGRAMS: "C:\Windows\Startmenu\Program Files"
(should be "C:\Windows\All Users\Startmenu\Program
Files"
$DESKTOP: "C:\Windows\Desktop" (should
be "C:\Windows\All Users\Desktop")

Especially with the different $DESKTOP values, the
uninstaller fails to remove the links on the desktop.

I tried it with Windows XP, too, and it worked all
correctly with "all users" settings. I currently have no
other systems available, but think this could be a bug in
Windows 95/98/ME also. Maybe someone else can
approve this.

Attached you find the (uncommented) script file to test.

P.S.: It seems like this bug was already reported with
request id 906777, but the description was
misunderstood.

bye, TDMFraggle

Discussion

  • TDMFraggle

    TDMFraggle - 2004-08-13

    Script file for test

     
  • Amir Szekely

    Amir Szekely - 2004-08-13
    • assigned_to: nobody --> kichik
     
  • Amir Szekely

    Amir Szekely - 2004-08-13

    Logged In: YES
    user_id=584402

    After some playing around with the script you've attached,
    I've found that the reason $DESKTOP shows the right value
    for the installer but not for the uninstaller is that you
    have a CreateShortcut line in your installer. I will keep
    trying to figure out what's really behind this, but for now,
    you can add a CreateShortcut line to the uninstaller before
    using shell constants such as $DESKTOP.

     
  • TDMFraggle

    TDMFraggle - 2004-08-16

    Logged In: YES
    user_id=1103375

    Thanks for your hint. I tried it and it works fine.

    Will this bug be fixed in a later version?

     
  • Amir Szekely

    Amir Szekely - 2004-08-18

    Logged In: YES
    user_id=584402

    Assuming I can find some way to work around this odd Windows
    behavior, it will be fixed.

     
  • Jochen V.

    Jochen V. - 2005-03-02

    Logged In: YES
    user_id=1230708

    How exactly should the workaround look like?

    If I add in the uninstaller section the following (as I
    understood your hint):

    CreateShortCut "c:\windows\Desktop\test.lnk"
    "$INSTDIR\test.exe" "" "$INSTDIR\test.exe"
    Delete "c:\windows\Desktop\test.lnk"

    the Uninstaller well creates the link in case it did not
    exist yet, but it does not remove it, altough I didn't use
    any Shell variable.

    Using NSIS 2.05 and Win98

    Greetz
    Jochen

     
  • Nobody/Anonymous

    Logged In: NO

    Hello Jochen,

    the workaround for a link on the desktop should look like this:

    Section "Uninstall"

    SetShellVarContext all
    Delete "$DESKTOP\test.lnk"

    CreateShortCut "$DESKTOP\test.lnk" "$INSTDIR\test.exe"
    Delete "$DESKTOP\test.lnk"

    SetShellVarContext current
    Delete "$DESKTOP\test.lnk"

    SectionEnd

    bye, TDMFraggle

     
  • Jochen V.

    Jochen V. - 2005-03-02

    Logged In: YES
    user_id=1230708

    Hey TDMFraggle,

    thank you for the quick answer!

    Unfortunately your hint does not work entirely:

    I placed your code before all other uninstall-orders in my
    "Uninstall"-Section.
    And really, it removes test.lnk on my Win98 Desktop, but
    creates a new one at the same time, wich is not deleted.
    I assigned a different icon to that shortcut created in the
    uninstaller-section, to make this effect visible, otherwise
    it seems that test.lnk remains just untouched.

    Do I need to post the whole Installer-File?

    Greetz
    Jochen

     
  • Amir Szekely

    Amir Szekely - 2005-03-03

    Logged In: YES
    user_id=584402

    Put this above your code instead:

    CreateShortcut $TEMP\temp.lnk $TEMP
    Delete $TEMP\temp.lnk

     
  • Jochen V.

    Jochen V. - 2005-03-04

    Logged In: YES
    user_id=1230708

    No success :-( Icons still exist ...

    here my complete Uninstaller-Code:

    Section "Uninstall"

    CreateShortCut "$TEMP\temp.lnk" "$TEMP"
    Delete "$TEMP\temp.lnk"
    Delete "$DESKTOP\Start Fernwartung.lnk"
    Delete "$DESKTOP\Stop Fernwartung.lnk"
    RMDir /r "$INSTDIR"
    RMDir /r "$SMPROGRAMS\IT-Vogl"
    DeleteRegKey HKLM
    "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"

    SectionEnd

    (the reg-part in one line of course)

    greetz
    Jochen

     
  • Jochen V.

    Jochen V. - 2005-03-04

    Logged In: YES
    user_id=1230708

    No success :-( Icons still exist ...

    here my complete Uninstaller-Code:

    Section "Uninstall"

    CreateShortCut "$TEMP\temp.lnk" "$TEMP"
    Delete "$TEMP\temp.lnk"
    Delete "$DESKTOP\Start Fernwartung.lnk"
    Delete "$DESKTOP\Stop Fernwartung.lnk"
    RMDir /r "$INSTDIR"
    RMDir /r "$SMPROGRAMS\IT-Vogl"
    DeleteRegKey HKLM
    "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"

    SectionEnd

    (the reg-part in one line of course)

    greetz
    Jochen

     
  • Amir Szekely

    Amir Szekely - 2005-03-04

    Logged In: YES
    user_id=584402

    You still need SetShellVarContext all. Add it back and it
    should work.

     
  • Jochen V.

    Jochen V. - 2005-03-07

    Logged In: YES
    user_id=1230708

    Unfortunately it didn't. I placed it on top and in another
    try between the Uninstaller-Code I submitted before you posting

    - witout any success.

     
  • Amir Szekely

    Amir Szekely - 2005-03-08

    Logged In: YES
    user_id=584402

    Try replacing $TEMP with $DESKTOP. Maybe not all
    CreateShortcut commands make it work. If you still can't get
    it to work, try creating a thread in the forum with a link
    to this ticket. You'll probably get faster responses.

     
  • Amir Szekely

    Amir Szekely - 2005-10-21
    • summary: SetShellVarContext all in Windows 98 SE --> some special folders don't always work in Windows 9x
    • status: open --> open-fixed
     
  • Amir Szekely

    Amir Szekely - 2005-11-11
    • status: open-fixed --> closed-fixed
     
  • Amir Szekely

    Amir Szekely - 2005-11-11

    Logged In: YES
    user_id=584402

    I'm closing this for now because version 2.11, along with
    this fix, will be released tomorrow. Please do let me know,
    if there are still problems with this.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks