Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

environment variable setup question

- - - - -

  • Please log in to reply
21 replies to this topic

#1
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
okay. my guirunonce runs a batch file that is as follows.

setcdrom.bat
@echo off
ECHO Identifying CD/DVD ROM
IF EXIST D:\CDROMID.1 SET CDROM=D:
IF EXIST E:\CDROMID.1 SET CDROM=E:
IF EXIST F:\CDROMID.1 SET CDROM=F:
IF EXIST G:\CDROMID.1 SET CDROM=G:
IF EXIST H:\CDROMID.1 SET CDROM=H:
IF EXIST I:\CDROMID.1 SET CDROM=I:
IF EXIST J:\CDROMID.1 SET CDROM=J:
IF EXIST K:\CDROMID.1 SET CDROM=K:
IF EXIST L:\CDROMID.1 SET CDROM=L:
IF EXIST M:\CDROMID.1 SET CDROM=M:
IF EXIST N:\CDROMID.1 SET CDROM=N:
IF EXIST O:\CDROMID.1 SET CDROM=O:
IF EXIST P:\CDROMID.1 SET CDROM=P:
IF EXIST Q:\CDROMID.1 SET CDROM=Q:
IF EXIST R:\CDROMID.1 SET CDROM=R:
IF EXIST S:\CDROMID.1 SET CDROM=S:
IF EXIST T:\CDROMID.1 SET CDROM=T:
IF EXIST U:\CDROMID.1 SET CDROM=U:
IF EXIST V:\CDROMID.1 SET CDROM=V:
IF EXIST W:\CDROMID.1 SET CDROM=W:
IF EXIST X:\CDROMID.1 SET CDROM=X:
IF EXIST Y:\CDROMID.1 SET CDROM=Y:
IF EXIST Z:\CDROMID.1 SET CDROM=Z:
ECHO Your CDROM-DRIVE is: %CDROM%
start /wait rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 c:\install\runonce.inf


[Version]
Signature="$Windows NT$"

[DefaultInstall]
AddReg=Setup
;silent installs
[Setup]
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.2. Norton Antivirus 2003",,"%CDROM%\SFTRoot\DISK-UTILITIES\NAV2003\NAV\NAV.bat"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.3. Office XP",,"%CDROM%\officexp\Silent-Install.bat"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.4. Streets and Trips 2004",,"%CDROM%\trips04\Streets\MSMap\data.bat"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.5. Adobe Reader 6",,"%CDROM%\SFTRoot\OTHER\ADOBEREADER6\AR6.msi /QB"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.6. Diskeeper 8.0 Pro",,"%CDROM%\SFTRoot\DISK-UTILITIES\DISKEEPER\DISKEEPER-PRO-8.EXE /s /v/qn" /f
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.7. DivX Codecs",,"%CDROM%\SFTRoot\MEDIA\CODECS\Codec.Pack.V5.42.Advanced.exe /S"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.8. KazaaLite",,"%CDROM%\SFTRoot\INTERNET\KAZAALITE\KLITEKPP241E.EXE /silent"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.9. MSN 6.1",,"%CDROM%\SFTRoot\INTERNET\MESSENGER\MSNMSGS.msi /qn"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.0. MSN 6.1 Plus",,"%CDROM%\SFTRoot\INTERNET\MESSENGER\MsgPlus-254.exe /SilentInstallNoSponsor"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.1. Gemstar Guide Plus",,"%CDROM%\SFTRoot\OTHER\GEMSTAR\Silent.bat"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.2. Serv-U FTP",,"%CDROM%\SFTRoot\Internet\Serv-U\susetup.exe /s"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.3. Nero Burning ROM 6",,"%CDROM%\BURNING\NERO\Nero.bat /silent /noreboot"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.4. Nero Burning ROM 6 Addons",,"%CDROM%\BURNING\NERO\nve2104.exe /silent /noreboot"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.5. WinRAR",,"%CDROM%\SFTRoot\OTHER\WINRAR\winrar.bat"
; setup prompts
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.6. Adaware Serial",,"%CDROM%\SFTRoot\OTHER\ADAWARE\serial.txt"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.7. Adaware",,"%CDROM%\SFTRoot\OTHER\ADAWARE\AD-AWARE.6.PRO.BUILT.181.EXE /s"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.8. UltraISO 6",,"%CDROM%\SFTRoot\OTHER\ULTRAISO\iso.bat"
;finishing off
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.9. Install Files",,"%CDROM%\Tools\Install\Install.bat"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"3.0. Removing Useless Files",,"%CDROM%\Tools\Finish.bat"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"3.1. Removing Setup Files",,"%CDROM%\Tools\removesetup.cmd"
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"3.2. Restarting the Computer",,"%CDROM%\Tools\restart2.cmd"

