Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 11th October 2005, 13:27   #1
Nicolas Cuny
Junior Member
 
Nicolas Cuny's Avatar
 
Join Date: Oct 2003
Location: France
Posts: 15
Exclamation Is SetShellVarContext synchronous ? (Win98SE)

Is SetShellVarContext instruction not synchronous ? It seems not to work immediately.

My script has some problem on my freshly installed MS Windows 98 Second Edition. The machine is a Pentium II 350 MHz with 128 MB of RAM.

In my full script, when installing, $DESKTOP is called after a few minutes of execution as there are many files copied. Its value is C:\WINDOWS\All Users\Desktop as expected. The problem is that during the uninstalling process, being much shorter in time, the value of $DESKTOP is C:\WINDOWS\Desktop. On my Windows 2000 and Windows XP machines there is no problem with the same .exe installer.

The script can be stripped down to this test file :
code:
Name "Context98"
OutFile "Context98.exe"

Section "-Context98" SEC01
MessageBox MB_OK "$DESKTOP"
CreateShortCut "$DESKTOP\Context98.lnk" "$EXEDIR\Context98.exe"
WriteUninstaller "$EXEDIR\UnContext98.exe"
SectionEnd

Section Uninstall
MessageBox MB_OK "$DESKTOP"
Delete "$DESKTOP\Context98.lnk"
SectionEnd

Function .onInit
MessageBox MB_OK "$DESKTOP"
SetShellVarContext all
MessageBox MB_OK "$DESKTOP"
FunctionEnd

Function un.onInit
MessageBox MB_OK "$DESKTOP"
SetShellVarContext all
MessageBox MB_OK "$DESKTOP"
FunctionEnd

With this simple script and Windows 98, the value of $DESKTOP is never C:\WINDOWS\All Users\Desktop but always C:\WINDOWS\Desktop.

The important part is that the
code:
MessageBox MB_OK "$DESKTOP"
SetShellVarContext all
MessageBox MB_OK "$DESKTOP"

section displays twice C:\WINDOWS\Desktop on Windows 98.

There is only one user account on the machine.
Nicolas Cuny is offline   Reply With Quote
Old 11th October 2005, 13:36   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
It's synchronous. See bug report #1008632.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 11th October 2005, 14:03   #3
Nicolas Cuny
Junior Member
 
Nicolas Cuny's Avatar
 
Join Date: Oct 2003
Location: France
Posts: 15
Thank you kichik,

I searched the forum, the site and the wiki but i missed the bug tracker
Nicolas Cuny is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump