Jump to content

Yzöwl

Patron
  • Posts

    4,113
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

Everything posted by Yzöwl

  1. MAKECAB/L "%USERPROFILE%\DESKTOP\XPCD\I386" "%USERPROFILE%\DESKTOP\XPCD\SI3112\SI3112.SYS"
  2. We shouldn't need it! I was being extra cautious due to the lack of quotes for the findstr command. We dont want findstr thinking that %systemroot… etc. was part of the search string <Edit> Just as an after thought, if you are sure that the 'dospath=' line is added to every $WINNT$.INF then you can dispense with the IF ERRORLEVEL 0 too! DetachedProgram = cmd.exe Arguments = "/Q /C FOR /F %? IN ('FINDSTR/I DOSPATH= %SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (SET %?\&& CALL START /MIN %dospath:\\=\%$OEM$\Detached.cmd)" </Edit>
  3. @ Djé Would this shorter code not do the same thing, apart from the minimized running of the batch file. DetachedProgram = cmd.exe Arguments = "/Q /C FOR /F %? IN ('FINDSTR/I DOSPATH= ^<%SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (IF ERRORLEVEL 0 (SET %? &CALL %dospath:~0,2%\$OEM$\Detached.cmd))"
  4. So the above is a paste or a copy by what you see? From what i see there you have this mistake... Where?
  5. That will not workeither %cddrive%InstallApps or set CDDRIVE=%%i: RunOnceEx is a cmd file! Have you defined the %cddrive% variable in RunOnceEx? If you have please check that it is correct as I showed you above, if not define it!
  6. Djé, nice idea, how about pick_one.cmd. It is based on a similar idea, but its syntax will not be obvious to understand. To use it, which is probably a good idea in the first instance, drop a reasonably high level folder onto it or run it from the command line with the folder path as a parameter. [note] It would of course only work in this case if you had txt files in your chosen folder structure[/note]
  7. Well, firstly let me say, why are you from the uk, with uk layout and language settings and spelling programs like that? Now, is there a reason why you are not using the usual location for 'common files'? Is there a reason for bloating the %WinDir% with user profiles too? Why didn't you remove your Product Key? In answer to your question, the paths used in the winnt.sif are relative \WINDOWS will put the %SystemRoot% on the current drive %SystemDrive%, usually C: therefore the following ProgramFilesDir = "C:\Programmes" CommonProgramFilesDir = "C:\Windows\Common Files" ProfilesDir = "C:\Windows\User Settings" should read ProgramFilesDir = "\Programmes" CommonProgramFilesDir = "\Windows\Common Files" ProfilesDir = "\Windows\User Settings" and ideally ProgramFilesDir = "\Programs" CommonProgramFilesDir = "\Programs\Common Files" ProfilesDir = "\User Settings" I hope you understand!
  8. urie, who have you quoted? no-one in this thread appears to have said that! Also why would a script which associates filetypes etc. with IE be of any use to Firefox users.
  9. Speaking for myself here, I am not a psychic, so where is the folder?, what's it named?, what's in it?, what are its attributes? and what exactly did you try using rmdir and DOS?
  10. Try using RMTSHARE.EXE from the NT4 Resource Kit with the /GRANT switch.
  11. My attachment above is a zipped archive, containing a compiled batch file; the batch file: Verifies that you are running Windows XP Ensures that you are at Service Pack 2 level Determines whether Home or Pro Edition Applies the appropriate service configurations for that Edition Offers the choice to reboot immediately or not The services are configured using the Windows XP built-in sc.exe tool. Sc.exe requires that you are running with Administrator privileges, hence my previous notice.
  12. This should probably have been posted in the unattended forum, however since you are installing from CD, then the $OEM$ directory should be on the same level as the I386, not within it.
  13. I've compiled a batch file, which should do it for you. The file works equally well for both Home or Pro Editions, is suitable only for SP2 versions, and requires that you have administrative privileges. sp2_defs.zip
  14. If the folder isn't named one of the following, or additionally the name of one of your users then you can remove it. Default User, All Users, NetworkService, Administrator, LocalService
  15. You could also use a vbscript, there's a lot more code, but it would work much faster! uptime.vbs Option Explicit Dim strComputer, strDirectory, strFile Dim objFSO, objFolder, objTextFile, objFile, objWMIService, objOS Dim colOperatingSystems, intSystemUptime, TimedAt, M, S, H, D strComputer="." 'log file location and name strDirectory="C:\Logs" strFile="\uptime.log" 'On Error Resume Next Set objFSO=CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists(strDirectory) Then Set objFolder=objFSO.GetFolder(strDirectory) Else Set objFolder=objFSO.CreateFolder(strDirectory) End If If objFSO.FileExists(strDirectory &strFile) Then Set objFolder=objFSO.GetFolder(strDirectory) Else Set objFile=objFSO.CreateTextFile(strDirectory &strFile) End If Set objFile=nothing : Set objFolder=nothing Set objTextFile=objFSO.OpenTextFile(strDirectory &strFile, 8, True) Set objWMIService=GetObject("winmgmts:\\" &strComputer &"\root\cimv2") Set colOperatingSystems=objWMIService.ExecQuery _ ("Select * From Win32_PerfFormattedData_PerfOS_System") For Each objOS in colOperatingSystems intSystemUptime=Int(objOS.SystemUpTime) TimedAt=FormatDateTime(Date(),2) &", " &FormatDateTime(Time(),4) UpTime(intSystemUptime) Next Function UpTime(S) M=S\60 : S=S mod 60 : H=M\60 : M=M mod 60 : D=H\24 UpTime=D &" Days, " &H &" Hours, " &M &" Minutes" objTextFile.WriteLine(TimedAt &", " &UpTime) End Function objTextFile.Close WScript.QuitI have set lines 8 and 9 to suit your first post but they should be all you would need to change if anything. The output will all be on one line [date, time without seconds, Uptime (days, hours, minutes)] uptime.log <Edit> WMIC script replaced with the VBscript above </Edit>
  16. You may also be able to use a wmi commandline, try pasting the following in a cmd window: @for /f "skip=1" %? in ('wmic os get installdate') do @set "dateof=%?" &@call echo/%dateof:~6,2%\%dateof:~4,2%\%dateof:~0,4% &set "dateof="<Edit> It should all be on one line! </Edit>
  17. I have to disagree GSM, since your output file does not contain the <HTA:APPLICATION> tag, it is essentially a HTML file and as such should follow its rules. The format, as I said previously, is down to individual tastes, (I made changes to the js file too). I only changed the format to suit my own preference so that it would enable me to follow the code sufficiently to make my changes. Also, if file size was an issue, since it runs straight from an exe, I'd have improved the compression of the archive. [Edit] So as not to overload an excellent thread and detract focus from your application, I have decided to edit and use a previous message to further explain my point. HTA is a HTML Application, it should therefore as much as possible follow the standards laid down for HTML. You have decided differently and your HTA has not suffered noticably as a consequence. As far as I'm concerned in HTML, which as I've said before, we are working in, if tags are not closed, of which there were hundreds in the final output then that is strictly speaking a coding error. Also if my output was to HTML as opposed to HTA, which I've tried with my version only, it works fine without error or popup or warning. (I dont have an IE engined browser assigned to HTML documents). The only difference is that the background is a nasty looking red colour. In closing, I dont think that because something has a forgiving nature, that nature or trait should be tested. Just because a person may be good at coping with pressure, doesn't mean that we should strive to put them under it. [/Edit]
  18. The functionality etc. hasn't changed, just the correctness of the code, <TR> tags should have, but weren't used, all the <B> tags remained unclosed, there were some incorrect and many missing tags. They were'nt noticed, previously due to the forgiving nature of HTML. In the javascript for the cleanup and defrag routines, the same function was declared twice in two cases. If you were to keep the %computername%.hta, change its extension to html, and run it through a HTML code checker, you'd see the differences in the two versions, otherwise you shouldn't. The code isn't mine, and as such I wouldn't change its functionality, I hope this helps explain a little better.
  19. It's still exactly the same GSM!Anyhow, in the mean time here's a version I've been messing with. It basically contains all the missing elements I could find, and there were hundreds of them. </B><TR></TR></TABLE></BODY> I removed unnecessary entries, in the javascript code, and changed other minor things such as <script LANGUAGE=VBScript> for <script TYPE="text/vbscript"> and the formatting. SystemReportV3.exe
  20. Just a couple of things to report on first run, 'Logon On Name' should say Logon Name Both the Logon Name and 'Computer Name' would be better in their original character case, not upper case.
  21. Well the quotation marks are not required, however, if you wish to explicitly start on the C: drive as opposed to the %SystemDrive%, then just type the following into the value data box.C: Nothing more is required at all!
  22. Firstly, there is a dedicated Forum area for WPI. <Edit> Secondly, although I've never used WPI, I've just looked at this, and the instructions not only don't state 'copy the comand line from my batch file into the wpi comaned line box', they appear on first view, to be pretty straight forward. </Edit>
  23. As I said before your gift to all of us would only actually be to some of us, not only are those paths different on many PCs, the intended users may also have the software you dont, AIM ICQ and YAHOO, for instance. I would still attempt the install without those entries at all, and hope that the software will complete the paths on first run. If you intend going on with this method, I would sugest you use a script to programatically attain each of the required paths. You would then need to use your script to generate the REG file using that data, or change to use VBS INF CMD etc. instead.
  24. I still cannot believe that on it's second day, and after a Moderator response, the opening post still contains serial numbers for commercial software!
×
×
  • Create New...