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. Well strictly speaking, the runonceex.cmd code will run fine, however, your files are in the wrong place. Anything inside $OEM$ structure is copied to the hard drive, if you want to install from CD-ROM then put the application in xpcd\install In your case you would have to change the runonceex.cmd to say REG ADD %KEY%\000 /V 1 /D "%PP%\AdobeReader\AdbeRdr707_en_US.exe /silent" /Fand put your application in xpcd\Install\AdobeReader
  2. Here's yours fixed On Error Resume Next Dim oFSO Dim sDirectoryPath Dim oFolder Dim oFileCollection Dim oFile Dim iDaysOld iDaysOld = 3 Set oFSO = CreateObject("Scripting.FileSystemObject") sDirectoryPath = "C:\testfolder\" set oFolder = oFSO.GetFolder(sDirectoryPath) set oFileCollection = oFolder.Files For each oFile in oFileCollection If oFile.DateLastModified < (Date() - iDaysOld) Then oFSO.CopyFile oFile, "D:\test2\", OverwriteExisting End If Next Set oFSO = Nothing Set oFolder = Nothing Set oFileCollection = Nothing Set oFile = NothingOr you could try this! Dim fso, f, f1 SrcDir = "C:\testfolder\" DesDir = "D:\test2\" MorOld = 3 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(SrcDir) For Each f1 in f.Files If DateDiff("d", f1.DateLastModified, Now) > MorOld Then fso.CopyFile f1, DesDir, True End If Next Set fso = Nothing Set f = Nothing
  3. Actually since the running batch file isn't read-only or a global wildcard, you will only need del %0as the last line of your script
  4. What is clear about posting problems about another product called blocklist inside a thread about an unrelated product with the same name, hence my unrelated tongue-in-cheek response. How about posting it as a new thread in an appropriate location and request for it and any related responses to it be removed by the Mods then!
  5. What on earth If the above sounds harsh then sorry, but what exactly is it you are wanting help with. The blocklist only adds 'dubious' sites to a restricted sites list. If you need access to one of those sites then remove it from your restricted sites. At the top of the dialog within your graphic, there will be, (sorry I don't have a magnifying glass), a domain name matching one in the list; that is likely what you need to remove. The blocklist will not prevent the installation of a program, it may however prevent access to a site where an online installation could be undertaken. This is actually a good indication that the list is doing it's job, please therefore note that there is likely a good reason why that site is on the list in the first place.
  6. Simple answer… The registry data, (indicated by the /D switch), should be sat inside double quotes i.e. /D "your data in here" Any double quotes needed within this data is simply prefixed with a backslash as an escape character, (\"). "C:\MsnMsgs75.msi IAGREE=\"Yes\" ADDEXPLORERTOOLBAR=\"\" SETSEARCHENGINE=\"\" SETHOMEPAGE=\"\" /qb-"
  7. This is untested, and therefore only for idea purposes, but why all that code. I was just thinking that you could do without copying the file over and code it to use one or the other locations a little smarter. @ECHO OFF &SETLOCAL SET "TAG=WIN51" FOR /F %%? IN ('MOUNTVOL^|FIND ":\"') DO (IF EXIST %%?%TAG% (SET OEM=%%?OEM)) PUSHD %OEM%||PUSHD %SYSTEMDRIVE% FOR %%? IN (7ZA SETDEVICEPATH WATCHDRIVERSIGNINGPOLICY) DO (IF NOT EXIST %%?.EXE (GOTO :EOF)) FOR /F %%? IN ("*DRIVE*.7Z") DO (7ZA.EXE X -Y -AOA %%? -O%SYSTEMDRIVE%) 7ZA.EXE X -Y -AOA %SYSTEMDRIVE%\000_WINDIR.7Z -O%SYSTEMROOT% FOR %%? IN (000_ DRIVE) DO (IF EXIST %SYSTEMDRIVE%\%%?*.7Z DEL %SYSTEMDRIVE%\%%?*.7Z) SETDEVICEPATH %~d0\D START WATCHDRIVERSIGNINGPOLICY<Edit> Updated hopefully to match latest update above </Edit>
  8. @ Gouki It just depends how you want to use your system, if you want minimum components and have the time to check compatability of every new application for things it will, by default, expect to be there, then that's fine by me. You may know full well whether you intend to use a component, but you've no idea whether future addons, updates, fixes and applications will. People who have the time and inclination to do that are welcome to do so, but that use is more specialist and should remain so. Most users are best advised to leave them in, due to those OS exploits, any hotfix created will need to be carefully analyzed and tested on your individual installation for both necessity and compatability. This section of the board is not dedicated to that sort of specialization, and although, subject to the moderators, you are free to post whereever you want, the problem is that on a daily basis I see posts here from people wanting help after having removed things which were designed to be there.
  9. Okay, I Googled microwinX and found it to be a specialist version of XP with its own section on these boards. This is not the correct forum for that project so please keep its discussion to its own area. However, as you should know both the COM+ services in both Pro and Home editions, are set to Manual. Therefore if you don't need them, they will not run and therefore will not degrade performance.
  10. I'm sure that many arguments will ensue on this, but: Having a bunch of services which are never used will not degrade performance. Removing a bunch of services, which may in the future be required will degrade performance. To be quite honest other than disabling the indexing service, I am yet to see any real benefit in changing any of SP2s default Automatic service configurations. Most people here will have 1GB or more of RAM and a hard drive in excess of 80GB, so what loss in real terms is there by taking out or disabling parts of the OS, which may some day be required.
  11. Just for information for anyone who didn't understand, the methods I provided in my examples were not just to find the correct folder locations, they actually create the shortcuts on the fly too. As a batch freak, I would have provided a batch method, had I not had to also use vbs or inf with it in order for the shortcut creation.
  12. Here is an example batch file for Windows XP. It changes the last found CD-ROM drive letter to one of your choice. To run it enter CDNowTo x where x is the drive letter you require and CDNowTo is the name of the batch file I have commented it for you to understand how it works, since I will not be making requested changes to it. CDNowTo.cmd: @ECHO OFF &SETLOCAL ENABLEEXTENSIONS ::Set window parameters MODE 49,4 &COLOR F2 &TITLE Script By Yz”wl :: Set variable for required Drive Letter, quit if not given SET "INP=%*" IF NOT DEFINED INP GOTO ENDIT SET "INP=%INP:~0,1%" :: Quit if INPut drive letter already exists MOUNTVOL |FIND "%INP%:\" >NUL 2>&1 &&GOTO ENDIT :: Get last CD Drive letter FOR /F %%? IN ('MOUNTVOL ^|FIND ":\" ^|FIND /I /V "A:\"') DO (FSUTIL FSINFO DRIVETYPE %%? |FIND /I "CD-ROM" >NUL 2>&1 &&SET CDROM=%%?) :: Quit if CDROM does not exist IF NOT DEFINED CDROM GOTO ENDIT :: Quit if CDROM is already INPut drive IF /I "%CDROM%" EQU "%INP%:\" GOTO ENDIT :: Ensure upper case variable for INPut drive FOR /F "TOKENS=4 DELIMS=? " %%? IN ('FC ?%INP% : 2^>^&1') DO CALL SET "NEWDRIVE=%%NEWDRIVE%%%%?:" :: Set variables for registry key and value names SET "REGKEY=HKLM\SYSTEM\MountedDevices" SET OLDVALNAME="\DosDevices\%CDROM:~0,2%" SET NEWVALNAME="\DosDevices\%NEWDRIVE%" :: Query existing registry data FOR /F "SKIP=1 TOKENS=3 DELIMS= " %%? IN ('REG QUERY %REGKEY% /V %OLDVALNAME%') DO (SET DATA="%%?") :: Add new registry information, quit if unsuccessful REG ADD %REGKEY% /V %NEWVALNAME% /T REG_BINARY /D %DATA% >NUL 2>&1 ||GOTO ENDIT :: Delete old registry information REG DELETE %REGKEY% /V %OLDVALNAME% /F >NUL :: give a message to the user for 10 seconds ECHO/&ECHO/ CD-ROM drive letter changed from %CDROM:~0,2% to %NEWDRIVE% ECHO/&ECHO/ For the changes to take effect PLEASE REBOOT... PING -n 11 LOCALHOST>NUL :ENDIT ENDLOCAL &GOTO :EOFOn line 32 DELIMS=<TAB>
  13. I solved your problem, you just couldn't be bothered to use my advice. Your reg file structure was incorrect, you needed a blank line between the REGEDIT4 header and the first line. You've fixed it, not by changing the header to Windows Registry Editor Version 5.00, but by creating this blank line. So instead of complaining about the lack of replies, you should have actually used the advice given in the first instance!
  14. Technically no, what is actually required for the original question is to run the batch file with stderr and stdout redirected mybatch.cmd >nul 2>&1There may be a problem with this syntax however from GuiRunOnce in winnt.sif.
  15. Here's an idea, change your reg file to this: REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Eset\Nod\CurrentVersion\Info] "View_CLSID"=dword:00000000
  16. Most of the time I think we tend to get a little scared of VBScript. If we only need to run a quick command hidden we can meet it half way, remove all the set and dim and const bulk and just invoke a vbs using more familiar batch type coding. Here is an example, it will run the command completely hidden, it will count for 10 seconds and create a directory in the current location called testdir CmdLine="ping -n 11 localhost>nul &&MD testdir" CreateObject("WScript.Shell").run "%comspec% /c " &CmdLine,0,True
  17. Its only a thought, but if TargetPath accepts \WINDOWS why not try ProgramFilesDir = \Programs CommonProgramFilesDir = \Programs\Common
  18. It's amazing how often doubling up is overlooked in place of Chr(34). I usually find it easier to test by replacing WshShell.Run with WScript.Echo and look at the screen output. Anyway glad to have helped
  19. Why not just replace the backslash escape characters with double quotes WshShell.Run("D:\WMP10.exe /q:A /c:""setup_wm.exe /Q /R:N /DisallowSystemRestore""", 1, True)
  20. Try using either VBS or INF instead VBS Const STMENPROG = &H2& Const MYDOCUMENTS = &H5& Const WINDOWS = &H24& Set oShell = CreateObject("Shell.Application") Set oAllStMen = oShell.Namespace(STMENPROG).Self Set oMyDocu = oShell.Namespace(MYDOCUMENTS).Self Set oWinDir = oShell.Namespace(WINDOWS).Self Set WShell = WScript.CreateObject("WScript.Shell") Set oShellLink = WShell.CreateShortcut(oAllStMen.Path &"\Notepad.lnk") oShellLink.TargetPath = oWinDir.Path &"\notepad.exe" oShellLink.WorkingDirectory = oMyDocu.Path oShellLink.Save INF (ProfileItems) [Version] Signature = $Windows NT$ [DefaultInstall] ProfileItems = TestLink [TestLink] Name = Notepad,1 CmdLine = 10,,notepad.exe WorkingDir = 16389 INF (UpdateInis) [Version] Signature = $Windows NT$ [DefaultInstall] UpdateInis = TestLink [TestLink] setup.ini, progman.groups,, "group0=""%16386%\""" setup.ini, group0,,"Notepad,""""""%10%\notepad.exe"""""",,,,""%16389%"""</Edit>
  21. First of all, you knew that you'd used the incorrect tags before you'd posted (no 'This post has been edited by') Secondly, now you know how to do it, try fixing the post, as requested. Thirdly, commented lines in NT batch scripting use :: not '
  22. School, is a place of study and learning. All the reference material is already on both these forums and the unattended guide. Study them and you will learn
  23. Yes, all CMDOW is doing in this case is hiding the cmd window. Since there is no need to turn echoing off, the only thing required in your example is to alter the first line to prevent that being echoed too@cmdow @ /hid
  24. It says alternatively, therefore either cmdow @ /HID @Echo Off FOR %%i IN (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:\CD.txt SET CDROM=%%i:or SetLocal enableextensions SET CDROM=%~d0 However, the first example is still badly advised, but that is a matter for the unattended guide and not really of concern to yourself.
  25. No, I don't think you've quite got a hold of the actual problem. elajua, appears to have an installed system already, with which they are preparing a new cd source. In this source, they wish to add some software to be installed with the new cd. What they want to do is put some shortcuts into the source cd to be copied over during the install, however the software they are adding to the cd is not installed on their running system. Without a target on the currently running system they cannot create the shortcuts to those targets. Their best choice would be to create the shortcuts during the install, using inf, vbs or a 3rd party utility. Below is a cmd file which will create, run and delete an inf which will create a shortcut to a non-existant file. Run it first, then edit it as you see fit. @ECHO OFF &SETLOCAL ENABLEEXTENSIONS SET "OFile=%TEMP%\_Linx_.inf" >%OFile% ECHO [Version] >>%OFile% ECHO Signature = $Windows NT$ >>%OFile% ECHO/ >>%OFile% ECHO [DefaultInstall] >>%OFile% ECHO UpdateInis = TestLink >>%OFile% ECHO/ >>%OFile% ECHO [TestLink] >>%OFile% ECHO setup.ini, progman.groups,, "group0=""%%16400%%\""" >>%OFile% ECHO setup.ini, group0,,"""Non-existant File"",""""""%%16422%%\Parent\Child\MadeUp.exe""""""" RUNDLL32 SETUPAPI,InstallHinfSection DefaultInstall 132 %OFile% &&DEL "%OFile%" ENDLOCAL &GOTO :EOF
×
×
  • Create New...