Jump to content

RunOnceEx


Recommended Posts

Would somebody knowledgeable be able to read my preliminary RunOnceEx.cmd file and tell me of the errors, if any? I have read the pertanent information in MSN's unattended guide, but, am not sure of the "\ " argument when adding quotations; for instance,

should below

REG@Echo Off

SET PP=%SystemDrive%\Install\

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

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

ADD %KEY%05 /VE /D "Windows Messenger 5.1 adm file" /f

REG ADD %KEY%05 /V 1 /D "%PP%COPY /y "%SYSTEMDRIVE%\Install\rtcclient.adm" "%SYSTEMROOT%\inf"" /f

written into the original be

REG ADD %KEY%05 /VE /D "Windows Messenger 5.1 adm file" /f

REG ADD %KEY%05 /V 1 /D "\COPY /y "%SYSTEMDRIVE%\Install\rtcclient.adm" "%SYSTEMROOT%\inf"\" /f

and is below correct

REG ADD %KEY%07 /V 1 /D "\MKDIR "C:\Documents and Settings\All Users\Start Menu\Programs\Games"\" /f

There are no silent switches incorporated yet because I run one boot and three logical partitions, one of which I install all my programs, games etc. to; never default C:\......... The installation is all local on my machine.

The file was prepared using RunOnceEx.cmd Creator which I proof read and modified as I understand the appropriate MSN guide article. Please find my corrected version in Setup.zip attached; thanks in advance for any help.

Link to comment
Share on other sites


Here is a replacement version of your file:

I have made more corrections than I care to mention. You need to fully read and understand the unattended guide before going any further, your grasp of this method is poor.

All unnecessary lines have been commented with removed and commented out accordingly

Lines commented with changed have been

Lines stating explain require just that

Lines stating switchless mean that you have not supplied any switches for those installers. If the packages are being installed silently you will have to search the appropriate area of these forums for those. We are here only to help and guide, not do everything for you!

As a final note, you really should create all your directories in seperate cmd files and call the files from your runonceex instead of creating all those individual MKDIR commands directly!

Link to comment
Share on other sites

Thankyou Yzowl,

"I have made more corrections than I care to mention. You need to fully read and understand the unattended guide before going any further, your grasp of this method is poor."

This is my very first attempt at it; had been using batch cmd files until................., absolutely no scripting experience whatsoever, but, have begun selfteaching, so the learning curve..... The unattended guide makes no reference to COMSPEC and a google search basically tells me this is a call to command.com; am I right?

I understand my msi errors.....

"Lines stating switchless..........................."

I stated in my original post I want no unattended installations at this time for the reasons stated and, therefore, there are no switches for any exe's called in the cmd script. As my skill set improves with time and experience then.....The greatest limitation in all of this is the NTFS partitions cannot be formatted before runonce, further, all executables are hard coded to

%programfiles%-including msi's; to modify these all correctly and thoroughly requires software-a decompiler possibly, and more knowledge than I currently have-switchless will have to wait; plus I am uncomfortable with no progress bar in anything, I like to see it.

::----Explain----

REG ADD %KEY%01 /V 1 /D "regsvr32 /n /i:U shell32.dll" /f This is a carry over from when the Quicklaunch icon went south after slipsreaming IE7. I found , for me, that a beneficial side effect in continued use even after the Quicklaunch concerns had been solved was my desktop is registered and loaded before explore.exe is loaded, during runonce; allowing me to do a number of things not possible before while the partitions are formatting; ie: move the documents folder entirely-including the "My Music" folder; afterwhich I can restore all my backups to the My Documents folder while F is formatting, set Desktop theme to classic and have it stick, open up nview and set the default geforce video, configure GP....etc.; all items not properly addressed by inf files containing reg tweaks which, for whatever reason, just will not do the job entirely.

::----Explain----

REG ADD %KEY%40 /V 1 /D "%PP%rarkey.rar" /f ....just an easy way to register my purcased copy of WinRAR-it is the unaltered registration file, containing the key etc. they emailed to me upon receipt of my payment. Just install WinRAR and use it to open this file...presto, your copy is registered.

