Jump to content

Cosmin3

Member
  • Posts

    145
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Romania

Everything posted by Cosmin3

  1. Thank you. Which version are you using, Ramdisk or Ramdisk Plus? Does really creates ramdisk over 4 GB on x86 OS..? But the most important question: can create only in memory space unaccessible to x86 OS? And what do you mean exactly by "loose the crash debug ability"?
  2. Hi. I think everybody knows that Windows x86 is limited to 3..3.5 GB RAM. So, if I buy 8 GB I have to use x64. But, for various reasons, I can't use it (for now). I have read . But I can't use those workarounds... Here's a question: is it possible to create, before win loads, a 4.5..5 GB Ramdrive with pagefile (fixed size) on it in the last part of the RAM (where Windows x86 can't "reach")? This way you can use all the RAM. Having a Virtual Memory file instead of just RAM will slow down the computer a bit, but it's better than nothing. Probably, over the years, this issue and various solvings were discussed... So, sorry if my idea seems "dumb" or antiquated Or perhaps someone found another way... Thank you in advance for any reply. Best regards, Cosmin3
  3. I found it only as "c:\WINDOWS\system32\nlite.cmd". I couldn't find it in installation files as nlite.cm_ (or anywhere else for that matter). I kept only the first line: for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i It gives me a temporary %source% variable (set on my system as "E:"). But soon as I close cmd window, it's gone. Anyway it doesn't work with USB stick installation because, obviously, the CD ain't there... I will use it like this: for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\SetVM\SetVM.exe %%i:\SetVM\SetVM.exe But the problem is that I have to use a *.cmd file for this command, which I have to place it in a $OEM$ folder so I can run it. This is what I tried to avoid in the first place... But thank you.
  4. I tried myself with "%source%" a few weeks ago (for other program) but this environment variable isn't recognized after the installation is over. Anyway, even if it works when installing from CD, surely it won't work when installing from USB stick.
  5. I tested it... I made an $OEM$\$$\Temp\ folder on XP installation CD and I copied the files in it. At Unattended >> RunOnce section in nlite I added %windir%\Temp\SetVM.exe. During installation I didn't see any error message. It seems it worked:
  6. Version 2.0 program SetVM; uses Windows, SysUtils, StrUtils; {$R *.res} type TMemoryStatusEx = packed record dwLength: DWORD; dwMemoryLoad: DWORD; ullTotalPhys: Int64; ullAvailPhys: Int64; ullTotalPageFile: Int64; ullAvailPageFile: Int64; ullTotalVirtual: Int64; ullAvailVirtual: Int64; ullAvailExtendedVirtual: Int64; end; type TCurrVal = record Drive: Char; Size: Int64; end; function GlobalMemoryStatusEx(var lpBuffer: TMemoryStatusEx): BOOL; stdcall; external kernel32; var MS: TMemoryStatusEx; CurrStr, StrToChg, IniName, s: AnsiString; hTemp: HKEY; WinPath: array[0..MAX_PATH + 1] of char; Result: Boolean; FreeAv, TotalAv, VMSize, CurrVal: Int64; i, j, p, l, NrDefVal: Integer; Buf: Pointer; BufSize: Cardinal; ValType: DWORD; sr: TSearchRec; CurrValA, FtValA: array of TCurrVal; t: TextFile; begin Result := False; try try //tries to read the current configuration if RegOpenKeyEx(HKEY_LOCAL_MACHINE, PChar('SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management'), 0, KEY_READ, hTemp) = ERROR_SUCCESS then begin if RegQueryValueEx(hTemp, PChar('PagingFiles'), nil, @ValType, nil, @BufSize) = ERROR_SUCCESS then //query buffer size begin GetMem(Buf, BufSize); try if RegQueryValueEx(hTemp, PChar('PagingFiles'), nil, @ValType, Buf, @BufSize) = ERROR_SUCCESS then if BufSize > 0 then begin CurrStr := AnsiLowerCase(string(Buf)); SetLength(CurrValA, 0); i := -1; p := Pos('pagefile.sys', CurrStr); while p > 0 do //recursive search for each pagefile begin Inc(i); SetLength(CurrValA, i + 1); CurrValA[i].Drive := CurrStr[p - 3]; //get the actual size of the pagefiles if FindFirst(Copy(CurrStr, p - 3, 15), faAnyFile, sr) = 0 then CurrValA[i].Size := Int64(sr.FindData.nFileSizeHigh) shl Int64(32) + Int64(sr.FindData.nFileSizeLow); FindClose(sr); p := PosEx('pagefile.sys', CurrStr, p + 12); end; end; finally FreeMem(Buf); end; end; RegCloseKey(hTemp); end; except end; StrToChg := ''; //get the Ram informations MS.dwLength := SizEof(TMemoryStatusEx); GlobalMemoryStatusEx(MS); if MS.ullTotalPhys < 134217728 then // if RAM size is lower than 128 MB (most probably a reading bug) VMSize := 201326592 else VMSize := Round(1.5 * MS.ullTotalPhys); IniName := Copy(ParamStr(0), 1, Length(ParamStr(0)) - 3) + 'ini'; if FileExists(IniName) then //if configuration file exists begin //reads the configuration file AssignFile(t, IniName); FileMode := 0; i := -1; NrDefVal := 0; SetLength(FtValA, 0); try Reset(t); while not Eof(t) do begin Readln(t, s); if Pos('#', s) = 1 then Continue; l := Length(s); if l > 2 then if (s[1] in ['a'..'z']) or (s[1] in ['A'..'Z']) then if s[2] = '=' then begin Inc(i); SetLength(FtValA, i + 1); if s[1] in ['a'..'z'] then FtValA[i].Drive := s[1] else FtValA[i].Drive := Char(Byte(s[1]) + 32); if s[3] = '*' then begin FtValA[i].Size := -1; Inc(NrDefVal); end else FtValA[i].Size := StrToInt64def(Copy(s, 3, l - 2), 0) * 1048576; end; end; except end; CloseFile(t); if i = -1 then Exit; if NrDefVal > 0 then //if the number of * is at least 1 begin for i := 0 to High(FtValA) do if FtValA[i].Size <> -1 then VMSize := VMSize - FtValA[i].Size; //calculate the default size for i := 0 to High(FtValA) do begin //assignes default values when * is used if FtValA[i].Size = -1 then FtValA[i].Size := Round(VMSize / NrDefVal); //if assigned value is 0 or negative then it's a problem if Round(FtValA[i].Size / 1048576) < 1 then Exit; end; end; for i := 0 to High(FtValA) do //for each drive begin if not GetDiskFreeSpaceEx(PChar(FtValA[i].Drive + ':\'), FreeAv, TotalAv, nil) then //can't read free disk space (drive/OS error) Exit; if FreeAv = 0 then //no free space on that drive; most probably a drive error or a read-only one... Exit; j := 0; while j < Length(CurrValA) do //search for records about current pagefile on that drive begin if CurrValA[j].Drive = FtValA[i].Drive then Break; Inc(j); end; //tests if the new pagefile fits if j < Length(CurrValA) then begin if (FreeAv + CurrValA[i].Size) <= FtValA[i].Size then Exit; end else if FreeAv <= FtValA[i].Size then Exit; //text to change in registry StrToChg := StrToChg + FtValA[i].Drive + ':\pagefile.sys ' + IntToStr(Round(FtValA[i].Size / 1048576)) + ' ' + IntToStr(Round(FtValA[i].Size / 1048576)) + #0; end; Delete(StrToChg, Length(StrToChg), 1); //delete unused #0 at the end end else begin //no configuration found so it sets one file on Windows drive WinPath[0] := #0; if GetWindowsDirectory(WinPath, MAX_PATH) = 0 then //can't read the name of Windows folder (drive/OS error) Exit; if not GetDiskFreeSpaceEx(PChar(WinPath[0] + ':\'), FreeAv, TotalAv, nil) then //can't read free disk space (drive/OS error) Exit; if FreeAv = 0 then //no free space on that drive; most probably a drive error or a read-only one... Exit; WinPath[0] := Char(CharLower(PChar(WinPath[0]))); i := 0; CurrVal := 0; while i < Length(CurrValA) do //search for records about current pagefile on Windows drive begin if CurrValA[i].Drive = WinPath[0] then begin CurrVal := CurrValA[i].Size; Break; end; Inc(i); end; //tests if the new pagefile fits if (FreeAv + CurrVal) <= VMSize then Exit; //text to change in registry StrToChg := WinPath[0] + ':\pagefile.sys ' + IntToStr(Round(VMSize / 1048576)) + ' ' + IntToStr(Round(VMSize / 1048576)); end; //tries to write in registry try if RegCreateKeyEx(HKEY_LOCAL_MACHINE, PChar('SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management'), 0, nil, REG_OPTION_NON_VOLATILE, KEY_WRITE, nil, hTemp, nil) = ERROR_SUCCESS then begin Result := RegSetValueEx(hTemp, PChar('PagingFiles'), 0, REG_MULTI_SZ, PChar(StrToChg + #0#0), Length(StrToChg) + 2) = ERROR_SUCCESS; RegCloseKey(hTemp); end; except end; finally if not Result then //some error happened so it shows a message MessageBox(0, 'Unable to set Virtual Memory values automatically'#13#10'Please set them manually!', 'SetVM', MB_ICONERROR or MB_OK); end; end. Configuration is set in SetVM.ini: C=300 D=* The user can set the size directly (in MB) or * for the default value. If the ini file is missing it sets like in previous version. SetVM.zip
  7. For my program no, I asked only because having 2 or more pagefiles on the same physical drive is not good (slower access). Ok, I'll let you choose a way to implement (configuration file or command line parameters) and the "syntax" to be used It should be easy to understand and use...
  8. You're welcome. When you say "two drives" you mean two physical drives or 2 logical drives (on the same physical drive)..?
  9. Ok First version. Only for tests! The code (compiled in Delphi 7): program SetVM; uses Windows, SysUtils; {$R *.res} type TMemoryStatusEx = packed record dwLength: DWORD; dwMemoryLoad: DWORD; ullTotalPhys: Int64; ullAvailPhys: Int64; ullTotalPageFile: Int64; ullAvailPageFile: Int64; ullTotalVirtual: Int64; ullAvailVirtual: Int64; ullAvailExtendedVirtual: Int64; end; function GlobalMemoryStatusEx(var lpBuffer: TMemoryStatusEx): BOOL; stdcall; external kernel32; var MS: TMemoryStatusEx; CurrStr, StrToChg: AnsiString; hTemp: HKEY; WinPath: array[0..MAX_PATH + 1] of char; Result: Boolean; FreeAv, TotalAv, VMSize, CurrVal: Int64; p: Integer; Buf: Pointer; BufSize: Cardinal; ValType: DWORD; sr: TSearchRec; begin Result := False; CurrVal := 0; try MS.dwLength := SizEof(TMemoryStatusEx); GlobalMemoryStatusEx(MS); if MS.ullTotalPhys < 134217728 then VMSize := 201326592 else VMSize := Round(1.5 * MS.ullTotalPhys); WinPath[0] := #0; if GetWindowsDirectory(WinPath, MAX_PATH) = 0 then Exit; if not GetDiskFreeSpaceEx(PChar(WinPath[0] + ':\'), FreeAv, TotalAv, nil) then Exit; if FreeAv = 0 then Exit; try if RegOpenKeyEx(HKEY_LOCAL_MACHINE, PChar('SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management'), 0, KEY_READ, hTemp) = ERROR_SUCCESS then begin if RegQueryValueEx(hTemp, PChar('PagingFiles'), nil, @ValType, nil, @BufSize) = ERROR_SUCCESS then begin GetMem(Buf, BufSize); try if RegQueryValueEx(hTemp, PChar('PagingFiles'), nil, @ValType, Buf, @BufSize) = ERROR_SUCCESS then if BufSize > 0 then begin CurrStr := PChar(Buf); p := Pos(' ', CurrStr); Delete(CurrStr, p, Length(CurrStr) - p + 1); if CurrStr <> '' then if CharLower(PChar(CurrStr[1])) = CharLower(PChar(WinPath[0])) then begin if FindFirst(CurrStr, faAnyFile, sr) = 0 then CurrVal := Int64(sr.FindData.nFileSizeHigh) shl Int64(32) + Int64(sr.FindData.nFileSizeLow); FindClose(sr); end; end; finally FreeMem(Buf); end; end; RegCloseKey(hTemp); end; except end; if (FreeAv + CurrVal) <= VMSize then Exit; StrToChg := WinPath[0] + ':\pagefile.sys ' + IntToStr(Round(VMSize / 1048576)) + ' ' + IntToStr(Round(VMSize / 1048576)); try if RegCreateKeyEx(HKEY_LOCAL_MACHINE, PChar('SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management'), 0, nil, REG_OPTION_NON_VOLATILE, KEY_WRITE, nil, hTemp, nil) = ERROR_SUCCESS then begin Result := RegSetValueEx(hTemp, PChar('PagingFiles'), 0, REG_MULTI_SZ, PChar(StrToChg + #0#0), Length(StrToChg) + 2) = ERROR_SUCCESS; RegCloseKey(hTemp); end; except end; finally if not Result then MessageBox(0, 'Unable to set Virtual Memory values automatically'#13#10'Please set them manually!', 'SetVM', MB_ICONERROR or MB_OK); end; end. I attached the exe file. Just run it and if there is no error message restart Windows. Remember to backup your registry first, just in case Anyway, on my computer works fine. Later edit: I made 2 small changes: - The VM size is no longer limited to 4 GB; - The exe file is a little smaller (I removed Math Unit). Unfortunatelly, for now, this program can be used in 64 bit operating system only when the size of Ram is < 4 GB. It is a limitation of GlobalMemoryStatus function (from kernel32.dll) who can return a 32 bit value (4 GB - 1). I will try to find a better function. Later later edit: I solved also the problem with GlobalMemoryStatus: I used GlobalMemoryStatusEx. Microsoft says that it should work fine. But I can't test it, because I have only 2 GB. Oh, and I also made the code to get the size of the current virtual memory file on the system drive. SetVM.zip
  10. Yes, this is better. Thank you. I tested and it's working only with RunOnce, not as addon. But it's not a big problem. No problem. I just realized something: I don't need to read that value; I just have to find how much RAM the computer has and multiply with 1.5. I will make a little program that will do this and after it will write it directly to registry. Oh, I forgot to mention: I'm a Delphi programmer
  11. Ok, thank you for the informations. I understood most of what you said... I thought that, since adding these files are the only change that I make in nlite to slipstream IE8, they could be used also directly. I was wrong I asked about this because at http://www.msfn.org/board/forum/19-software-hangout/ nobody was able to solve the problem with installing IE8 directly. So I'm still searching for a way. Thank you. I will try to make it addon to see if it works I wonder where in Windows (registry and/or file) the number for "recommended value" is written (and when is written)...
  12. Hi. If I want to use these files in a normal IE8 installation (not nlite) how can I do it..? IE8-WindowsXP-KB2183461-x86-ENU.exe IE8-WindowsXP-KB976662-x86-ENU.exe IE8-WindowsXP-KB981332-x86-ENU.exe IE8-WindowsXP-x86-ENU.OnePiece.7z Always after Windows XP installation I set the paging file size to the recommended value. Specifically the "Initial size" and "Maximum size" are both set to the recommended value (for 2 GB RAM is 3070 MB). I know it's a long shot but is it possible to set this in installation files..?
  13. In VirtualBox yes, Windows is not activated. But I also tried installing IE8 in the real computer - with the same OS but activated and it didn't work either. Like I said, I installed it fine only when I had original/unmodified OS...
  14. Yes and it's missing. But the point is that the main installer IE8-WindowsXP-x86-ENU.exe is running fine when Windows XP has not been modified with nlite (only SP3 + latest updates included). The problem is not from those IE8 updates but from this installer. The setup log doesn't show an error but I see a significant time difference. When it's a problem the progressbar is filling only about 10% and the time in which finishes it's a lot shorter. It's like it's deciding not to copy all the files. I know this is not nlite section but I will attach the Last session.ini Maybe someone knows which modification(s) "triggers" this problem. Later edit: I did not tried because I wanted to install a better version... Last Session.ini
  15. Thank you. But this is not working too. The IE is still version 6 if I start it without restarting Windows. And if I try to restart Windows it says this and the desktop isn't loaded: In nlite section -X- gave me an addon made for this problem. But it's for nlite not for normal install. Anyway I'm not 100% convinced that if I found a normal installer (for the files from this addon) it will solve the problem with IE8.
  16. Thank you. Unfortunately, starting IE8-WindowsXP-x86-ENU.exe with these parameters doesn't solve the problem. In that OS IE is still version 6.
  17. Ok. I deactivated these services: Remote Access Auto Connection Manager Remote Access Connection Manager Remote Desktop Help Session manager And in Components section I checked "Remote registry" to be removed. But I can still see the tab System Properties >> Remote + if I try "Remote Desktop Connection" link from start menu is showing the window. I'm not sure that is 100% deactivated...
  18. Sorry for not being more specific. I meant what should I change in nlite in those two sections to deactivate Remote Assistance/Desktop completely - interface + services. I ask because I'm not 100% sure...
  19. What are the consequences of removing "Remote Desktop/Assistance" completely? I mean for other Windows and nonWindows programs... For example TeamViewer will still work...? Later edit: and, if it's safe, which components should I remove in "Components" section and which services should I deactivate in "Tweaks >> Services"?
  20. Hi. Sorry for my english... For some time I use nlite to modify Windows XP installation. One of the problems is that I can no longer install Internet Explorer 8. At some point it shows error and wants restart. After restart I see that troubleshooting link on desktop, but following those instructions doesn't help. Because I think is got something to do with modifications that I made with nlite first I asked in nlite section: But I was advised to ask here. IE8 setup shows this: I attached the ie8_main.log file. What could be the problem..? Thank you in advance for any reply. Best regards, Cosmin ie8_main.zip
  21. Thank you for your suggestion. I asked in this section first because is got something to do with modifications I did with nlite. I will try there.
  22. Of course. In each one I removed things differently. In the first one I removed a lot (for example SFC, Help files, many services...), the second one is average and the third one is just with SP3 and updates (no settings modified, no links or files removed). IE8 is installing ok only in the third one. I made 3 because usually I use the first one but there may be one or more programs that do not work well in it. So I will install the second and, if still not working well, the third. Having these 3 versions is helping me to save time. Yes, it is from a failed install...
  23. Ok. I've added the setup log of IE8 to the previous post because some time ago you mentioned it. Yes, now I slipstream IE8 but I still want to know what is wrong in case that I use an installation without. You see, I made 3 installation cds. One with IE8 included and 2 without. Could you please have a look at that log..? Thank you.
  24. Thank you. 3. Ok, I'll do that until the setting from nlite will work properly. 4. 6. Yes I could. I thought there is a setting in nlite for this (or in winnt.sif), that's why I asked. 7. I found a solution: with reg2exe I make a exe, from exe I make an addon and I use the addon in nlite. I already tested and it works fine Later edit: Oh, and I found the setup log for IE8. It was in %windir%\ie8_main.log. I attached it to this post. ie8_main.zip
×
×
  • Create New...