Archive: Uninstall: a folder not found error message.


Uninstall: a folder not found error message.
When my uninstaller runs, sometimes (not always) we see the message:

---------------------------
Settings
---------------------------
C:\Documents and Settings\All Users\Application Data\Product Name\Settings refers to a location that is unavailable. It could be on a hard drive on this computer, or on a network. Check to make sure that the disk is properly inserted, or that you are connected to the Internet or your network, and then try again. If it still cannot be located, the information might have been moved to a different location.
---------------------------
OK
---------------------------
The uninstaller code that generates this error is:

rmdir /r /REBOOTOK "$9\Application Data\${PRODUCT_NAME}"

where $9 contains the data: "C:\Documents and Settings\All Users\Application Data\", and of course ${PRODUCT_NAME} contains the string "Product Name" (really it contains the name of the product, but for posting purposes...)

And, yes, this is the only line deleting the folder in question.

Anyone have thoughts or suggestions?

That message is not coming from NSIS, it's coming from the operating system (from Windows Vista apparently).

I have no idea what's causing it, but google gives tons of results if you search the message.

PaR


Originally posted by {_trueparuex^}
That message is not coming from NSIS, it's coming from the operating system (from Windows Vista apparently).

I have no idea what's causing it, but google gives tons of results if you search the message.

PaR
Yes, it is a Windows message, I wonder if there is some way to tell NSIS to do things silently (ignore the error). BTW, we are getting this on XP (probably would get it on Vista too, but our first discovery of the message was XP based.

I wonder why you do not use $APPDATA instead.

$APPDATA

The application data directory. Detection of the current user path requires Internet Explorer 4 and above. Detection of the all users path requires Internet Explorer 5 and above. The context of this constant (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.

Originally posted by Red Wine
I wonder why you do not use $APPDATA instead.
I'm not sure I see the method to find or set the location as being significant. When in the 'All Users' context, $APPDATA would return the string that I described in the original post.

Perhaps I'm missing something? (Yes, we are installing for 'All Users'...)

rmdir /r /REBOOTOK "$9\Application Data\${PRODUCT_NAME}"

where $9 contains the data: "C:\Documents and Settings\All Users\Application Data\", and of course ${PRODUCT_NAME} contains the string "Product Name" (really it contains the name of the product, but for posting purposes...)
Expanding the code as it is described here the result is:
rmdir /r /REBOOTOK "C:\Documents and Settings\All Users\Application Data\Application Data\${PRODUCT_NAME}"
which seems wrong to me.
Section Uninstall
SetShellVarContext All
rmdir /r /REBOOTOK "$APPDATA\${PRODUCT_NAME}"