Jump to content

cmd/xplode/variables OH MY!


evilvoice

Recommended Posts

Ok, new question...this is currently what I am using to run a batch file (cmd file)

	 <item display='Running Programs Based on Type of Computer'>
 <execute display='Computer' program='#SYSTEMDRIVE#\Install\custom.cmd' hide='true'/>

this is custom.cmd

If /I %computername%==Computer GOTO Comp1 ELSE GOTO Comp2
:Comp1
%systemroot%\XPlode.exe /xml:#systemdrive#\drivers\akumadev.xml /log:#systemdrive#\akumadev.log
GOTO END
:Comp2
%systemroot%\XPlode.exe /xml:#systemdrive#\drivers\computer.xml /log:#systemdrive#\computer.log
GOTO END
:END
ECHO If you have a second cd to install programs, insert it now
sleep 120
IF EXIST D:\2cd.xml set XPCD=D:
IF EXIST E:\2cd.xml set XPCD=E:
IF EXIST F:\2cd.xml set XPCD=F:
IF EXIST G:\2cd.xml set XPCD=G:
IF EXIST H:\2cd.xml set XPCD=H:
IF EXIST I:\2cd.xml set XPCD=I:
IF EXIST J:\2cd.xml set XPCD=J:
IF DEFINED XPCD %systemroot%\XPlode.exe /xml:#XPCD#\2cd.xml /log:#systemdrive#\2cd.log
ECHO Done

Now, is there anything in the batch file that I can take out and have xplode run? (I mean like not use the batch file at all)

Also, will the batch file work? in theory it looks like it will, but I dont know if xplode can be called like that or not...or if there are any changes I need to make.

Link to comment
Share on other sites


:hello: evilvoice,

I have just tested some code of your example and think I've found a bug.

IF DEFINED XPCD %systemroot%\XPlode.exe /xml:#XPCD#\2cd.xml /log:#systemdrive#\2cd.log

I think the if command have to be used like this:

if defined windir (echo.%windir%) else echo.variable "windir" ist not defined

and I am not sure, that the # will work inside the batch, I would prefer the % signs for this - but how I said I am not sure! :wacko:

At least - I find your example very good! In the forum are often Questions on howto use a CDROM for the setup files. Your example is nice and easy. :thumbup

Have a nice day, Sie Tjin Kian

Link to comment
Share on other sites

hi,

please look at this:

<items>
 <item display='Users and other Basics'>
 <execute display='Users and other basics...' program='#XPLODE#\XPlode\xplode.exe' arguments='/xml:"#XPLODE#\xplode\basic.xml" /log:"#SYSTEMDRIVE#\basic.log"'></execute>
 </item>
 <item display='XPlode v2 test'>
 <execute display='Users and other basics...' program='#XPLODE#\XPlode2\xplode2.exe' arguments='/xml:"#XPLODE#\xplode2\xplode.xml" /log:"#SYSTEMDRIVE#\xplode2.log"'></execute>
 </item>
 <item display='Installing Tools'>
 <execute display='Tools...' program='#XPLODE#\XPlode\xplode.exe' arguments='/xml:"#XPLODE#\xplode\tools.xml" /log:"#SYSTEMDRIVE#\tools.log"'></execute>
 </item>
 <item display='Installing Appz'>
 <execute display='Indaned Appz...' program='#XPLODE#\XPlode\xplode.exe' arguments='/xml:"#XPLODE#\xplode\indaned.xml" /log:"#SYSTEMDRIVE#\indaned.log"'></execute>
 </item>
 <item display='Installing cracked Appz'>
 <execute display='cracked Appz...' program='#XPLODE#\XPlode\xplode.exe' arguments='/xml:"#XPLODE#\xplode\cracked.xml" /log:"#SYSTEMDRIVE#\cracked.log"'></execute>
 </item>
 <item display='Cleaning up'>
 <execute display='Cleanup...' program='#XPLODE#\XPlode\xplode.exe' arguments='/xml:"#XPLODE#\xplode\cleanup.xml" /log:"#SYSTEMDRIVE#\cleanup.log"'></execute>
 </item>
 <item display='Finalizing'>
 <execute display='Finalizing...' program='#XPLODE#\XPlode\xplode.exe' arguments='/xml:"#XPLODE#\xplode\final.xml" /log:"#SYSTEMDRIVE#\final.log"'></execute>
 </item>
</items>
<

with this way you can shorten the beginning of your batch. Just call xplode to call the 2 xml's at the beginning.

hope this helps a bit

cya

Killer Bee

Link to comment
Share on other sites

I dont see how that example will shorten my batch file...? or maybe im missing something...basically, it runs one set of xml if the computer name is Computer, if it is not called computer, it runs the other set...they are not the same, and I do not want both installed on every machine...and then once one or the other xml is run based on computer name, then it checks for a 2nd cd. So basically, I would need a way for xplode to check the computer name and run the xml based on that...kinda like users reg tweaks, but maybe a little more advanced.

Link to comment
Share on other sites

Updated question: so, if I put xplode on all cds that I have, and some have comp1.xml, and others have comp2.xml...lets say that only one exists on each cd...either comp1 or comp2...now, lets say I use your example and put

<items>
<item display='Computer Profile 1'>
 <execute display='Computer Profile 1' program='#XPLODE#\XPlode2\xplode2.exe' arguments='/xml:"#XPLODE#\xplode2\comp1.xml" /log:"#SYSTEMDRIVE#\comp1.log"'></execute>
</item>
<item display='Computer Profile 2'>
 <execute display='Computer Profile 2' program='#XPLODE#\XPlode2\xplode2.exe' arguments='/xml:"#XPLODE#\xplode2\comp2.xml" /log:"#SYSTEMDRIVE#\comp2.log"'></execute>
</item>
</items>

so if it doesnt find comp1.xml, itll pass by it and run comp2.xml? I also believe the way I have the files and dirs setup is correct since only one version of xplode2.exe would be running at this time...I know its just taking xplode and renaming it xplode2, but that is so there arent sharing violations, and I dont think there will be sharing violations since itll run one or the other, but let me know if I need xplode3.exe...

i think that is what you meant when you posted your example, but I didnt understand it then LOL. but yea, let me know if that would work in theory.

Link to comment
Share on other sites

@Sie Tjin Kian

the setting xpcd is not my batch file, it is one taken from one of the numerous posts here...I am unsure who thought of this, but it is definitely not mine...also, wraith has said that the xml needs to be called with #'s and not %'s which is why there is #'s in the second part of that...I havent tested the file yet, but I guess I could try and see what happens...

this works, btw...

IF DEFINED xpcd "%XPCD%\XPlode.exe" /xml:#XPCD#\XPlode.xml /log:%systemroot%\xplode.log

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