Welcome to MSFN

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


quiksilver947

Running scripts with WPI not working

10 posts in this topic

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
0

Share this post


Link to post
Share on other sites

I think you need to use quotes inside your .cmd!

Like this:

REGEDIT /S "%homedrive%\install\tweak.reg"

Edited by myselfidem
0

Share this post


Link to post
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
0

Share this post


Link to post
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
0

Share this post


Link to post
Share on other sites

Here is what my config.js file looks like, at the bottom is the entry to launch the tweak.reg file. Tried what you suggested but still not changing the registry when run using WPI.

config.js

0

Share this post


Link to post
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
0

Share this post


Link to post
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.

0

Share this post


Link to post
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
0

Share this post


Link to post
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!

0

Share this post


Link to post
Share on other sites

Fine quiksilver947! :rolleyes:

Edited by myselfidem
0

Share this post


Link to post
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.