the problem is... the inf doesn't like the variable. It just runns through the list in about 2 seconds and closes. Can anyone see a problem with this setup? Theres about a gig of software to install and theres no way im going to make setup copy a gig of software off my dvd. that will take too long. I like many others wish that microsoft could have made a freakin cdrom system variable.

Can anyone help me?
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot


How to remove advertisement from MSFN

#2
GreenMachine

GreenMachine

    ineXPlicable

  • Developer
  • 3,062 posts
  • Joined 22-August 03

I like many others wish that microsoft could have made a freakin cdrom system variable.

Can anyone help me?

MS didn't, but the Icemannd did!
DETECTCD

From what I understand ... You are not setting an environment variable, you are setting a "local" variable. Your inf file runs in a seperate space, and does not have a copy of your local varible. I believe SETX exists, and will set a system variable. Better yet is Icemannd's solution, which DOES set a system wide variable. Detectcd has one limitation in that the new system variable is not readily available in the current session. There is a work around, but you should not need it, for the very same reason your inf file does not see the "local" variable: running in a different space.

#3
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
Unfortunatly my cdrom is F: i got c,d,e partitions. From what I understand from IcemanND's site is the cdrom variable only works for d: and e: drives. Am I rite or did I miss something. Ill keep tryin it out.
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot

#4
GreenMachine

GreenMachine

    ineXPlicable

  • Developer
  • 3,062 posts
  • Joined 22-August 03
You missed something ... if it were only for D and E, then you wouldn't need a variable at all ... D and E are example values ...

#5
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
i'm afraid your solution is screwed anyway you get the variable working.
Last i heard, you can't use system variables in RunOnce
I tried once, and it didn't work....i'll do a test in a bit on it.

but if RunONce did like variables you should use SetX
http://download.micr.../setx_setup.exe

that should do you.
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#6
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
Well I tried running the set variable and getting it to run the inf off of %cdrom%\runonce.inf but when I try to make one of the reg values start with either a "." or simply "\" but neither work. The only thing I can think of right now is using a batch file for all installations (horrible interface). There must be another way.
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot

#7
GreenMachine

GreenMachine

    ineXPlicable

  • Developer
  • 3,062 posts
  • Joined 22-August 03
Why not use the RunOnceEx.CMD file outlined in the MSFN Guide? A batch file, that calls the REG program to add the values to the registry. All done in one file: no inf and cmd, or reg and cmd. You can then use your original algorythm to find the CD. Pretty clean, and the instructions are all there ...

#8
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
Thanks ill try it. if that doesn't work then ill try the SourceDisksName in the inf and see if it will look for a disk with a certain name, in my case, "Unattend DVD"
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot

#9
GreenMachine

GreenMachine

    ineXPlicable

  • Developer
  • 3,062 posts
  • Joined 22-August 03
Something like that should work as well, but I think you use a file name, not a CD label.

#10
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
you could try this....

@echo off
ECHO Identifying CD/DVD ROM
IF EXIST D:\CDROMID.1 SET CDROM=D:
IF EXIST E:\CDROMID.1 SET CDROM=E:
IF EXIST F:\CDROMID.1 SET CDROM=F:
IF EXIST G:\CDROMID.1 SET CDROM=G:
IF EXIST H:\CDROMID.1 SET CDROM=H:
IF EXIST I:\CDROMID.1 SET CDROM=I:
IF EXIST J:\CDROMID.1 SET CDROM=J:
IF EXIST K:\CDROMID.1 SET CDROM=K:
IF EXIST L:\CDROMID.1 SET CDROM=L:
IF EXIST M:\CDROMID.1 SET CDROM=M:
IF EXIST N:\CDROMID.1 SET CDROM=N:
IF EXIST O:\CDROMID.1 SET CDROM=O:
IF EXIST P:\CDROMID.1 SET CDROM=P:
IF EXIST Q:\CDROMID.1 SET CDROM=Q:
IF EXIST R:\CDROMID.1 SET CDROM=R:
IF EXIST S:\CDROMID.1 SET CDROM=S:
IF EXIST T:\CDROMID.1 SET CDROM=T:
IF EXIST U:\CDROMID.1 SET CDROM=U:
IF EXIST V:\CDROMID.1 SET CDROM=V:
IF EXIST W:\CDROMID.1 SET CDROM=W:
IF EXIST X:\CDROMID.1 SET CDROM=X:
IF EXIST Y:\CDROMID.1 SET CDROM=Y:
IF EXIST Z:\CDROMID.1 SET CDROM=Z:
ECHO Your CDROM-DRIVE is: %CDROM%

