Jump to content

Apps not in Program Files


Recommended Posts

Hi, I'm pretty new to the unattended thingy but it looks really handy to me so I'd like to give it a try myself.

Now there is one thing I've got my doubts about.

I'm the kind of tidy user that has one folder for the Apps op D:\ and one for the games, music etc.

Now there is another topic going about changing the program files dir. But I don't want to change my progfiles folder becouse I will get all the standard MS junk also in my tidy apps folder. And I only want the apps I install there.

But this topic made me thinking about changing prog files folder during setup. Would it be possible to let winodows dump all her junk into C:\Program Files\ and then before setup installs my apps change it to D:\Applications so my apps will be installed there and after the installation of all my apps change it back to normal again?

My Question: Would that be an option? Or is there another solutions to that?

Thanx in advance :)

Link to comment
Share on other sites


ok here's something u can do

let it install its stuff to c drive

then after your first login

change the program files path from registry

now i'd tell u which reg key but i don't remember

nor i've the enery left to do it. i'm going to sleep :)

i'll put it up in the morning if no one's put it yet. (by morning i mean i play to wake up at 2pm!)

Link to comment
Share on other sites

u would

because they get installed b4 u login, so after u login and parse them it should be okay,

u might need to change more stuff in the registry to point old program files dir to their appropiate places.

it shouldn't be hard

another way of doing this (the hard way)

is to create a folder in d drive as program files and manually install any other non-ms related stuff to d:\program files

some of my friends do this. its not an easy task i usually just click next, next next to install stuff not even looking at where they install

so if u are like me u'll probably be skipping lots of "change install dir" screens. and if u are really that organized, once their install gets completed u'll uninstall them and re-install them to d drive :)

Link to comment
Share on other sites

okay well basically

first let the setup do its thing. let it install everything to c drive

then when u login go create a folder called program files in d drive

now this is the tricky part

now since all the stuff is installed to c:\program files

all the registry stuff points to it, right?

so u'll be seing lots of %programfiles% in registry which will point to c program files

now u've to manually change those to c:\program files\ so that when u change the actual program files dir from c drive to d drive, they won't be looking at d drive.

a ****, i dunno how to explain, this is rather a long and time consuming process. everything can get f'ed up.

then u'd have to change this line

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]"ProgramFilesDir"="d:\\Program Files"

"CommonFilesDir"="d:\\Program Files\\Common"

they would be c: u've to change it to d..

get my msn if u want i can explain more, i've to say u wouldn't really prefer doing this.

Link to comment
Share on other sites

if you are using your cmdlines.txt to install all of your 3rd party applications, you can do the following:

cmdlines.txt

"progdir.cmd""apps.cmd"

progdir.cmd

reg /import progdir.reg

progdir.reg

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]"ProgramFilesDir"="d:\\Program Files""CommonFilesDir"="d:\\Program Files\\Common"

Place your progdir.cmd and your progdir.reg in the $OEM$ folder (where cmdlines.txt is).... This also assumes you are using a file "apps.cmd" to install your RunOnce commands (modify this line to suit your setup, for example my own cmdlines.txt uses WPI.CMD to load WPI Post Install Wizard)....

Using this, all normal Windows applications (like IE, wordpad etc) will install to the default program files directory... then it will modify the registry before your 3rd party programs are installed, therefore they will install to the modified program files directory... This may or may not work :)

Link to comment
Share on other sites

Hmm Crusher's way will f+ck up IE and OE.

There is a commandline regeditor at www.resplendence.com that can search and replace.

RRC search /text="%%ProgramFiles%%" /replace="C:\Program Files" /data /noprompt

Then change the registry value like mentioned before

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]"ProgramFilesDir"="d:\\Program Files""ProgramFilesPath"="d:\\Program Files" OR BACK TO %ProgramFiles% ??"CommonFilesDir"="d:\\Program Files\\Common"
Link to comment
Share on other sites

Yeah what crusher said is what I wanted :) thanx m8!

