I'm having a strange behaviour when I try to update the Win.ini file with WPS. I need to add a key=value under [extensions] and it's doesn't work. I did the test to add the same key=value under [test] and it works.

I create a WiseScript to do the same job and it works standalone but when running inside the .msi, it doesn't work (even in "run as administrator")

Look like [extensions] is protected while running Windows Installer... I don't know why...

Anyone have any idea on this ?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Windows file protection?

http://msdn.microsoft.com/en-us/library/aa372820(VS.85).aspx
Answered 08/12/2009 by: sv408
Senior Yellow Belt

Please log in to comment
0
How would WFP protect one section of an INI file?

@DF:
One, ProcMon, ProcMon, ProcMon...
Two, what sort of app requires entries in the 'Extensions' section of WIN.INI?!? You'll be telling us next you can't get it to run in Windows 95...
Answered 08/12/2009 by: VBScab
Red Belt

Please log in to comment
0
Procmon result : (With Section [test])

12:30:56.2104892 PM EditIniFile.exe 3972 QueryOpen C:\Windows\win.ini FAST IO DISALLOWED
12:30:56.2106412 PM EditIniFile.exe 3972 CreateFile C:\Windows\win.ini SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:30:56.2106831 PM EditIniFile.exe 3972 QueryBasicInformationFile C:\Windows\win.ini SUCCESS CreationTime: 12/08/2009 11:27:32 AM, LastAccessTime: 12/08/2009 11:27:32 AM, LastWriteTime: 12/08/2009 12:30:41 PM, ChangeTime: 12/08/2009 12:30:41 PM, FileAttributes: A
12:30:56.2107012 PM EditIniFile.exe 3972 CloseFile C:\Windows\win.ini SUCCESS
12:30:56.2109088 PM EditIniFile.exe 3972 CreateFile C:\Windows\win.ini SUCCESS Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:30:56.2111706 PM EditIniFile.exe 3972 LockFile C:\Windows\win.ini SUCCESS Exclusive: False, Offset: 0, Length: 4,294,967,295, Fail Immediately: False
12:30:56.2114874 PM EditIniFile.exe 3972 QueryStandardInformationFile C:\Windows\win.ini SUCCESS AllocationSize: 40, EndOfFile: 39, NumberOfLinks: 1, DeletePending: False, Directory: False
12:30:56.2115597 PM EditIniFile.exe 3972 ReadFile C:\Windows\win.ini SUCCESS Offset: 0, Length: 39, Priority: Normal
12:30:56.2119572 PM EditIniFile.exe 3972 UnlockFileSingle C:\Windows\win.ini SUCCESS Offset: 0, Length: 4,294,967,295
12:30:56.2122539 PM EditIniFile.exe 3972 CloseFile C:\Windows\win.ini SUCCESS
12:30:56.2124841 PM EditIniFile.exe 3972 CreateFile C:\Windows\win.ini SUCCESS Desired Access: Generic Read/Write, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: 0, OpenResult: Opened
12:30:56.2125266 PM EditIniFile.exe 3972 LockFile C:\Windows\win.ini SUCCESS Exclusive: True, Offset: 0, Length: 4,294,967,295, Fail Immediately: False
12:30:56.2126023 PM EditIniFile.exe 3972 QueryStandardInformationFile C:\Windows\win.ini SUCCESS AllocationSize: 40, EndOfFile: 39, NumberOfLinks: 1, DeletePending: False, Directory: False
12:30:56.2126448 PM EditIniFile.exe 3972 ReadFile C:\Windows\win.ini SUCCESS Offset: 0, Length: 39, Priority: Normal
12:30:56.2128068 PM EditIniFile.exe 3972 WriteFile C:\Windows\win.ini FAST IO DISALLOWED Offset: 39, Length: 41
12:30:56.2128258 PM EditIniFile.exe 3972 WriteFile C:\Windows\win.ini SUCCESS Offset: 39, Length: 41, Priority: Normal
12:30:56.2132563 PM EditIniFile.exe 3972 SetEndOfFileInformationFile C:\Windows\win.ini SUCCESS EndOfFile: 80
12:30:56.2138608 PM EditIniFile.exe 3972 UnlockFileSingle C:\Windows\win.ini SUCCESS Offset: 0, Length: 4,294,967,295
12:30:56.2139656 PM EditIniFile.exe 3972 CloseFile C:\Windows\win.ini SUCCESS



With section [Extensions] :

12:31:10.5212178 PM EditIniFile.exe 3632 QueryOpen C:\Windows\win.ini FAST IO DISALLOWED
12:31:10.5214335 PM EditIniFile.exe 3632 CreateFile C:\Windows\win.ini SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:31:10.5215383 PM EditIniFile.exe 3632 QueryBasicInformationFile C:\Windows\win.ini SUCCESS CreationTime: 12/08/2009 11:27:32 AM, LastAccessTime: 12/08/2009 11:27:32 AM, LastWriteTime: 12/08/2009 12:30:56 PM, ChangeTime: 12/08/2009 12:30:56 PM, FileAttributes: A
12:31:10.5217246 PM EditIniFile.exe 3632 CloseFile C:\Windows\win.ini SUCCESS


It an old 16-bit application. The application work without the win.ini entry anyway. It just weird why I can't update [Extensions] entry.

edit : Add Code /Code
Answered 08/12/2009 by: darkfang
Blue Belt

Please log in to comment
0
One, please use the CODE tag (accessed by clicking the button marked '<%' in the 'Reply to Message' window) when posting logs, code or other lengthy text.
Two, all I see are 'SUCCESS' entries. The 'FAST IO DISALLOWED' are just denials by the OS of a quick file I/O method and can be ignored (include them in your default ProcMon filter).
Three, it sounds bizarre, but have you tried moving the section up or down the INI? or re-creating the INI by pasting its content into a new file, deleting the old and then saving the new as WIN.INI?
Answered 08/12/2009 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: VBScab
One, please use the CODE tag (accessed by clicking the button marked '<%' in the 'Reply to Message' window) when posting logs, code or other lengthy text.

Fixed!
ORIGINAL: VBScab
Two, all I see are 'SUCCESS' entries. The 'FAST IO DISALLOWED' are just denials by the OS of a quick file I/O method and can be ignored (include them in your default ProcMon filter).

Done!
ORIGINAL: VBScab
Three, it sounds bizarre, but have you tried moving the section up or down the INI? or re-creating the INI by pasting its content into a new file, deleting the old and then saving the new as WIN.INI?


Yes, same result : can't update the [extensions] section. Anyway, thanks for your time.
Answered 08/12/2009 by: darkfang
Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity