Jump to content

Running scripts with WPI not working


Recommended Posts

I am using WPI to run two scripts before I begin installing software. The two .cmd files I am running perform these two actions. Format a partition (D:) to use NTFS file system and create folders within this partition once formatting is done. WPI launches this command fine and it works successfully for what I want it to do. The other command is a registry tweak that does not seem to work, however if I type what I have inside my .reg file into a command prompt it works fine. I created a simple .cmd to launch a .reg file silently to accomplish this. Attached is the .cmd file and .reg file. Thanks for the help if anyone has ideas.

runregtweak.cmd

tweak.reg

Edited by quiksilver947
Link to comment
Share on other sites


I added quotes to the .cmd file where myselfidem suggested and created another ISO using nLite. It still did not change the registry. I restarted and everything after WPI was finished running the two scripts. It confuses me because the script works if I launch runregtweak.cmd not using WPI. I am also making sure that WPI is using the script to format D: and add folders before the registry tweak script runs.

Edited by quiksilver947
Link to comment
Share on other sites

I think it's not really needed to use a batch file to add some tweaked keys inside the registry!

You can use only a reg file inside WPI.

I've tried WPI a long time ago successfully with version 7.2.0 for Windows XP SP3 and also using nLite!

Example here to add a reg file:

cmds[pn]=['{REGEDIT} %WPIPath%\\Install\\Nero\\nero.reg'];

You can see your customization inside: "WPI\WPIScripts\config.js"

If you want launch a .cmd:


cmds[pn]=['"%WPIPath%\\Install\\Finis.cmd"'];

Be carefull with the paths.

I hope that will help you!

Edited by myselfidem
Link to comment
Share on other sites

Have you set the "tweak.reg" file inside the folder "%homedrive%\install", like the others .cmd?

These one works fine (taitshort.bat; formatD.cmd )?

Why don't you set them inside "WPI\install\"?:

Your script:

cmds[pn]=['"%homedrive%\\install\\runregtweak.cmd"'];

You can try like this:

cmds[pn]=['"%homedrive%\\wpi\\install\\taitshort.bat"'];

I think the path isn't correct.

Have you made two folders "install"? One inside "WPI" and an other outside?

You can also use WPI.exe (run) to run your batch file on your computer to test this one!

I think it's better to use %WPIPATH%\\install\\: some help here

Sample Config

Edited by myselfidem
Link to comment
Share on other sites

It seems like no matter how I switch things around WPI isn't launching something right. Because the registry is changed when I am clicking on and running runregtweak.cmd from explorer. I even took the /S out of the runregtweak.cmd file, to see if WPI is even trying to launch it and the window does come up saying "Are you sure you want to add the information in %path% to the registry? I proceed to click yes and nothing happens. But when I run runregtweak.cmd on my own without WPI the same window comes up, I click yes, and the registry is changed.

Link to comment
Share on other sites

What is your OS system? XP Pro x64?

I see you don't use the option for x64 with config.js:

prog[pn]=['7zip'];

uid[pn]=['7ZIP'];

dflt[pn]=['no'];

forc[pn]=['no'];

bit64[pn]=['no'];

cat[pn]=['Applications'];

cmds[pn]=['"%homedrive%\\wpi\\install\\oss\\7z465-x64.msi" /quiet'];

desc[pn]=['7zip'];

pn++;

If you use WPI fo XP Pro x64 you can set the reg file inside $OEM$ and write inside "cmdlines.txt":

[Commands]

"regedit /s tweak.reg"

Set "tweak.reg" inside $OEM$.

Edited by myselfidem
Link to comment
Share on other sites

You are correct myselfidem, I overlooked that detail. Yes, I am installing XP x64 systems using this. I switched the bit64[pn]=['no'] to ['yes'] and the registry change happened like I have been it expecting it to. Now I need to change this for all x64 programs I am installing and test them as well. But that fixed the issue I was having with the registry not changing. Thanks for all the help, I really appreciate it!

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