But I was also planning to make another cmd+reg file to change back the progfiles dir so IE and OE and all the other junk wont be f***ed up :rolleyes:

Link to comment
Share on other sites

@ZoSTeR

thanks for the program

been looking for something like that

@guuz now with that program u can do what i've been trying to say.

since it has /noprompt u can even have it silently running in setup.

so let everything install to c:

then put this rrc search at the beginning of the batch file. (run once)

with start wait.

after this completes and changes all the paths

and parses

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]

"ProgramFilesDir"="d:\\Program Files"

"CommonFilesDir"="d:\\Program Files\\Common"

u shall have your new programs installed to d drive...

good luck

Link to comment
Share on other sites

  • 3 weeks later...

Ok I reached this part of my CD. But for some reaseon RRC doesn't change anything in the register at all. It doesn't even when I run it in my own Windows. It sais it has found and replaced a lot of keys. But for some reason it finds them again and again. It doesn't do anything with it :s

Help!?

Link to comment
Share on other sites

Ok I solved the RRC not working... IT didn't work because it aumatically converted %ProgramFiles% into C:\ProgramFiles.. so that made the command: RRC Search /data /text="C:\Program Files" /replace="C:\Program Files" /noprompt..

Now I have solved that with the following:

SET PF1=%ProgramSET PF2=Files%RRC Search /data /text="%%PF1%%PF2%%" /replace="C:\Program Files" /noprompt

And that works!

Now there are actually two things where stuff messes up.

This is how my setup works now:

  • ProgramFilesFolder changes to D:\Applications from cmdlines.txt
  • prepare.cmd runs from RunOnceEx
  • My Apps get installed (to D:\Applications) from RunOnceEx
  • finalize.cmd runs from RunOnceEx

prepare.cmd

SET PF1=%ProgramSET PF2=Files%RRC Search /data /text="%PF1%%PF2%" /replace="C:\Program Files" /nopromptRRC Search /data /text="%%PF1%%PF2%%" /replace="C:\Program Files" /nopromptRRC Search /data /text="D:\Applications" /replace="C:\Program Files" /nopromptregedit /s %Systemdrive%\Install\D-Schijf.reg

D-schijf.reg

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]"ProgramFilesDir"="d:\\Applications""ProgramFilesPath"="%ProgramFiles%"

finalize.cmd

cmdow @ /HID@echo off
SET PF1=%ProgramSET PF2=Files%RRC Search /data /text="%PF1%%PF2%" /replace="D:\Applications" /nopromptRRC Search /data /text="%C:\Program Files%" /replace="C:\Program Files" /nopromptregedit /s %Systemdrive%\Install\C-schijf.reg

C-schijf.reg

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]"ProgramFilesDir"="C:\\Program Files""ProgramFilesPath"="%ProgramFiles

Ok first thing that messes up:

I take for example the Softwate/Microsoft/Outlook Express. There's a value Installdir it's called I believe.. At the default install it says: "%Program Files%\Outlook Express\etc."

Now if I'm correct this line should be changed by the 1st RRC command in prepare.cmd. And it does change. But for some strange reason it changes to "%C:\Program Files%\Outlook Express\etc." Yup thos 2 %'s dont belong there.

But in my finalize.cmd there's another line that should solve it. Well guess not.

RRC Search /data /text="%C:\Program Files%" /replace="C:\Program Files" /noprompt

Didn't do a thing to it. So when I get in windows... the regkey is still like %C:\Program Files%\.... And this is not the only one.. Totally there are 101 keys who have this problem. Weird enough. If I enter the exact same command in commandprompt. The keys do get changed! But that's not really unattended now is it?

Ok 2nd issue.

For all my applications installed to D:\Applications at the end all the shortcuts point to C:\Program Files\myapp... Is there a way to fix this too? Or should I simply let it copy over my correct shortcuts?

I hope someone's here who can help me :) Thanx a lot :rolleyes:

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