Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
I don't need to worry, I live and breath scripting; the point is that it shouldn't be done like this. For instance, check if the service is running, if it isn't start it. stop all running processes unless they are 'this', 'that' or 'the other' dynamically create the drive letter to be used.
-
No, I don't care whether it is a series of scripts or an application, I wouldn't be using it anyhow. The problem is that it uses inappropriate or less efficient commands and script types and has no regard for either the user or their system. The last thing I want to do in order to make a little more space on my system, is to create a new user, log in as them and as a consequence set up a whole new profile folder and contents. I don't want hard coded paths in a reg file, I don't want a folder creating somewhere on the root of my systemdrive without asking and the assumption that my temporary files need removing. I don't want this thing to run at a time and date of your choosing, I don't want processes stopping that don't exist, and I don't want services starting which may already be started. Most of all however, other than a routine to back up one branch of the registry, there is no error trapping at all being used. On this sort of thing, that makes this very dangerous to use.
-
Clearing the pagefile on shutdown should mean that it has no information inside it to require defragging! As you said, the scripts are by no means a finished product, but they don't just need tweaking, they need practically a re-write.
-
Is your registry file created correctly? To correctly create a registry file, your header must be followed by a blank line and the file should end with two blank lines If you use the Windows Registry Editor Version 5.00 header, the file should be encoded in Unicode format,(UCS-2 Little Endian). Using the REGEDIT4 header, the file should be encoded in ANSI format. Take a look at the attached example files: runex.reg is an incorrectly formed registry file, (what you've posted). a_runex.reg is a correctly formed registry file in ANSI format u_runex.reg is a correctly formed registry file in Unicode format Note the difference in size between the a_runex.reg and u_runex.reg files. runex.zip
-
I posted a vbscript in the last thread you started, which with very little alteration would do it. However, the problem as I've stated is that there are many empty directories still needed by the system, without knowing what all these are, especially on a customized install, the script would be dangerous to use.
-
It's not just adding a prompt that would bother me, here's my initial impressions. This thing is not very well designed, it uses a strange mix of .reg, .vbs, .bat and .cmd, assumes too much about the system upon which it is going to be blindly run. It doesn't perform sufficient checks prior to running, does things like including hard coded paths, deletes your pagefile, tries to shut down a bucket load of processes, the names for which are just guessed, deletes whatever it wants in the cleanmgr. I think it still has a good way to go before it should be released to unsuspecting users. The problem is that the type of person incapable of fully understanding the code is also the type of person most likely to want to use your scripts.
-
You could also try the attached one. <Edit> I have added the pertinent changes to a section at the bottom, of the [AddReg] and [DelReg] sections, of a clean version of HIVESYS.INF. All of your settings are taken into account and I have altered as little as possible of the original text from the clean file, commenting out only where necessary. You had just a few of the original settings which you had altered from their default values. They do not need editing as I have removed the NOCLOBBER settings where necessary and your later settings will overwrite those earlier in the file during the install. </Edit> Hope it helps! HIVESYS.zip
-
Okay, I've taken a look at you file, and must say that you appear to have done a very good job. I have only found one problem: 1.line 2685, is now HKLM,"System\CurrentControlSet\Services\a320raid\Parameters\Device, should be HKLM,"System\CurrentControlSet\Services\a320raid\Parameters\Device", or HKLM,System\CurrentControlSet\Services\a320raid\Parameters\Device, you missed a double quote
-
Nobody said anything about someone charging someone else. Asking for a fee would be just as rude as not offering one for a service which is only for commercial gain! The questioner asked for help, not someone to do it for them!
-
Help suggests you already have done some work on this already! What have you got? Also as this is for a business, were you considering payment to the person(s) responsible for helping in the production of this backup solution?
-
You are not looking at it in the correct type of text editor! All of those lines have continuation characters and are effectively all on the same line. Post your hive file as a compressed archive attachment.
-
Je suis aveugle! Terminé, mais il existe des erreurs sur la page.Another option: Check that your anti-virus program is not set to scan the Temporary Internet Files folder
-
Your HijackThis! log appears to be clean. Nearly the entire site is local to neufmois.fr, therefore it is not a HOSTS or zone setting problem. At the foot of your page, however as spotted already, it seems to say, something like, translated, Done, but with errors on page. The site works fine on my machine, meaning that it is not a server side page error. It also works fine in Opera and Firefox and also IE with both activex and scripting disabled The most likely fix would be to remove all the temporary Internet-related files from your computer: 1. Start Internet Explorer. 2. On the Tools menu, click Internet Options. 3. Click the General tab. 4. Under Temporary Internet files, click Settings. 5. Click Delete Files. 6. Click OK. 7. Click Delete Cookies. 8. Click OK. 9. Under History, click Clear History, and then click Yes. 10. Click OK. I hope this helps!
-
deleting all tmp and log files
Yzöwl replied to piXelatedEmpire's topic in Unattended Windows 2000/XP/2003
Your new line may say txt but before I corrected you it said DEL *LOG*.* /S. <Edit> Run this vbscript, see how many output folders it identifies: Function NumberOfFilesInFolder(FolderName) Dim fso, f, f1, fc, CountFiles Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(FolderName) Set fc = f.Files CountFiles = 0 For Each f1 in fc CountFiles = CountFiles + 1 Next NumberOfFilesInFolder = CountFiles End Function Function NumberOfFoldersInFolder(FolderName) Dim fso, f, f1, fc, CountFolders Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(FolderName) Set fc = f.SubFolders CountFolders = 0 For Each f1 in fc CountFolders = CountFolders + 1 Next NumberOfFoldersInFolder = CountFolders End Function Function TraverseSubFolders(StartFolderName) Dim fso, f, f1, sf, nFil, nFol Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(StartFolderName) Set sf = f.SubFolders For Each f1 in sf nFil = NumberOfFilesInFolder(f1) nFol = NumberOfFoldersInFolder(f1) if (CLng(nFil) = 0) And (CLng(nFol) = 0) Then Wscript.Echo f1 End If TraverseSubFolders(f1) Next End Function Function TraverseFolders(StartFolderName) Dim fso, f, f1, sf, nFil, nFol Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FolderExists(StartFolderName)) Then Set f = fso.GetFolder(StartFolderName) nFil = NumberOfFilesInFolder(f) nFol = NumberOfFoldersInFolder(f) if (CLng(nFil) = 0) And (CLng(nFol) = 0) Then Wscript.Echo f End If TraverseSubFolders(f) Else Wscript.Echo "Folder " & StartFolderName & " not found" Wscript.Quit End If End Function Dim WshShell, StartAtFolder Set WshShell = WScript.CreateObject("WScript.shell") StartAtFolder = WshShell.ExpandEnvironmentStrings("%SystemRoot%") TraverseFolders StartAtFolder </Edit> <Edit2> If you really didn't like my original for command, you could also have used the more simple DEL/A/S/F/Q "%SYSTEMROOT%\*.LOG" "%SYSTEMROOT%\*.TMP"since DEL actually takes multiple arguments! </Edit2> -
deleting all tmp and log files
Yzöwl replied to piXelatedEmpire's topic in Unattended Windows 2000/XP/2003
Yes it would basic list: winlogon.exe, netlogon.dll, eventlog.dll, seclogon.dll, logon.scr, logonui.exe, camlog30.bmp, chglogon.exe, convlog.exe, iislog51.dll, iologmsg.dll, iscomlog.dll, loghours.dll, login.cmd, logman.exe, logoff.exe, logscrpt.dll, logtemp.sql, logui.ocx, mqlogmgr.dll, msdtclog.dll, relog.exe, smlogcfg.dll, smlogsvc.exe, txflog.dll, usrlogon.cmd, zlogic.cyz, mslogo.jpg, oemlogo.gif, loginkey.dll, eqnlogr.exe, log.dll, reslog32.dll, xlog.exe, obelog.dll, mplogo.gif, mplogoh.gif, logagent.exe, wmdmlog.dll You haven't listed any ways!I have already stated, and believe me when I say it, there is no efficient way of using standard batch commands to delete 'all empty folders' I really do hope that you are not suggesting anything untoward about my character. Take a look at what you've said, look at my fully explained point about *log* then you can really apologize, because you are very definitely wrong! -
deleting all tmp and log files
Yzöwl replied to piXelatedEmpire's topic in Unattended Windows 2000/XP/2003
@ T D, why would someone want to remove all files with the string 'log' contained anywhere within its name? There is no logic, in telling people to delete all of their: logon scripts logo design criteria dialog resources competition slogans music catalogs *'ology study documents. I really think you should apologize. There are methods available for removing empty directories using batch files but they are not considered efficient or stable, (vbscript would perform the task much better). There is also the question of what constitutes an 'empty folder'. There are many empty directories within %windir% which are required by the system, therefore I am not willing to provide code here to do that. -
deleting all tmp and log files
Yzöwl replied to piXelatedEmpire's topic in Unattended Windows 2000/XP/2003
They wanted 'all subfolders' too! FOR %%? IN (log tmp) DO (DEL/A/S/F/Q "%SYSTEMROOT%\*.%%?") -
The Batch Guru CODE unfortunately forbids me to return a positive response on this occasion!
-
The /A switch is for ANSI export as you will see from the REGEDIT4 header in the output. I got it sent to me in the Secret Batch Gurus Almanac, which I had to destroy upon reading. There are two FINDSTR's, the first with the /N switch adds line numbers as you say, the second removes the unwanted value line if it exists. They are correct, the first is used for 'Guru' purposes, which may not be obvious.
-
Network activity icon in notification area
Yzöwl replied to school1282's topic in Unattended Windows 2000/XP/2003
Of course it can be done with a batch file @ECHO OFF &SETLOCAL ENABLEEXTENSIONS SET "KEY=SYSTEM\CurrentControlSet\Control\Network" SET "SID={4D36E972-E325-11CE-BFC1-08002BE10318}" FOR /F "TOKENS=*" %%? IN ( 'REG QUERY HKLM\%KEY%\%SID% /S^|FINDSTR \\Connection$') DO ( IF ERRORLEVEL 0 (REG QUERY %%?|FIND "Local Area Connection" >NUL 2>&1 &&( REG ADD "%%?" /V ShowIcon /T REG_DWORD /D 1 /F>NUL))) ENDLOCAL &GOTO :EOF -
Here is the information I sent to Djé. I have only really changed The regedit stuff to ignore unicode altogether! Merged the two files together which I had initially left as seperate files. @ECHO OFF >NUL PUSHD %~dp0 IF "%1" EQU "" (GOTO BACKUP) ECHO %* |FINDSTR/I [-/]R >NUL 2>&1 ||( ECHO/ Invalid Switch! ECHO/ Use %~n0 [-r^|/r] to restore. GOTO END) TITLE Restoring Taskbar and Quick Launch IF NOT EXIST _QK_LNCH (IF NOT EXIST _TASKBAR.REG ( ECHO/ No backups found in %~dp0 ECHO/ Use %~n0 to create a backup first.)) SETLOCAL SET "QL=Microsoft\Internet Explorer\Quick Launch" XCOPY _QK_LNCH "%APPDATA%\%QL%" /IQHRKY >NUL 2>&1 REGEDIT /S _TASKBAR.REG 2>NUL GOTO END :BACKUP TITLE Taskbar and Quick Launch Back-up SETLOCAL SET "QL=Microsoft\Internet Explorer\Quick Launch" SET "EX=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" XCOPY "%APPDATA%\%QL%" _Qk_Lnch /DIQHRKY >NUL 2>&1 REGEDIT/A _TASKBAR.REG %EX%\Streams\Desktop REGEDIT/A _X_.REG %EX%\StuckRects2 FOR /F "SKIP=1 TOKENS=1* DELIMS=:" %%a IN ( 'FINDSTR/N ".*" _X_.REG ^|FINDSTR/VIC:"\"UPGRADE\"="') DO ( IF ERRORLEVEL 0 (>>_TASKBAR.REG ECHO/%%b)) DEL _X_.REG ECHO/ ECHO/ ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ECHO/ Taskbar settings and QuickLaunch shortcuts backed-up to ECHO/ %~dp0 ECHO/ To restore to the system, just use the command: %~n0 [-r^|/r] ECHO/ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ECHO/ :END >NUL PING -n 6 LOCALHOST GOTO :EOFLets hope it helps quell some of the bickering! <Edit> Had to edit because '%%b)' looked like '%%B)' Added the /I switch to XCOPY as noted below by Djé </Edit>
-
What about calling this recon.cmd @START "" /W %~d0\I386\WINNT32 /CMDCONS /UNATTENDand putting it in \HFSVPK I was under the impression that the command doesn't work before normal setup has finished so I have no idea whether this will work.
-
Use and , you will get scrollbars instead of wrap. The only problem this presents is it is really ugly if you require less than about six lines of code, because there is a minimum box height set. Also bear in mind that in most coding it is generally accepted good practice to keep your lines to less than 80 characters in length.