"As a final note, you really should create all your directories in seperate cmd files and call the files from your runonceex instead of creating all those individual MKDIR commands directly!"

OK, I will do that; as I understand it, all runonceex and cmdlines.txt files go in the $OEM$ root directory on the bootable CD or DVD, so, I will create two runonceex cmd files; one for D:, and a second for F:, call each at the correct location in the original.

The "pause" was inserted before "exit" because I ran the cmd from my desktop to see how it worked and to be able to scroll the cmd dialogue box to look at the actual errors realtime after execution; afterwhich I ran regedit, navigated to hklm runonceexe and viewed the results, going by the command line numbers. Your corrected version had several "too many commandline parameters" errors due to typos; ie: "\ instead of \". Corrected the typos and it ran to completely successful conclusion. Thankyou very much, again, for your time. I will burn a bootable ISO and try it tonight.

Edited by RickSteele
Link to comment
Share on other sites

The unattended guide makes no reference to COMSPEC and a google search basically tells me this is a call to command.com; am I right?
No it calls the systems command interpreter, in most cases it resolves to 'C:\WINDOWS\system32\cmd.exe'.
::----Explain----

REG ADD %KEY%01 /V 1 /D "regsvr32 /n /i:U shell32.dll" /f This is a carry over from when the Quicklaunch icon went south after slipsreaming IE7. I found , for me, that a beneficial side effect in continued use even after the Quicklaunch concerns had been solved was my desktop is registered and loaded before explore.exe is loaded, during runonce; allowing me to do a number of things not possible before while the partitions are formatting; ie: move the documents folder entirely-including the "My Music" folder; afterwhich I can restore all my backups to the My Documents folder while F is formatting, set Desktop theme to classic and have it stick, open up nview and set the default geforce video, configure GP....etc.; all items not properly addressed by inf files containing reg tweaks which, for whatever reason, just will not do the job entirely.

I only asked because I have no idea what U means! Regsvr32 will pass that command to dllinstall.
::----Explain----

REG ADD %KEY%40 /V 1 /D "%PP%rarkey.rar" /f ....just an easy way to register my purcased copy of WinRAR-it is the unaltered registration file, containing the key etc. they emailed to me upon receipt of my payment. Just install WinRAR and use it to open this file...presto, your copy is registered.

You only really need to extract the contents before-hand and simply copy accross!
Your corrected version had several "too many commandline parameters" errors due to typos; ie: "\ instead of \". Corrected the typos and it ran to completely successful conclusion. Thankyou very much, again, for your time. I will burn a bootable ISO and try it tonight.
There were actually only three errors remaining in the file I upped, but at least you were able to find and fix them.
Link to comment
Share on other sites

Well, have a lot to learn. Just finished a fresh install; is working OK but, failed in several key areas important to me. I cannot ascertain the root cause of, say, Rougespears's RogueSpearAddonsRuntimesCF_2.5.4 addon failing to install at T-13 because there was an untried variable in an IE7 addon I tried-which runs some RunOnceEx enties of it's own, plus, I used RyanVM's latest update pack release for the first time; sooooo... Further, I absolutely love the RunOnceEx method over cmd batch from GUI, but, I now clearly see the requirement for switches, or additional coding in the script; ie: one, for instance, to force the file to pause after running one executable, before running the next. It was similar to what occurs when "WAIT" does not work in a batch; all the setups ran concurrently-quite a mess! This is going to take some time to read about scripting etc.; learn more about the language. Thanks again, no end to my appreciation for your effort here!

Will search out COMSPEC again and add systems command interpreter in the mix, need to know more and understand.

I was unaware the U-, uninstall, was inferred by regsvr32; will modify the command to reflect this. I just now finished creating and burning a new bootable DVD, sans the IE7 addon; used nlite to slipstream it as in the past, which, always worked well. Soooo, am now going to blow the partitions and try again; will do a complete install and backup the boot partition so I can try various compilations using RunOnceEx-something I should have done this time.....keeping the faith. :blushing:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...