gyrene2083 Posted August 26, 2006 Share Posted August 26, 2006 Hello All, I was curious if anyone can help me. I am trying the RunOnceEx method, and I had two questions. First question, I have seen some of the switches for some applications that only list batch file commands, can I use those same switches in RunOnceEx? Second, I was wondering if there was a way to specify where I could install the applications in the program files and in the start menu. For example, I prefer to have my applications organized in three folders with in the program files, so what I normally do is create 3 folders, 1-Applications, 2-Multimedia,3-Toolbox. I also, would like to have those three folders in the start menu, and have them populated with the proper icons, for each folder. So, this is the way I would normally organize my files;c:\Program Files\1-Applications\Foxit Reader. Then my start menu would have an icon created in the 1-Applications\Foxit Reader folder.Hopefully, what I asked is worded correctly. I would appreciate any help.-Semper Figyrene2083 Link to comment Share on other sites More sharing options...
mazin Posted August 26, 2006 Share Posted August 26, 2006 (edited) First question, I have seen some of the switches for some applications that only list batch file commands, can I use those same switches in RunOnceEx?- Yes! Edited August 26, 2006 by mazin Link to comment Share on other sites More sharing options...
T D Posted August 26, 2006 Share Posted August 26, 2006 They are universal switches, you can launch them from ANYWHERE. It's not just for cmd files. Link to comment Share on other sites More sharing options...
gyrene2083 Posted August 26, 2006 Author Share Posted August 26, 2006 Thank you T D, and mazin for your help with the first question. Now how about my second question. (which is posted down below)(Second, I was wondering if there was a way to specify where I could install the applications in the program files and in the start menu.For example, I prefer to have my applications organized in three folders with in the program files, so what I normally do is create 3 folders, 1-Applications, 2-Multimedia,3-Toolbox. I also, would like to have those three folders in the start menu, and have them populated with the proper icons, for each folder.So, this is the way I would normally organize my files;c:\Program Files\1-Applications\Foxit Reader. Then my start menu would have an icon created in the 1-Applications\Foxit Reader folder.)-Semper Figyrene2083 Link to comment Share on other sites More sharing options...
Takeshi Posted August 26, 2006 Share Posted August 26, 2006 (Second, I was wondering if there was a way to specify where I could install the applications in the program files and in the start menu.To install programs to locations other than the default program files directory, it depends on the prog and installer how you change it.The Start Menu > All Programs list is just a list of shortcuts from the Startup directory. Link to comment Share on other sites More sharing options...
gyrene2083 Posted August 26, 2006 Author Share Posted August 26, 2006 To install programs to locations other than the default program files directory, it depends on the prog and installer how you change it. Thank you Takeshi for you response. I'm not exactly sure I follow what you described above. I thought the application gave you a choice to change the default directory. ( which is normally c:\Program Files) I found this after I did a search;Hive: HKEY_LOCAL_MACHINEKey: Software\Microsoft\Windows\Current VersionName: ProgramFilesDirType: REG_EXPAND_SZValue: C:\Program Files default But this only allows you to change the default value. What I am trying to do is to is add subfolders within Program Files. I just would like to have everything organized, so I can find everything without having to search through a long list in Program Files. These are the three subfolders I would like to create; 1-Apps, 2- Multimedia, 3 - Toolbox. After creating these folders I would like to point the installation to go into one of the three folders I have mentioned above. (if this can't be done, I apologize in going through all of this)These are some the apps I would like to install and these are the directories I would like them installed in.Office 2003 = c:\Program files\1-Apps\Office 2003Nero Ultra 7 = c:\Program files\2-Multimedia\NeroDiskeeper 10 = c:\Program files \3-Toolbox\DiskeeperThe Start Menu > All Programs list is just a list of shortcuts from the Startup directory.So, being that they are icons, where could I change the location they are placed in?For example:Here is the default Target:c:\Program Files\GetDiz\GetDiz.exeHere is where I would like the Target to be:c:\Program Files\3-Toolbox\GetDiGetDiz.exeAgain I would apologize for my ignorance, in this subject. In the Marine Corps, the dumbest question is the one you don't ask, so I would greatly appreciate anyone that can educate me with this. Link to comment Share on other sites More sharing options...
Takeshi Posted August 28, 2006 Share Posted August 28, 2006 It's easy to change the default prog file dir but it's not what you want as you want three different locations. Creating the three folder locations is not a problem using the $OEM$ folder structure.Not all applications ask you for the locations: it depends on how they're written and packaged.I think you'd need to re-package the programs or perhaps use AutoIt pointing to the desired locations. Someone might be able to help you to do this. Link to comment Share on other sites More sharing options...
T D Posted August 28, 2006 Share Posted August 28, 2006 Windows Installer mst's allow you to set the... well, everything. So do installshield setup.iss's. Link to comment Share on other sites More sharing options...
mazin Posted August 28, 2006 Share Posted August 28, 2006 1- I think that a big portion of your apps is MSIs. Yeah, that's easily anticipated nowadays!Well, install location of MSIed apps can be stated on the command line.Here's an example:start /wait %SystemDrive%\Install\MyApp\MyMSI.msi /qn INSTALLDIR="%ProgramFiles%\3-Toolbox\MyAppFolder"2- If you have another big portion of INNOs, then I've solved 2/3 of your second problem. B) Here's an example:start /wait %SystemDrive%\Install\MyApp\MyINNO.exe /VERYSILENT /SP- /DIR="C:\Program Files\2-Multimedia\MyAppFolder"You can, even, set your shortcut folder in Start menu using the switch: /GROUP="FolderName"3- Maybe, there are other methods for other installers. Ah, the remaining third. Link to comment Share on other sites More sharing options...
Takeshi Posted August 28, 2006 Share Posted August 28, 2006 Very helpful, mazin!Using those switches, is it necessary to create the custom install directories separately first? Link to comment Share on other sites More sharing options...
mazin Posted August 29, 2006 Share Posted August 29, 2006 Using those switches, is it necessary to create the custom install directories separately first?No!And I should add, also, that SFXs is another way to install apps with custom install dir. Link to comment Share on other sites More sharing options...
gyrene2083 Posted September 26, 2006 Author Share Posted September 26, 2006 Thank you mazin for your help. It is greatly appreciated. This is what I have accomplished so far. I was able to go into Nero 7 using winrar and editing the SFX comment, to read like so.;The comment below contains SFX script commandsSetup=setupx.exe /qb /norestart INSTALLDIR1="%ProgramFiles%\1-Applications\Nero 7" SERIALNUM_USERVAL="xxxx......" AGREETOLICENSE="True"Path=%temp%\NeroDemo11015Silent=1Overwrite=1Title=Nero 7 Demofamily=Nero 7This comment installed perfectly. Office 2003 worked great as well, via the mst. Now I have a few questions, if anyone can help me. I am not quite sure if I can do the same SFX changes to the other programs I want to install below. Also, if I can make the SFX changes do I need to add those switches in the Runcmd file for each program?If I can't, mazin, you suggested I try your switches. 1- I think that a big portion of your apps is MSIs. Yeah, that's easily anticipated nowadays!Well, install location of MSIed apps can be stated on the command line.Here's an example:start /wait %SystemDrive%\Install\MyApp\MyMSI.msi /qn INSTALLDIR="%ProgramFiles%\3-Toolbox\MyAppFolder"2- If you have another big portion of INNOs, then I've solved 2/3 of your second problem. cool.gifHere's an example:start /wait %SystemDrive%\Install\MyApp\MyINNO.exe /VERYSILENT /SP- /DIR="C:\Program Files\2-Multimedia\MyAppFolder"You can, even, set your shortcut folder in Start menu using the switch: /GROUP="FolderName"3- Maybe, there are other methods for other installers. Ah, the remaining third. tongue.gifBut, do the switches you suggested work with the apps below? (installing to a specific directory). Another question, the /GROUP="Foldername" switch, where exactly would I put that on the command line? And the last question, when I did do the unattended cd. I installed it on a pc that had 3 hard drives. C, D, E. On drive c: there was a copy of windows xp home. I wanted a clean install of xp professional. But, when the unattended installation was complete, instead of it installing over the operating system on c; it installed itself in the e: directory!!. Any ideas why this happened? (below is a copy of what my Runcmd file looks like).cmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\005 /VE /D "FoxIt Reader" /fREG ADD %KEY%\005 /V 1 /D "%SystemDrive%\Install\apps\foxitreader_setup.exe" /VERYSILENT /SP- /DIR="C:\Program Files\1-Applications\FoxIt Reader" /fREG ADD %KEY%\010 /VE /D "Diskeeper 10" /fREG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\apps\Diskeeper10 Pro\v10ProPrem.exe /S /V/qn" /fREG ADD %KEY%\020 /VE /D "FireFox" /fREG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\apps\Firefox\firefoxsetup.exe -ms -ira" /fREG ADD %KEY%\035 /VE /D "WinRar 3.20" /fREG ADD %KEY%\035 /V 1 /D "%systemdrive%\install\apps\Winrar3.20\wrar320.exe /S" /fREG ADD %KEY%\037 /VE /D "Clone DVD" /fREG ADD %KEY%\037 /V 1 /D "%systemdrive%\install\apps\CloneDVD\setup.exe /S /D=C:\Program Files\2-Multimedia /GROUP" /fREG ADD %KEY%\040 /VE /D "AnyDVD" /fREG ADD %KEY%\040 /V 1 /D "%systemdrive%\install\apps\AnyDVD\Setup.exe /S /D=C:\Program Files\2-Multimedia /GROUP" /fREG ADD %KEY%\050 /VE /D "Nero Ultra 7" /fREG ADD %KEY%\050 /V 1 /D "REGEDIT /S %systemdrive%\install\apps\nero 7\register.reg" /fREG ADD %KEY%\050 /V 2 /D "%systemdrive%\install\apps\Nero 7\Setup.exe /silent /noreboot" /fREG ADD %KEY%\055 /VE /D "TweakUI Powertoy" /fREG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\apps\TweakUI\TweakUI.exe /qn" /fREG ADD %KEY%\060 /VE /D "Deskman Powertoy" /fREG ADD %KEY%\060 /V 1 /D "%systemdrive%\install\apps\Deskman Powertoy\DPSetup.exe /s /v/qn" Msiexec /i DPSetup.msi /qb /fREG ADD %Key%\065 /VE /D "Office 2003" /fREG ADD %Key%\065 /V 1 /D "%systemdrive%\install\apps\Office2003\setup.exe TRANSFORMS=Unattended.MST /qb-" /fREG ADD %KEY%\085 /VE /D "Cleaning Up and Rebooting" /fREG ADD %KEY%\085 /V 1 /D "%systemdrive%\apps\cleanup.cmd" /fEXIT Link to comment Share on other sites More sharing options...
mazin Posted September 26, 2006 Share Posted September 26, 2006 First: NERO and Office 2003.Good work!I just wonder how INSTALLDIR1 worked as I know it should be INSTALLDIR (without 1).Well, I think it worked just because a MSI usually reads the first 8 charactersof a switch. If I remember correctly!Second: MSI installers.Like you did to Office and NERO, you can usually create a MST or just use the INSTALLDIR switch with MSI installersAdding INSTALLDIR switch on the command line directly or inside a SFX makesno difference. I mean it should work either way.Diskeeper 10 is a MSI.You can run the package (v10ProPrem.exe) manuallyand let the first setup screen wait as it is.Then, look for the MSI file. It should be extracted somewherelike %TEMP% directory or so.I don't know wether there's a CAB file along with the MSI.You have to check for that.You can use that MSI (with CAB, if any) with a custom directory wheninstalling with your UACD.I think TweakUI Powertoy and Deskman Powertoy are similar to Diskeeper 10.Third: FoxIt Reader.My favorite! What I did:- Installed it manually.- Looked for FoxitReader.exe in the installation directory. (I no longer remember where it is!)- I copied FoxitReader.exe (ONLY) to my UACD. I renamed it to PDFRead.exe (This is not obligatory).- A batch script (in my UACD) copied it to %SystemRoot%.- The same batch script runs this code to make it be the default PDF viewer:%SystemRoot%\PDFRead.exe /registerThat's it!Fourth: Firefox.I'm not a Firefox user!However, I found FirefoxSetup-0.9.exe on my HDD. It's probably left theresomeday when I was planning to test FireFox. I'm not sure.I extracted FirefoxSetup-0.9.exe to a directory with 7-zip. Inside the directory,there is the config.ini.A wealth of information is in config.ini, not only -ms and -ira!The first block of lines (inside config.ini) and the last block of linesare of special interest to your situation.Fifth: INNO installers.I think INNO installers are, also, dominating a good portion of apps becauseINNO is free and open source. I hope I'm correct!Well, you asked where to put /GROUP="FolderName". You put it on the command line like this:start /wait %SystemDrive%\Install\MyApp\MyINNO.exe /VERYSILENT /SP- /DIR="C:\Program Files\2-Multimedia\MyAppFolder" /GROUP="FolderName"More INNO discussion by ZoSTeR is here:- Inno Setup complete switch list.- Rebuilding Inno Setups.Sixth: Unattended Installation of Windows.To have a full control on where Windows should be installed,I have these lines in my WINNT.SIF under these sections:[Data]Autopartition = 0[unattended]UnattendMode = DefaultHideTargetPath=\WindowsFilesystem=*Repartition= "No" Link to comment Share on other sites More sharing options...
gyrene2083 Posted September 27, 2006 Author Share Posted September 27, 2006 (edited) Thanks mazin.I ran the setup for Diskeeper, and I found where it put the .msi file. But, I'm not able to copy the file, because it says it's in use by another program. Also, when I run a complete install of diskeeper, the .msi file disappears. Any ideas?Also, how can I tell if a program is INNO? Edited September 27, 2006 by gyrene2083 Link to comment Share on other sites More sharing options...
mazin Posted September 27, 2006 Share Posted September 27, 2006 (edited) Diskeeper: Use that button to restart your PC. When the PC is restarted, you'll find the MSI there.How to identify an installer: Check this util by MHz.http://www.msfn.org/board/index.php?showtopic=83388 Edited September 27, 2006 by mazin Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now