Jump to content

Help, with changing the location....


Recommended Posts

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 Fi

gyrene2083

Link to comment
Share on other sites


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 by mazin
Link to comment
Share on other sites

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 Fi

gyrene2083

Link to comment
Share on other sites

(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

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_MACHINE

Key: Software\Microsoft\Windows\Current Version

Name: ProgramFilesDir

Type: REG_EXPAND_SZ

Value: 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 2003

Nero Ultra 7 = c:\Program files\2-Multimedia\Nero

Diskeeper 10 = c:\Program files \3-Toolbox\Diskeeper

The 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.exe

Here is where I would like the Target to be:

c:\Program Files\3-Toolbox\GetDiGetDiz.exe

Again 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

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

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. :P

Link to comment
Share on other sites

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

  • 4 weeks later...

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 commands

Setup=setupx.exe /qb /norestart INSTALLDIR1="%ProgramFiles%\1-Applications\Nero 7" SERIALNUM_USERVAL="xxxx......" AGREETOLICENSE="True"

Path=%temp%\NeroDemo11015

Silent=1

Overwrite=1

Title=Nero 7 Demo

family=Nero 7

This comment installed perfectly. Office 2003 worked great as well, via the mst. :thumbup

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.gif

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. tongue.gif

But, 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 off

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

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

REG ADD %KEY%\005 /VE /D "FoxIt Reader" /f

REG ADD %KEY%\005 /V 1 /D "%SystemDrive%\Install\apps\foxitreader_setup.exe" /VERYSILENT /SP- /DIR="C:\Program Files\1-Applications\FoxIt Reader" /f

REG ADD %KEY%\010 /VE /D "Diskeeper 10" /f

REG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\apps\Diskeeper10 Pro\v10ProPrem.exe /S /V/qn" /f

REG ADD %KEY%\020 /VE /D "FireFox" /f

REG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\apps\Firefox\firefoxsetup.exe -ms -ira" /f

REG ADD %KEY%\035 /VE /D "WinRar 3.20" /f

REG ADD %KEY%\035 /V 1 /D "%systemdrive%\install\apps\Winrar3.20\wrar320.exe /S" /f

REG ADD %KEY%\037 /VE /D "Clone DVD" /f

REG ADD %KEY%\037 /V 1 /D "%systemdrive%\install\apps\CloneDVD\setup.exe /S /D=C:\Program Files\2-Multimedia /GROUP" /f

REG ADD %KEY%\040 /VE /D "AnyDVD" /f

REG ADD %KEY%\040 /V 1 /D "%systemdrive%\install\apps\AnyDVD\Setup.exe /S /D=C:\Program Files\2-Multimedia /GROUP" /f

REG ADD %KEY%\050 /VE /D "Nero Ultra 7" /f

REG ADD %KEY%\050 /V 1 /D "REGEDIT /S %systemdrive%\install\apps\nero 7\register.reg" /f

REG ADD %KEY%\050 /V 2 /D "%systemdrive%\install\apps\Nero 7\Setup.exe /silent /noreboot" /f

REG ADD %KEY%\055 /VE /D "TweakUI Powertoy" /f

REG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\apps\TweakUI\TweakUI.exe /qn" /f

REG ADD %KEY%\060 /VE /D "Deskman Powertoy" /f

REG ADD %KEY%\060 /V 1 /D "%systemdrive%\install\apps\Deskman Powertoy\DPSetup.exe /s /v/qn" Msiexec /i DPSetup.msi /qb /f

REG ADD %Key%\065 /VE /D "Office 2003" /f

REG ADD %Key%\065 /V 1 /D "%systemdrive%\install\apps\Office2003\setup.exe TRANSFORMS=Unattended.MST /qb-" /f

REG ADD %KEY%\085 /VE /D "Cleaning Up and Rebooting" /f

REG ADD %KEY%\085 /V 1 /D "%systemdrive%\apps\cleanup.cmd" /f

EXIT

Link to comment
Share on other sites

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 characters

of 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 installers

Adding INSTALLDIR switch on the command line directly or inside a SFX makes

no difference. I mean it should work either way.

Diskeeper 10 is a MSI.

You can run the package (v10ProPrem.exe) manually

and let the first setup screen wait as it is.

Then, look for the MSI file. It should be extracted somewhere

like %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 when

installing 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 /register

That's it!

Fourth: Firefox.

I'm not a Firefox user!

However, I found FirefoxSetup-0.9.exe on my HDD. It's probably left there

someday 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 lines

are of special interest to your situation.

Fifth: INNO installers.

I think INNO installers are, also, dominating a good portion of apps because

INNO 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 = DefaultHide

TargetPath=\Windows

Filesystem=*

Repartition= "No"

Link to comment
Share on other sites

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 by gyrene2083
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...