Windows Update Method For An Unattended Cd Guide
Posted 24 November 2003 - 04:25 PM
devil270975, on Oct 19 2003, 12:25 PM, said:
Have you found out yet?
From what I understand, the %systemdrive% variable doesn't exist during the RunOnceEx stage, right? I've thought about making a first RunOnceEx entry to use one of those scripts that some members have used to find their CD-ROM drive letter and set the variable. I'll have to find the code, but its something like:
IF EXIST C:\Install\confirm.txt SET %SYSTEMDRIVE% C:\
IF EXIST D:\Install\confirm.txt SET %SYSTEMDRIVE% D:\
IF EXIST E:\Install\confirm.txt SET %SYSTEMDRIVE% E:\
which would go into those numbered entries in the registry file:
"1"="IF EXIST C:\Install\confirm.txt SET %SYSTEMDRIVE% C:\"
"3"="and so on"
@="Finding location of files..."
Just a theory though. (confirm.txt is just a blank txt file to confirm its existance in the Install folder)
Posted 24 November 2003 - 04:29 PM
Posted 24 November 2003 - 07:40 PM
RunOnceEx doesn't like any variable at all (even tried %homedrive%\install\)
Doing an IF EXIST and SET command for %hdd% sets it to C:\, but only in the active command window. %hdd% won't work if run from anywhere else. Pretty much useless when the first runonceex key is set_variables.cmd (which is in system32) and the command window closes thus losing the variable.
Giving me a headache this is!
Posted 24 November 2003 - 07:57 PM
REG ADD %KEY%\zz010 /VE /D "Doing Stuff" /f
REG ADD %KEY%\zz010 /V 1 /D "%systemdrive%\Install\stuff.exe" /f
that way you can put variables in, i run this from cmdlines.txt
Posted 28 November 2003 - 06:50 PM
Lets say you want to install things while logged on using the windows update method (the fancy looking .inf installation method for us obsessed with look, kind of people) hehe.
You would finish off the runonce updates (called from cmdlines.txt) with a batch file that copies a shortcut from your install folder to the all users --> startmenu --> startup folder. This shortcut calls up a batch from the install folder on your system drive (I use a shortcut rather than an actual batch because I have had no luck in running a batch file then having it delete itself. This is so that the first time you logon it will run a batch file that will in turn run an inf, lets say Gosh's idea for an installing inf file ----> I apologize for only referencing Gosh's work because he is the only person I can think of right now. Once again I apologize as I and my others know there is some tension in this forum with the people who have all those stars beneath their name.
Anywho, back to what I was saying, the batch file file would run the installation of an inf file and then would run a command to delete the shortcut in the startup folder so to not run every startup. I think thats it. Do you guys think I hit the mark with this or should I stop smoking what you guys think I would be smoking when I wrote this. lol
Posted 28 November 2003 - 06:55 PM
Posted 28 November 2003 - 06:56 PM
Someone should come up with a good way to do this.
Posted 28 November 2003 - 07:01 PM
@Gosh. I took a quick glance and I apologize if this is what you posted. I knew that if I read the whole thread I would find something like this. I knew I couldn't have been the only person to think of this.
Posted 28 November 2003 - 07:05 PM
X-Ecutioner, on Nov 29 2003, 01:01 AM, said:
but arn't you technically logged in at this stage? it runs on the first login (usually administrator) where everything is loaded..
i've personally never had a single problem installing a program at this stage, only at the cmdlines stage
Posted 28 November 2003 - 07:10 PM