Jump to content

SibTiger

Member
  • Posts

    44
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Russian Federation

Posts posted by SibTiger

  1. @prathapml: RE: Monitor turn-off... you misunderstood what I meant by "one size fits all".

    With most registry tweaks, we don't need to export the setting to apply to other machines. But for changing the monitor turn-off time, I was advised to set it and export the registry key.

    I'll repeat my question: Is there a registry tweak that is easily changable for setting the monitor turn-off time to a set number of minutes? Or is the only method to take your favorite three settings and for each of them export 4 different registry keys with 30 character long hex codes?

    And if someone has the desire: Why did Microsoft need to make this registry setting so complicated and cryptic?!

  2. Here's a little trick that is useful for unattended installs. (I know, you VBS pros will laugh at me for posting this. This is for other newbies like me.)

    Situation: Program takes 20 seconds to install on a new computer, and a minute and a half on an old one. Not desirable to use "Sleep." While installing, the window "MyProg Installation" only has "Cancel" button. When it's finished, the button "Finish" appears. The following code sends ALT-F every second as long as "MyProg Installation" window exists. Alt-F has no effect while the program is installing, but when it's finished, ALT-F closes the final window.

    Do while WshShell.AppActivate ("MyProg Installation")
       WshShell.SendKeys "%{F}"
       WScript.Sleep 1000
    Loop

  3. Ah, now I found it.

    I did a search of MSFN for "ShowDriveLettersFirst" and only came up with one obscure hit. That's why I didn't think it appeared anywhere.

    Perhaps you could change the description for this tweak in your master list. "Display drives in longhorn mode" is not very clear! I had seen that before, but didn't understand what it did. Also, the description for setting 4 "All drive letters shown" doesn't explain that the drive letters are moved in front of the description (which is the reason most people would use this tweak!)

    One more idea: would it also make sense to post the tweaks as text so this thread is "hit" in site searches?

    Thanks for the exhaustive list you've put together!

  4. I thought I had every possible useful tweak imaginable, and then I found this one. Isn't it annoying how in "My Computer" the drive description comes before the drive letter? This tweak puts the drive letter in front where it belongs. :thumbup

    ; Show drive letters first

    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer]

    "ShowDriveLettersFirst"=dword:00000004

    All options:

    • 0 = Default display (drive letters after description)
    • 1 = Network drive letters first, Local drive letters after
    • 2 = Descriptions only, no drive letters displayed
    • 4 = Drive letters before description

  5. Someone posted code for watching for a particular window before sending keys. This was a suggested alternative to using "sleep." Seems like a great idea, but I'm not seeing install VBS's that employ this method! :(

    Can someone with some coding experience post a sample? Let's suppose this scenario:

    • Run setup.exe to install program: "MyProg"
    • Window pops up with title: "MyProg Installation". Need ALT-N to continue.
    • Window pops up with title: "MyProg File Associations". Need ALT-N to continue.
    • Program installs. Final window title: "MyProg install complete" Need ALT-C to close.

    I learn by trial and error and by seeing examples. If anyone could post this, I would be very thankful!

  6. Here's noob question. How do you include long file names in the script "run" command?

    Here's what I want to do:

    WshShell.run "C:\Program Files\My Program\run this file.exe"

    (I know the 8.3 file name will run this, but is there a way to use the long file names?)

  7. Newbie here... :rolleyes:

    I install apps from a USB HD. I had to read through all 29 pages to discover that WIN51 needed to be in the application install source path on my HD so %CDROM% would be set correctly. It's counter intuitive to use %CDROM% when you're installing from a HD!

    Would this be logical: Stop using the variable %CDROM% and use %SRCROOT% instead. If WIN51 is found on a CD drive, that becomes the source root for installations. If it isn't found, %SRCROOT% should default to the directory from which WPI was started. Also include an option to manually set %SRCROOT% in config.js.

    Second "wish" *.bat or *.cmd files started with WPI use C:\ as the working directory. Is it possible to make the default directory the path where the .bat or .cmd file is located? Or perhaps add a switch for setting the "working directory" for a given command?

    Thanks for a great, visually attractive app! :thumbup

    -SibTiger

  8. @Mazin... your amazing! I successfully slipstreamed the update, and it installs perfectly on a VM.

    Now, a slightly off-topic problem. On my physical computer, I no longer can open ACD Photo Editor 3.1. When I try to open it, I get a brief "hourglass" mouse pointer, then nothing.

    I've uninstalled ACDSee, deleted all "ACD" references from the registry, deleted all ACDSee folders in "Documents and Settings" and then reinstalled. But the problem continues. The problem can't be with my install source because it works fine on the VM.

    Any idea how to fix this?

  9. I think I know what happened. I attempted to slipstream the MSP update file into the MSI source. The result was a separate install source without any kind of MSI or setup.exe to start it all. But I think in the process the original MSI file was changed. Is that possible? I'll have to redownload ACDSee to test my theory since I don't have a back up. *sigh*

  10. For some reason, I cannot apply the upgrade to build 47 when I (clean) install with the method outlined at the beginning of this post.

    When I attempt to install the upgrade, I get the warning: "The upgrade patch cannot be installed... because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program..."

    I've tried this on my physical machine as well as on two clean Virtual Machine installs... same problem.

    Does anyone else have this problem? Any ideas how to fix this?!

  11. Is there a tweak for moving the hibernation file (hibersys.fil) to a different drive other than the system drive? (I know how to get rid of it, but I want to keep it... just on a different drive so I can still hibernate.)

    I've done lots of searching, and come up empty. Surely, this is an adjustable setting!

    Thanks! --SibTiger

  12. Here's a "no-hex" solution. :)

    Put this in a BAT or CMD file:

    (Substitute "d:\temp" for your location.)

    @echo off

    set mytemp=d:\temp

    REG ADD "HKCU\Environment" /f /v "TEMP" /d "%mytemp%"

    REG ADD "HKCU\Environment" /f /v "TMP" /d "%mytemp%"

    I think this change only takes effect after reboot.l

    Or in a REG file, enter the following:

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Environment]

    "TEMP"="D:\\temp"

    "TMP"="D:\\temp"

    (Again, replace "D:\\temp" with your directory.)

    --SibTiger

  13. *MOVE AND RESIZE PAGEFILE* CACHESET.CMD

    This batch file allows you to easily change the pagefile location and size. It also deletes on reboot any old pagefiles. You can set up pagefiles on up to 6 different drives.

    What it does:

    1) Asks for user to enter desired pagefile drive. (Checks to make sure drive exists.)

    2) Asks user to enter MIN size, then MAX size. (256, 384, 512, 768, 1024, 1536, 2048, 2560, or 3072MB)

    3) Asks if you want to set up additional pagefiles. Loop to 1).

    4) Adjusts pagefile in registry.

    5) Adds a RunOnce command to registry to delete old pagefile on reboot.

    6) Automatically restarts computer (15 second delay... can be aborted.)

    I learned a lot about batch files in developing this script! Maybe others can learn from this too. (Some unnecessary line breaks in the text below might mess up this script. I suggest you use the download link at end.) ---SibTiger

    ::Made by SibTiger  May 22, 2004 (Member of WWW.MSFN.ORG)

    ::Major revision: June 23, 2004

    ::   !!!ONLY TESTED ON WINDOWS XP!!!

    ::-----------------------

    :: This batch file allows you to easily change the pagefile location and size.

    :: It also deletes on reboot any old pagefiles. You can set up pagefiles on up

    :: to 6 different drives. *Assumes current pagefile(s) are named pagefile.sys

    :: and exist in the root directory. Don't use this batch file if this isn't true!

    ::-----------------------

    @echo off

    cls

    color 1F

    ::____Next line checks OS version.____

    if /i not '%OS%'=='Windows_NT' (

        echo *** This script designed for use with Windows XP only! ***

        echo     Press any key to abort...

        pause >NUL

        goto end

    )

    echo.

    echo              * CHANGE PAGEFILE SIZE AND/OR LOCATION. *

    echo   (NOTE: Recommend defragging target pagefile drive before continuing.)

    Echo.

    echo CURRENT PAGEFILE SETTINGS:

    ECHO.

    for %%F 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 /I exist %%F:\pagefile.sys (

          set %%F%%F=%%F

          echo     *** CURRENT PAGEFILE ON DRIVE %%F: ***

          dir /as %%F:\pagefile.sys | find "pagefile.sys"

          ECHO.

    )

    ::____Following lines set up the counter.____

    if exist %temp%\~counter.txt del %temp%\~counter.txt

    :setdrive

    if exist %temp%\~tmp.bat del %temp%\~tmp.bat

    echo X>> %temp%\~counter.txt

    set n=

    echo @echo off> %temp%\~tmp.bat

    echo.|set /p=set n=>>%temp%\~tmp.bat

    type %temp%\~counter.txt | find /c "X" >> %temp%\~tmp.bat

    call %temp%\~tmp.bat

    SET n=%n:~1,1%

    del %temp%\~tmp.bat >NUL

    ::____Following begins user input.____

    :reselect

    SET dr=

    set csizea=

    set csizeb=

    echo ------------------------------

    echo.

    SET /P dr=SELECT DRIVE LETTER FOR PAGEFILE

    IF NOT '%dr%'=='' SET dr=%dr:~0,1%

    ::____Check if selected drive letter is a valid drive.____

    echo This is a temporary file. Please delete. >%dr%:\~tmp.txt

    if not exist %dr%:\~tmp.txt (

         echo.

         echo Drive %dr% doesn't exist! Enter a different drive letter.

         goto reselect

         )

    del %dr%:\~tmp.txt

    ::____Checks if user already set the pagefile for given drive.____

    for %%f in (%dr1% %dr2% %dr3% %dr4% %dr5% %dr6%) do if /I '%%f'=='%dr%' goto inuse

    goto setsize

    :inuse

    ECHO Drive selected was already used for a pagefile.

    echo  (Scroll up to see selections you made.)

    echo.

    goto reselect

    :setsize

    set csizea=

    echo.

    set %dr%%dr%=

    echo ------------------------------

    echo.

    echo SELECT PAGEFILE SIZE

    echo    (Windows default: MIN=1.5 x RAM. MAX=3 x RAM.)

    echo    (Some experts claim better performance with MIN and MAX set same.)

    SET Choice=

    Echo.

    echo   MINIMUM SIZE

    echo     1 -  256MB

    echo     2 -  384MB

    echo     3 -  512MB

    echo     4 -  768MB

    echo     5 - 1024MB

    echo     6 - 1536MB

    echo     7 - 2048MB

    echo     8 - 2560MB

    echo     9 - 3072MB

    SET /P Choice=       (1,2,3,4,5,6,7,8,9)

    IF '%Choice%'=='1' set csizea=256

    IF '%Choice%'=='2' set csizea=384

    IF '%Choice%'=='3' set csizea=512

    IF '%Choice%'=='4' set csizea=768

    IF '%Choice%'=='5' set csizea=1024

    IF '%Choice%'=='6' set csizea=1536

    IF '%Choice%'=='7' set csizea=2048

    IF '%Choice%'=='8' set csizea=2560

    IF '%Choice%'=='9' set csizea=3072

    if not '%csizea'=='' goto setsize2

    echo.

    echo           !!!You must press 1,2,3,4,5,6,7,8 or 9. Try again.

    goto setsize

    :setsize2

    echo.

    set csizeb=

    SET Choice=

    echo ------------------------------

    Echo.

    echo   MAXIMUM SIZE (minimum was set to: %csizea%MB)

    echo     1 -  256MB

    echo     2 -  384MB

    echo     3 -  512MB

    echo     4 -  768MB

    echo     5 - 1024MB

    echo     6 - 1536MB

    echo     7 - 2048MB

    echo     8 - 2560MB

    echo     9 - 3072MB

    SET /P Choice=       (1,2,3,4,5,6,7,8,9)

    IF '%Choice%'=='1' set csizeb=256

    IF '%Choice%'=='2' set csizeb=384

    IF '%Choice%'=='3' set csizeb=512

    IF '%Choice%'=='4' set csizeb=768

    IF '%Choice%'=='5' set csizeb=1024

    IF '%Choice%'=='6' set csizeb=1536

    IF '%Choice%'=='7' set csizeb=2048

    IF '%Choice%'=='8' set csizeb=2560

    IF '%Choice%'=='9' set csizeb=3072

    if not '%csizeb'=='' goto editreg

    echo.

    echo           !!!You must press 1,2,3,4,5,6,7,8 or 9. Try again.

    goto setsize2

    :editreg

    ::____Checks that MIN is not greater than MAX___

       echo.

       if %csizea% GTR %csizeb% (

       ECHO ERROR! MIN (%csizea%) is greater than MAX (%csizeb%).

       echo Reenter sizes.

       echo.

       goto setsize

       )

    set cache%n%=%dr%:\pagefile.sys %csizea% %csizeb%\0

    set dr%n%=%dr%

    :c_list

    echo ------------------------------

    echo.

    echo     PAGEFILE WILL BE SET TO: %cache1%

    if not '%dr2%'=='' echo 2nd pagefile will be set to: %cache2%

    if not '%dr3%'=='' echo 3rd pagefile will be set to: %cache3%

    if not '%dr4%'=='' echo 4th pagefile will be set to: %cache4%

    if not '%dr5%'=='' echo 5th pagefile will be set to: %cache5%

    if not '%dr6%'=='' echo 6th pagefile will be set to: %cache6%

    echo.

    if '%n%'=='6' goto limit

    :loop3

    SET Choice=

    echo SETUP AN ADDITIONAL PAGEFILE?

    echo     (Some users "spread" the pagefile across multiple drives.)

    echo          "Y" - Add another pagefile.

    echo          "N" - Continue. Applies changes to registry and reboots.

    Echo.

    SET /P Choice=                (Y / N)

    IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%

    echo.

    IF /I '%Choice%'=='Y' goto setdrive

    IF /I '%Choice%'=='N' goto regchnge

    echo INVALID ENTRY: *%choice%*  Try again!

    echo.

    goto loop3

    :limit

    echo.

    echo *You have set 6 pagefiles. No more can be set with this script.*

    echo      Press any key to enter your settings in the registry.

    pause >NUL

    ::____REGISTRY CHANGES FOR PAGEFILE SIZE AND LOCATION____

    :regchnge

    del %temp%\~counter.txt

    REG ADD "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Memory Management" /f /v PagingFiles /t REG_MULTI_SZ /d "%cache1%\0%cache2%%cache3%%cache4%%cache5%%cache6%"

    REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /f /v PagingFiles /t REG_MULTI_SZ /d "%cache1%%cache2%%cache3%%cache4%%cache5%%cache6%"

    ::____CREATE _CLEAN.CMD to delete old pagefiles on reboot.____

    if exist c:\_clean.cmd del c:\_clean.cmd

    echo @echo off> c:\_clean.cmd

    echo rem Created automatically by cacheset.cmd on %date% at %time%.>> c:\_clean.cmd

    echo if exist c:\reboot.txt del c:\reboot.txt>> c:\_clean.cmd

    echo echo Old pagefile being deleted. Please wait...>> c:\_clean.cmd

    for %%F in (%cc%%dd%%ee%%ff%%gg%%hh%%ii%%jj%%k%%ll%%mm%%nn%%oo%%pp%%qq%%rr%%ss%%tt%%uu%%vv%%ww%%xx%%yy%%zz%) DO (

          echo attrib -s -h %%F:\pagefile.sys>> c:\_clean.cmd

          echo del /f /q %%F:\pagefile.sys>> c:\_clean.cmd

          )

    echo del /f /q c:\_clean.cmd>> c:\_clean.cmd

    ::____ADDS _CLEAN.CMD TO RUNONCE____

    REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v CLEANUP /d c:\_clean.cmd

    ::___Reboot routine___

    :reboot

    cls

    echo.

    echo               *** DONE!!! ***

    echo.

    echo **** MUST REBOOT FOR SETTINGS TO TAKE EFFECT. ****

    shutdown.exe -r -f -t 15 -c "Windows XP will now restart in 15 seconds..."

    echo.

    echo Automatic restart in 15 seconds. Press any key to abort.

    pause >NUL

    shutdown -a

    goto end

    :end

    cacheset.zip

×
×
  • Create New...