Jump to content

no runonceex while overything was fine


Recommended Posts

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

Link to comment
Share on other sites


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

Link to comment
Share on other sites

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?

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