Jump to content

`Felix`

Member
  • Posts

    482
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Australia

Posts posted by `Felix`

  1. Felix, I have a few issues with your script. After each detection AU sets the next detection to a random time between 16.5 and 22 hours forward so the NextDetectionTime value is unneeded. The ScheduledInstallDate value is set after an update has been downloaded and has no effect of there are no updates waiting to be installed. Deleting the SetupWizardLaunchTime value is not needed because the AU client deletes this key if AUOptions is anything other than 0.

    If you want a script here's a much cleaner script:

    NET STOP "Automatic Updates"
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions REG_DWORD /d 00000004
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v ScheduledInstallDay REG_DWORD /d 00000000
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v ScheduledInstallTime REG_DWORD /d 00000003
    NET START "Automatic Updates"
    WUAUCLT /DETECTNOW

    My script also restarts the service so the changes take effect and forces a detection and doesn't need any temporary files.

    Good stuff and thanks for the clarification. I was just doing some checking of the registry as i made changes manually and put the script together based on that... Always happy to be wrong, as long as i learn from the mistakes :D

    I will give your script a test this evening.

  2. Here is a cmd file that will do it all for you in one go... has been tried and tested :D

    @echo off
    :: Here is a quick way to split the date into parts.
    :: Supports yyyy-dd-mm, yyyy-mm-dd, mm-dd-yyyy, and dd-mm-yyyy,
    :: doesn't rely on dashes vs slashes.

    for /f "tokens=2,*" %%d in ("%date%") do set today=%%d

    echo. | date | find "(yy" > nul
    if !%errorlevel%!==!0! (
    set year=%today:~0,4%
    echo. | date | find "mm)" > nul
    if !%errorlevel%!==!0! (
    set month=%today:~-2%
    set day=%today:~-5,2%
    ) else (
    set month=%today:~-5,2%
    set day=%today:~-2%
    )
    ) else (
    set year=%today:~-4%
    echo. | date | find "(mm" > nul
    if !%errorlevel%!==!0! (
    set month=%today:~0,2%
    set day=%today:~3,2%
    ) else (
    set month=%today:~3,2%
    set day=%today:~0,2%
    )
    )

    :: Write the registy file for import with the correct date and time

    echo Windows Registry Editor Version 5.00 > %tmp%\wuset.reg
    echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update] >> %tmp%\wuset.reg

    :: Change this option below to what you want your configuration to be...
    :: dword:00000004 = Automatic (recommended)
    :: dword:00000003 = Download updates for me, but let me choose when to install them.
    :: dword:00000002 = Notify me but don't automatically download or install them
    :: dword:00000004 = Turn off Automatic Updates (not recommended!)
    echo "AUOptions"=dword:00000004 >> %tmp%\wuset.reg

    echo "ConfigVer"=dword:00000001 >> %tmp%\wuset.reg

    :: You can change the default time for checking from 3am (below and default) to what you like...
    echo "NextDetectionTime"="%year%-%month%-%day% 03:00:00" >> %tmp%\wuset.reg
    echo "ScheduledInstallDate"="%year%-%month%-%day% 03:00:00" >> %tmp%\wuset.reg
    echo "ScheduledInstallDay"=dword:00000000 >> %tmp%\wuset.reg
    echo "ScheduledInstallTime"=dword:00000003 >> %tmp%\wuset.reg
    echo "SetupWizardLaunchTime"=- >> %tmp%\wuset.reg

    :: Now apply the correct settings to the registry
    regedit /s "%tmp%\wuset.reg"

    :: Clean-up - Delete the reg file after use
    del /f /q "%tmp%\wuset.reg"

    Enjoy :D

  3. Suggestion taken on board, thank you. I have one for you too, if you want it... Avoid the need for StartX by making 7Zip installers. Makes the configuration of everything else much simpler. I just made one for VMWare that includes the serial, all nicely packaged into one switchless exe file.

    Yes i have been doing that with a heap of applications... be aware though that if you read up about creating 7-zip installers, you do still require the startx.exe or msistub.exe for use with msi files in most if not all cases.

    Also i didn't want to add time to the installation process by archiving the applications when i have plenty of space on my DVD. Some things that are small, i have created 7-zip installers from, but office is huge, as are some other things and as such i would prefer to leave uncompressed as i don't need to worry about space.

    Good suggestion and valuable for most people reading the thread though :D

  4. Thanks again Simon - I am still testing and i should have taken the rest of the stuff out, as i was mainly working to get the msi and msp files working.

    Can i make some further suggestions...

    1. Would be great to have an in-built %CDROM% detect for example

    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:\preinst.ini SET CDROM=%%i:

    2a. A common thing that lots of people will do is add registry settings - so i suggest that if the line is something like

    apps\registryfix\register.reg

    That your app reads the .reg part and automatically prefaces the line with REGEDIT /S

    2b. A similar thing could be done for .msi and .msp files. e.g. startx /wait msiexec /i for .msi and startx /wait msiexec /update for .msp

    3. Allot of people will also obviously be running cmd/dos commands and will want them hidden. Have you had a look at RunHiddenConsole (the source is in the thread) You may like to include this in your app so that cmd/dos windows are hidden.

    Just some thoughts & suggestions :D

  5. Thanks for your reply and help simon...

    I have finally cracked it after thinking about it and doing some further testing. Firstly i remembered that you need to use "StartX.exe" with msi's used in this manner (start /wait - will not work)... and of course you need to call the complete command string. So below is the correct syntax etc to actually run msi's from your util. You may want to include this information in your documentation. Also for anyone that does have STARTX.EXE - you can download it here

    Application Installer Configuration File
    ----------------------------------------
    #The 5 tags below are crucial for the program to run
    #Edit by all means but do not delete or comment them out!!!
    <TiTle>Application Installation
    <Text1>Installing Your Software Please Wait.....
    <Text2>Currently installing
    <Font>system
    <ProgColor>blue
    ----------------------------------------
    #Any combination of tags <lbl> <prg> or <dos> can be used below,
    #but every <lbl> tag will be counted when updating the progress bar.
    #KEY: <lbl>Text label of action (EG 'Installing Blah Blah').
    # <prg>A program or command to be run from this location.
    # <dos>The same as using Start\Run (EG. Terminate).
    #
    <lbl>Gif Movie Gear 4.2
    <prg>apps\moviegear\moviegear42.exe /VERYSILENT
    <dos>apps\moviegear\moviegear-cleanup.cmd
    <dos>REGEDIT /S apps\moviegear\register.reg
    <lbl>Macromedia Dreamweaver 8.01
    <prg>startx /wait "msiexec /i apps\dreamweaver\dw\dreamweaver8.msi /qb-!"
    <prg>startx /wait "msiexec /update apps\dreamweaver\patchpackage.msp /qb-!"
    <dos>apps\dreamweaver\license.exe
    <lbl>VMware Workstation 5.5
    <prg>startx /wait "msiexec /i apps\vmwarewkst\VMware_Workstation.msi /qb-!"
    <prg>REGEDIT /S apps\vmwarewkst\register.reg
    <lbl>Quick Batch File Compiler 2.0.7.0
    <prg>apps\utils\qbfc2070.exe
    <lbl>Registry Fix 3.0
    <prg>apps\registryfix\registryfix.exe /VERYSILENT
    <dos>REGEDIT /S apps\registryfix\register.reg

    Hope this information is valuable. Further if you are running clean-ups of shortcuts and other stuff as i am here, then i suggest as Simon has earlier to run each app and related clean-up, reg adds etc from a cmd file. You can hide them easy with cmdow or even better RunHiddenConsole.

  6. Hi there Simon,

    Well i have been trying to get this little tool to go for days and have tried all manner of things to make it work without success. You will see my bit of test preinst.ini file below. From this when run i can get the first and the last option to install without problems, however nothing else installs as it should. They flash up, but the installers don't run.

    Please tell me where i am going wrong?

    Application Installer Configuration File
    ----------------------------------------
    #The 5 tags below are crucial for the program to run
    #Edit by all means but do not delete or comment them out!!!
    <TiTle>Application Installation
    <Text1>Installing Your Software Please Wait.....
    <Text2>Currently installing
    <Font>system
    <ProgColor>blue
    ----------------------------------------
    #Any combination of tags <lbl> <prg> or <dos> can be used below,
    #but every <lbl> tag will be counted when updating the progress bar.
    #KEY: <lbl>Text label of action (EG 'Installing Blah Blah').
    # <prg>A program or command to be run from this location.
    # <dos>The same as using Start\Run (EG. Terminate).
    #
    <lbl>Gif Movie Gear 4.2
    <prg>apps\moviegear\moviegear42.exe /VERYSILENT
    <dos>apps\moviegear\moviegear-cleanup.cmd
    <dos>REGEDIT /S apps\moviegear\register.reg
    <lbl>Macromedia Dreamweaver 8.01
    <prg>apps\dreamweaver\dreamweaver8.msi /qb-!
    <dos>apps\dreamweaver\patchpackage.msp /qb-!
    <dos>apps\dreamweaver\license.exe
    <lbl>VMware Workstation 5.5
    <prg>apps\vmwarewkst\VMware_Workstation.msi /qb-!
    <dos>REGEDIT /S apps\vmwarewkst\register.reg
    <lbl>Quick Batch File Compiler 2.0.7.0
    <prg>apps\utils\qbfc2070.exe

  7. @Felix. Thank you for your feedback. Compiling within Visual Studio 6 is just a case of clicking 'File/Make ****.exe'.

    I know I've said it's a 'Final' version, but doubtless I'll still need to make some revisions at some point. I've listened to comments and I'm definately listening to your requests.

    I've started writing up some new coding to use tags from within the INI file. What I intend to do, is to factor in three main tag types... LBL will be the text label for the current action, PRG is the installer to run, and DOS will be a new feature that will allow pure DOS commands to be run (Such as terminating programs etc). As I said before, I personally prefer to do all that sort of thing within a BAT or a CMD file, but if you want multiple lines, well hey, I'll give 'em to ya!!! The tags will basically just be like HTML style things. Any Ideas for further configurations using these tags perhaps people???

    Visual basic is a lovely thing to play around with, and a lot of the basic commands, such as For/Next loops and If/Then statements, are things I used to mess with when I was at school (20 odd years ago). The rest is very simple to pick up. Most of the visual properties can be changed within the program code, such as Text1.text = "hello" which would put the word Hello into Text1's textbox. There are many many tutorials online and plenty of downloadable code snippets to help you. Unfortunately VB6 is a dying breed, thanks to the .NET era, but the runtime files needed are already installed with XP, whereas .NET framework needs to be installed.

    Simon, this is excellent news - thankyou!

    The only other thing i can think of at the moment is that you could have 3 other tags in the ini file. 1. font="fontname", 2. fontcolor="fontcolor (name i.e. red or hex i.e. #ffffff)" and 3. bgcolor="background color (name i.e. red or hex i.e. #ffffff)". Just some thoughts, don't know how hard or if you want to do it, but your asked for more ideas ;)

    I think most people these days install .net - it may be worth while coding in vb.net as Windows Visa may not include the required VB6 files needed? just a thought...

    Thanks again!

  8. Update - 20060215

    Removed WinRAR

    I'm removing the WinRAR installer because it doesn't come in a freeware version and it eventually times out if no purchase information is found. I'm leaving the Winamp installer and will continue to update it because Winamp can be use indefinately without the need to purchase it. Purchasing Winamp only activates more features.

    Is your install in an addon to RVM's integrator? If so can i download it from you as i do have a registered version of WinRAR and would like to add it :D

  9. :thumbup Hello simon, wonderful job, it's awsome that it's only 2 files now. Also thank you so much for actually crediting me for some of the work done on this code. I simply played with the interface and did some other small tweaking, and you still mentioned my work in the readme and the source.

    I like the new progress bar too. Thank you so much simon, this being your "final" version I don't think we'll be talking about this app much any more. But it's been really nice talking to you, and I hope our paths cross again some time.

    @felix

    I understand you're requests and I sugest you download the source and play around with it. Thats all I did, and changing the font has to be one of the easiest things to do in VB.

    Also the bug you mentioned isn't really a bug at all, where ever the preinst.ini file is found is going to be its base path, so if you want to install some thing from the E:\ drive then put preinst.ini at the root of that drive.

    Hi ya and thanks for your response... being a very novice VB person (very very basic - am a JS person) i am not sure how to compile etc... if you can give me a few pointers etc i would appreciate it :D

  10. Simon great little app!

    Can i make some requests please?

    1. Being able to change the font? - Use standard system font for example?

    2. More than one command line option - i have a cleanup that runs after each applications for things like icon placement etc - would like to be able to do that with your little app.

    Also i noticed what may be a little bug - i had a test that had the preinst.ini in c:\ and then in the ini had paths such as e:\folder\app.exe /switch - this didn't work... that would be good to have also.

    Thanks for your hard work - would be great if you include at least request 2.

    PS if you would like somewhere to host the source and the files etc - am happy to host them on my website.

  11. VMware Tools V5.5

    Home Page:http://www.vmware.com/

    File size: 3.15MB

    MD5: C82925CB2D9BCDE39AA02237689C13A8

    Install from: RunOnceEx

    Installs to: Default

    Shortcut: None - Control Panel applet

    Last updated: 20051216

    Notes: This download is actually a 7z archive. There is the installer itself and a VBscript I wrote which you can use in RunOnceEx to install it. The script checks the BIOS to see if you are using VMware and only then will it install VMware Tools with the included installer. The installer must be placed in \OEM on your CD/DVD for the script to work. In my testing, this installer does not work from svcpack.inf. The VMware Tools tray icon is disabled by default, 64 bit support is included, Japanese language support and all support for operating systems prior to Windows 2000 has been removed.

    I want to know if this will work when i add this to my WPI install instead of runonceex? And will this work when i place this in "\Install\VMware\" instead of OEM?

    No for it to work in the \install\vmware directory you will need to make one change.

    Change this

    For Each objDrive in colDrives
    If fs.FileExists(objDrive.DriveLetter & ":\WIN51") Then strOEM = objDrive.DriveLetter & ":\OEM"
    Next

    to this

    For Each objDrive in colDrives
    If fs.FileExists(objDrive.DriveLetter & ":\WIN51") Then strOEM = objDrive.DriveLetter & ":\install\vmware"
    Next

    That will allow it to run from the directory you want.

  12. Anytime mate :thumbup

    EDIT: Well it may be "cleaner" using one file, but then every computer has to decompress the installer even if it's not a VM. Here's the config.txt used with 7-Zip:

    ;!@Install@!UTF-8!
    RunProgram="RunHiddenConsole.exe /w msiexec /i VMwareTools.msi /qn"
    ;!@InstallEnd@!

    Mmm good point! didn't think of that... i was looking to minimise the use of RunHiddenConsole.exe as i am using it in my completed exe too

    ;!@Install@!UTF-8!
    RunProgram="RunHiddenConsole /w wscript VMWareTools.vbs"
    ;!@InstallEnd@!

    Suggestions?

  13. This little snippet here sets the variable strOEM to the \OEM directory on your install CD/DVD:

    For Each objDrive in colDrives
    If fs.FileExists(objDrive.DriveLetter & ":\WIN51") Then strOEM = objDrive.DriveLetter & ":\OEM"
    Next

    You can change \OEM to pretty much whatever you like so long as it's on the install media. If you don't want the switchless silent installer executed from the CD/DVD media at all, but rather you've placed it inside \$OEM$\$1 so that it winds up on the root of your system drive, then simply replace this little part:

    ws.Run(strOEM & "\VMWareTools.exe"),0,True

    with

    ws.RUN("%systemdrive%\VMWareTools.exe"),0,True

    Excellent - you have pointed me in the right direction - now i have modified the code a little differently to what is above - but it is doing exactly what i want. What i have done is created a self extracting installer that checks and then if it is vmware installs the tools - it all in once exe file - very clean and simple.

    I would like to clean it up a little further - would it be possible for you to tell me what the command line code is that you are using in the 7zip exe for "VMwareTools.exe" - right now i am including your current VMwareTools.exe file inside another 7zip exe that i have running the script etc... i would prefer to do it all from a single file - much cleaner...

    Thanks again for you work - i really appreciate it!

  14. Hi All,

    Something that i would like to do is do a check of the machine environment at first logon and if windows is running inside VMware, then i would like to launch the VMware Tools installation automatically.

    My question is 1. is it possible to detect that Windows is running inside VMware? 2. If it is possible - how to do it?

    Appreciate any help or advise.

    Cheers

    Darren

  15. Hi echap,

    Have been doing some testing and the current way that RunOnceExMaker is outputting the Xplode XML is now working correctly. The format that RunOnceExMaker is outputing is like this below:

    <item display='WinRAR 3.51' >
    <execute display='WinRAR 3.51' program='utils\wrar351r.exe' arguments='/s' />

    The correct code needs to be as follows:

    <items>
    <item display="WinRAR 3.51">
    <execute display="WinRAR 3.51" desc="Installs WinRAR 3.51">
    <program>#XPLODE#\wrar351r.exe</program>
    <arguments>/s</arguments>
    </execute>
    </item>

    Please let me know if you need any more information.

    Look forward to an update :D

  16. Hi there,

    I would like a little bit of help putting together a smarter batch file that i can reuse...

    Currently i am basically doing this on my application CD's

    cd dir1\

    start /wait doIT.exe (do it my custom installer that i have put together for each of my applications to silently install and configure. i.e. add reg settings etc.)

    cd ..

    cd dir2\

    start /wait doIT.exe

    cd ..

    cd dir3\

    start /wait doIT.exe

    and so on...

    I thought it would be good/cleaner to do something like

    for %%i in (dir) do if exist %%i\doIT.exe

    the code to run...

    I know the code above is not correct - but this will give you the idea of what i am seeking... i would appreciate any help/advice you can offer....

  17. Hey!

    It's been a while since I used this stuff, so I don't remember everything about it.

    I'm posting the last file I made. You don't need all the extra files anymore, since they are al compiled into this new one.

    To run the script silent just run "UPC.exe SILENT"

    I think I have to start working on this again after reading the new posts..

    Goodone esas - the only thing i notice is that when you run it (without the silient option) that it tell you there is "Duplicate user profile detected" even when there is not. Other than that looks good - I noticed you cleaned up the code as well - well done :D

×
×
  • Create New...