ECHO [Version] >> %systemdrive%\runonce.inf
ECHO Signature="$Windows NT$"  >> %systemdrive%\runonce.inf
ECHO [DefaultInstall]  >> %systemdrive%\runonce.inf
ECHO AddReg=Setup  >> %systemdrive%\runonce.inf
ECHO;silent installs  >> %systemdrive%\runonce.inf
ECHO [Setup]  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.2. Norton Antivirus 2003",,"%CDROM%\SFTRoot\DISK-UTILITIES\NAV2003\NAV\NAV.bat"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.3. Office XP",,"%CDROM%\officexp\Silent-Install.bat"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.4. Streets and Trips 2004",,"%CDROM%\trips04\Streets\MSMap\data.bat"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.5. Adobe Reader 6",,"%CDROM%\SFTRoot\OTHER\ADOBEREADER6\AR6.msi /QB"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.6. Diskeeper 8.0 Pro",,"%CDROM%\SFTRoot\DISK-UTILITIES\DISKEEPER\DISKEEPER-PRO-8.EXE /s /v/qn" /f  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.7. DivX Codecs",,"%CDROM%\SFTRoot\MEDIA\CODECS\Codec.Pack.V5.42.Advanced.exe /S"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.8. KazaaLite",,"%CDROM%\SFTRoot\INTERNET\KAZAALITE\KLITEKPP241E.EXE /silent"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.9. MSN 6.1",,"%CDROM%\SFTRoot\INTERNET\MESSENGER\MSNMSGS.msi /qn"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.0. MSN 6.1 Plus",,"%CDROM%\SFTRoot\INTERNET\MESSENGER\MsgPlus-254.exe /SilentInstallNoSponsor"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.1. Gemstar Guide Plus",,"%CDROM%\SFTRoot\OTHER\GEMSTAR\Silent.bat"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.2. Serv-U FTP",,"%CDROM%\SFTRoot\Internet\Serv-U\susetup.exe /s"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.3. Nero Burning ROM 6",,"%CDROM%\BURNING\NERO\Nero.bat /silent /noreboot"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.4. Nero Burning ROM 6 Addons",,"%CDROM%\BURNING\NERO\nve2104.exe /silent /noreboot"  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.5. WinRAR",,"%CDROM%\SFTRoot\OTHER\WINRAR\winrar.bat"  >> %systemdrive%\runonce.inf
ECHO; setup prompts  >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.6. Adaware Serial",,"%CDROM%\SFTRoot\OTHER\ADAWARE\serial.txt" >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.7. Adaware",,"%CDROM%\SFTRoot\OTHER\ADAWARE\AD-AWARE.6.PRO.BUILT.181.EXE /s" >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.8. UltraISO 6",,"%CDROM%\SFTRoot\OTHER\ULTRAISO\iso.bat" >> %systemdrive%\runonce.inf
ECHO;finishing off >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"2.9. Install Files",,"%CDROM%\Tools\Install\Install.bat" >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"3.0. Removing Useless Files",,"%CDROM%\Tools\Finish.bat" >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"3.1. Removing Setup Files",,"%CDROM%\Tools\removesetup.cmd" >> %systemdrive%\runonce.inf
ECHO HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"3.2. Restarting the Computer",,"%CDROM%\Tools\restart2.cmd" >> %systemdrive%\runonce.inf

start /wait rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 %systemdrive%\runonce.inf
del /F /Q %systemdrive%\runonce.inf

does pretty much what the one on the website does, but uses a INF file instead. This is just your cmd file and inf file. The ECHO prints the lines to %systemdrive%\runonce.inf it then executes it, and then deletes it.

i attached it in cmd file form as well

Attached Files

  • Attached File  test.cmd   4.89KB   17 downloads

Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#11
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
YAAAAAAAAAA it WORKS!!!!! THANKS Alanoll!!!!

