Archive: Is SetShellVarContext synchronous ? (Win98SE)


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 :

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
  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.

It's synchronous. See bug report #1008632.


Thank you kichik,

I searched the forum, the site and the wiki but i missed the bug tracker :eek: