View Issue Details

IDProjectCategoryView StatusLast Update
0009071MMW v4Framework: Scripts/Extensionspublic2012-03-06 21:22
Reporterzvezdan Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version4.0 
Target Version4.1 
Summary0009071: SDB.ScriptsIniFile dosn't return correct path when used in Uninstall.vbs
DescriptionWhy didn't you mention this property in wiki? If I haven't read Mantis I would not know about it. Anyway, it is not working always correctly in Uninstall.vbs file when add-in is installed for the current user. Here is the test file:

Dim oIniFile

SDB.MessageBox SDB.ScriptsIniFile & vbCr & SDB.ScriptsPath, mtInformation, Array(mbOK)
On Error Resume Next
Set oIniFile = SDB.Tools.IniFileByPath(SDB.ScriptsIniFile)
If Err Then
    Set oIniFile = SDB.Tools.IniFileByPath(SDB.ApplicationPath _
            & "Scripts\Scripts.ini")
End If
On Error GoTo 0

If Not oIniFile Is Nothing Then
    oIniFile.DeleteSection("UpdateLocationOfFiles")

    On Error Resume Next
    SDB.RefreshScriptItems
    On Error GoTo 0
End If
Steps To ReproduceTest 1:
- install some type 0 script like "Update Location of Files" to the current user;
- install some type 0 script like "Restore/Synchronize Database" to all users;
- open Tools|Scripts|Restore/Synchronize Database (or any other script installed for all users) and click Cancel;
- open Tools|Extensions dialog box and uninstall "Update Location of Files" -> ScriptsIniFile returns the global ini path and because of that Uninstall.vbs wouldn't remove the corresponding .ini section.

Test 2:
- install some type 0 script like "Update Location of Files" to the current user;
- install some type 0 script like "Restore/Synchronize Database" to the current user;
- open Tools|Scripts|Restore/Synchronize Database (or any other script installed for the current user) and click Cancel;
- open Tools|Extensions dialog box and uninstall "Update Location of Files" -> ScriptsIniFile returns the local ini path and because of that Uninstall.vbs would remove the corresponding .ini section just fine.

Obviously, the returned ScriptsIniFile value depends of the last executed script, but not of the location of the Uninstall.vbs file which is wrong.
TagsNo tags attached.
Fixed in build

Relationships

related to 0004912 closedLudek Non-Admin users can't install scripts 

Activities

There are no notes attached to this issue.