I dont care how you did it or how it works. ill just edit it and be happy.

Thanks to all for your help wit me.
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot

#12
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
well, just so you know.....
i put ECHO before every line in your INF, and >> %systemdrive%\runonce.inf at the end.

It pretty much your INF besides those two additions. Also, any enters don't work all that well with ECHO
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#13
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
It works but unfortunatly, the variable set doesn't work for the secondary batch files (like NAV.bat) and so I guess i'm back to square one. The only way I see out of this is to use 1 batch for it all. NOOOOOOO
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot

#14
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
what is your NAV bat doing?
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#15
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
the way i do the install from CD and no copy, is I use cmdlines.txt to call my INF which is RunOnceEX. Using the RunOnceEX you can have one thing on the box to display what its doing, but execute many commands like a batch file would do.

In the INF i use the varialbe $1 which is the directory where the INF resides. And the rest is based off that directory.
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#16
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
The reason I sometimes use batch files is because of the switches. When I tried them in the inf setup skipped right buy them. It could be that I did something wrong but are there any limitations to using switches in inf's? and whats the point of the /f at the end after the quotes?
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot

#17
IcemanND

IcemanND

    MSFN Junkie

  • Super Moderator
  • 3,266 posts
  • Joined 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag
if you know the directory you are currently in is the root of your cd you can also do:

set cdrom=%CD%

This sets %cdrom% to the current directory.

#18
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
/f ? did you try the thing on the website?
if so, just open a command prompt, and type
reg add /?

and it will give explanations
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#19
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
Thanks ill include that /f just in case. Okay when I try to use runonce with the msi files like NAV.msi, setup just skims by them. the line is as follows...
HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup,"1.1. Norton Antivirus 2003",,"$1\SFTRoot\DISK-UTILITIES\NAV2003\NAV\NAV.msi /QB" /f
can anyone see a problem with this line?
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot

#20
Quaddamage

Quaddamage

    Newbie

  • Member
  • 24 posts
  • Joined 29-December 03

It works but unfortunatly, the variable set doesn't work for the secondary batch files (like NAV.bat) and so I guess i'm back to square one. The only way I see out of this is to use 1 batch for it all. NOOOOOOO

@X-Ecutioner

I know the problem you are speaking off. I also knocked my head against the wall trying to get a global variable set from the command prompt that would stay permenent so it would work with all your other batch files as well. :) (I run all my software from the cd during runonce rather then copying it to the HD)

After doing some research I started using setenv.

Check out this thread..

Thread

This method allows me to not only set a global variable (during runonce) for the cdrom that specifically holds the XP cd but it also allows my to take my cd to any computer (with windows preloaded) throw it in any cdrom drive and autorun will set a global variable again so all the software can be auto-installed from the cd.


-=Quaddamage=-
-=Quaddamage=-

P4C800-E DLX
p4 2.4c (SL63Z) (OC @ 3.5 stable)
2x256 pc3500 Muskin Black Level II (OC @ DDR476 2.2.2.5)
Radeon 9800 NP (OC @ 380/317)
Zalman 7000
Antec 520W

#21
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
don't use /f in an inf.
its only there for the reg command if you import via command lines like from the website.

if you use an INF, don't use any switches of reg.

and whoops....the $1 should be %1% oops.
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#22
X-Ecutioner

X-Ecutioner

    eXPerience my ass.

  • Member
  • PipPipPip
  • 304 posts
  • Joined 21-October 03
@Alanoll yea when I was looking at the DIRID's for an INF on the MSDN website I saw that. Anywho I went back to the %cdrom%.

@Quaddamage Thanks those parameters for the msiexec... thing worked like a charm. I read that post yesterday and I put it in a cmd (I was tired, I didn't know what I was doing) file but then thought about how I want to get away from the batch files and forgot about it but just now i put it in the inf and it works perfectly. I'll try out that variable.

Thanks for all your help guys.
My Gaming Rig... - Intel Core 2 Duo 6400 (2.13ghz) - Asus P5B Deluxe - OCZ 2 GB PC7200 800Mhz Dual Channel DDR2 RAM - ASUS 8800 GT 512MB - Creative Labs Audigy 2 Platinum Ex - 3x 500GB Hard Drive - 8x DL DVD-Burner - XP SP2 / Vista x86 Dual-boot




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users