MSFN Forum: no runonceex while overything was fine - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

no runonceex while overything was fine Rate Topic: -----

#1 User is offline   eagle00789 

  • MSFN NutCase
  • PipPip
  • Group: Members
  • Posts: 281
  • Joined: 06-August 04

Posted 13 August 2004 - 08:38 AM

I already transfered from RunOnceEx.cmd to xplode, but i have 1 problem remaining. i have a small runonceex.cmd file left that runs at t-12 so that the xplode install runs at first-logon (automaticly logon). the file is below:
cmdow @ /HID
SETX CDROM %CD:~0,2% -m
@echo off

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

REG ADD %KEY% /V TITLE /D "Installeren van programma's" /f

REG ADD %KEY%\001 /VE /D "Programma's installeren" /f
REG ADD %KEY%\001 /V 1 /D "%cdrom%\apps\xplode\xplode.exe /xml:\"%cdrom%\apps\xplode\xplode.xml\"" /f

the setx command is the same as set, but setx saves the enviroment variabele so that it is available even after several reboots and more (thats what the -m is for). i confirmed that the enviroment variabele exists, and even tryed %cdrom% at it's own in a cmd.exe windows, and it works perfect. only, it doesn't work from t-12. do you have a clue


#2 User is offline   Alanoll 

  • CODE tags people, CODE tags!
  • Group: Patrons
  • Posts: 5,496
  • Joined: 25-September 03

Posted 13 August 2004 - 08:52 AM

the SETX variable will become active on the NEXT batch file opened. If you use both SETX and SET, it won't cause problems.

However, why do you want an %CDROM% variable? XPlode has built in ones for %SOURCEDRIVE% and whatnot which would come out to be the same. And if you have batch files that rely on it that are called from within XPlode just put the variable %SOURCEDRIVE% or whatever in THE ARGUMENTS for the batch call and replace %CDROM% in the batch with %1

#3 User is offline   eagle00789 

  • MSFN NutCase
  • PipPip
  • Group: Members
  • Posts: 281
  • Joined: 06-August 04

Posted 13 August 2004 - 08:56 AM

so this means that i have to change my batchfile to:
cmdow @ /HID
SETX CDROM %CD:~0,2% -m
@echo off

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

REG ADD %KEY% /V TITLE /D "Installeren van programma's" /f

REG ADD %KEY%\001 /VE /D "Programma's installeren" /f
REG ADD %KEY%\001 /V 1 /D "%cdrom%\apps\xplode\xplode.exe /xml:\"%SOURCEDRIVE%\apps\xplode\xplode.xml\"" /f

Is this correct then?

#4 User is offline   sleepnmojo 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 472
  • Joined: 02-March 04

Posted 13 August 2004 - 10:32 AM

You would still have a problem with the %CDROM% for finding the xplode.exe variable. The easiest way to remedy this problem is just add a set command under your setx command.

set cdrom=%CD:~0,2%

#5 User is offline   benners 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 692
  • Joined: 29-December 03

Posted 13 August 2004 - 12:28 PM

Could you just not run it from your winnt file? I use this,
[GuiRunOnce]
    Command0="%systemroot%\XPlode.exe /xml:#systemdrive#\drivers\bennerspc.xml"


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy