Jump to content

nakira

Member
  • Posts

    118
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Japan

Posts posted by nakira

  1. He said he has a whole lot of them and can you imagine what pain that would be to do that for each and every one? Be easier to export that reg location HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts and add it to his cleanup.cmd along with the file copy above

    Of course you can use a regfile to import them, that was mainly to show the entry path.

    Either way beats opening/closing fonts folder. :D

  2. Using the /integrate switch at the end causes it to be added as a parameter to the command.

    Try this... (change time accordingly). If you use it in a cmd window you'll see "Added a new job with job ID = X"

    at 11:15 /interactive /every: "C:\Documents and Settings\Daniel Towns\My Documents\Text files\landlord.txt"

    Or this variant, to have it run on the 1st day of the month

    at 11:15 /interactive /every:1 "C:\Documents and Settings\Daniel Towns\My Documents\Text files\landlord.txt"

    C:\>at /?

    The AT command schedules commands and programs to run on a computer at

    a specified time and date. The Schedule service must be running to use

    the AT command.

    AT [\\computername][ [id] [/DELETE] | /DELETE [/YES]]

    AT [\\computername] time [/iNTERACTIVE] [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

    \\computername Specifies a remote computer. Commands are scheduled on the

    local computer if this parameter is omitted.

    id Is an identification number assigned to a scheduled

    command.

    /delete Cancels a scheduled command. If id is omitted, all the

    scheduled commands on the computer are canceled.

    /yes Used with cancel all jobs command when no further

    confirmation is desired.

    time Specifies the time when command is to run.

    /interactive Allows the job to interact with the desktop of the user

    who is logged on at the time the job runs.

    /every:date[,...] Runs the command on each specified day(s) of the week or

    month. If date is omitted, the current day of the month

    is assumed.

    /next:date[,...] Runs the specified command on the next occurrence of the

    day (for example, next Thursday). If date is omitted, the

    current day of the month is assumed.

    "command" Is the Windows NT command, or batch program to be run.

  3. A couple of things here

    1.

    for /f "tokens=3 skip=2" %%i in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SourcePath') do set cddrive=%%~di

    SET PP=%cdrom%\$1\Apps\

    ^^ Also, if the apps are in '$oem$\$1\Apps' then they will be copied to HDD and can/should be run from there. For that you can more simple use...

    set PP=%systemdrive%\Apps\

    (no need to use the /for line)

    2.

    Some unescaped quotes in this line -- this is where your too many parameters error is

    REG ADD %KEY%\000 /V 1 /D "%PP%AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""" /f

  4. The Apps folder as you described above is not inside $oem$\$1 so it won't be copied. Not that it matters with the runonceex.cmd you posted anyway as that sets the progs to be run from <CD>:\Apps\...

    There is nothing in the cmd you posted to cause 'too many parameters' errors.

    edit:

    In fact here is the results

    for /f "tokens=3 skip=2" %%i in (
    'REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SourcePath'
    ) do set cdrom=%%~di

    SET PP=%cdrom%\Apps\

    SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

    REG ADD %KEY% /V TITLE /D "Installing Programs" /f

    REG ADD %KEY%\000 /VE /D "Paint Dot Net" /f
    REG ADD %KEY%\000 /V 1 /D "%PP%PaintNET.exe" /f

    REG ADD %KEY%\001 /VE /D "Daemon Tools" /f
    REG ADD %KEY%\001 /V 1 /D "%PP%daemontool.exe" /f

    REG ADD %KEY%\002 /VE /D "Directx 8.1 for Windows NT" /f
    REG ADD %KEY%\002 /V 1 /D "%PP%DX81NTeng.exe /Q" /f

    REG ADD %KEY%\003 /VE /D "Real Alternative" /f
    REG ADD %KEY%\003 /V 1 /D "%PP%RealAlternative.exe /VERYSILENT /SP-" /f

    REG ADD %KEY%\004 /VE /D "QuickTime Alternative" /f
    REG ADD %KEY%\004 /V 1 /D "%PP%QuickTimeAlternative.exe /VERYSILENT /SP-" /f

    REG ADD %KEY%\005 /VE /D "Quickpar Data Repair" /f
    REG ADD %KEY%\005 /V 1 /D "%PP%QuickPar.exe" /f

    REG ADD %KEY%\006 /VE /D "Microsoft Reader" /f
    REG ADD %KEY%\006 /V 1 /D "%PP%MSReader.exe" /f

    REG ADD %KEY%\007 /VE /D "Java Virtual Machine" /f
    REG ADD %KEY%\007 /V 1 /D "%PP%jre505.exe" /f

    REG ADD %KEY%\008 /VE /D "Mozilla Firefox" /f
    REG ADD %KEY%\008 /V 1 /D "%PP%firefoxsilent.exe" /f

    REG ADD %KEY%\009 /VE /D "Microsoft Dot Net 2.0" /f
    REG ADD %KEY%\009 /V 1 /D "%PP%dotnet2.exe" /f

    REG ADD %KEY%\010 /VE /D "Acrobat Reader 6.0" /f
    REG ADD %KEY%\010 /V 1 /D "%PP%acroread604.exe" /f
    pause

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]
    "TITLE"="Installing Programs"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\000]
    @="Paint Dot Net"
    "1"="L:\\Apps\\PaintNET.exe"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\001]
    @="Daemon Tools"
    "1"="L:\\Apps\\daemontool.exe"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\002]
    @="Directx 8.1 for Windows NT"
    "1"="L:\\Apps\\DX81NTeng.exe /Q"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\003]
    @="Real Alternative"
    "1"="L:\\Apps\\RealAlternative.exe /VERYSILENT /SP-"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\004]
    @="QuickTime Alternative"
    "1"="L:\\Apps\\QuickTimeAlternative.exe /VERYSILENT /SP-"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\005]
    @="Quickpar Data Repair"
    "1"="L:\\Apps\\QuickPar.exe"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\006]
    @="Microsoft Reader"
    "1"="L:\\Apps\\MSReader.exe"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\007]
    @="Java Virtual Machine"
    "1"="L:\\Apps\\jre505.exe"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\008]
    @="Mozilla Firefox"
    "1"="L:\\Apps\\firefoxsilent.exe"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\009]
    @="Microsoft Dot Net 2.0"
    "1"="L:\\Apps\\dotnet2.exe"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\010]
    @="Acrobat Reader 6.0"
    "1"="L:\\Apps\\acroread604.exe"

  5. Create keys under [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons]

    as in this example

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C\DefaultIcon]
    @="%Windir%\\Web\\MyImages\\C.ico"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D\DefaultIcon]
    @="%Windir%\\Web\\MyImages\\D.ico"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\E]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\E\DefaultIcon]
    @="%Windir%\\Web\\MyImages\\E.ico"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\F]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\F\DefaultIcon]
    @="%Windir%\\Web\\MyImages\\F.ico"

  6. You are typing the command into a cmd.exe window and not the run dialog, right? :)

    Start > Run > (type) cmd.exe

    You type the line in the window called "Command Prompt"

    It doesn't really matter anyway, echo doesn't actually check if the directory does exist, it simply outputs what you type in after expanding any environment variables.

    Better to use something that depends on the directory existng fo rits output, like

    dir "%userprofile%\recent"

    or

    if exist "%userprofile%\recent" echo Yes

  7. You need to add quotes around the first two key names as they have a space in them

    Reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v TEMP /t REG_EXPAND_SZ /d "%%SystemRoot%%\Temp" /f>Nul
    REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v TMP /t REG_EXPAND_SZ /d "%%SystemRoot%%\Temp" /f>Nul

×
×
  • Create New...