Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Running scripts with WPI not working

- - - - -

  • Please log in to reply
9 replies to this topic

#1
quiksilver947

quiksilver947

    Newbie

  • Member
  • 23 posts
  • Joined 27-May 10
  • OS:XP Pro x64
  • Country: Country Flag
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.

Attached Files


Edited by quiksilver947, 22 June 2010 - 09:40 AM.



How to remove advertisement from MSFN

#2
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
I think you need to use quotes inside your .cmd!
Like this:
REGEDIT /S "%homedrive%\install\tweak.reg"

Edited by myselfidem, 22 June 2010 - 10:42 AM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#3
quiksilver947

quiksilver947

    Newbie

  • Member
  • 23 posts
  • Joined 27-May 10
  • OS:XP Pro x64
  • Country: Country Flag
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, 22 June 2010 - 11:49 AM.


#4
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
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, 22 June 2010 - 12:36 PM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#5
quiksilver947

quiksilver947

    Newbie

  • Member
  • 23 posts
  • Joined 27-May 10
  • OS:XP Pro x64
  • Country: Country Flag
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.

Attached Files



#6
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
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, 23 June 2010 - 12:11 AM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#7
quiksilver947

quiksilver947

    Newbie

  • Member
  • 23 posts
  • Joined 27-May 10
  • OS:XP Pro x64
  • Country: Country Flag
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.

#8
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
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, 23 June 2010 - 08:09 AM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#9
quiksilver947

quiksilver947

    Newbie

  • Member
  • 23 posts
  • Joined 27-May 10
  • OS:XP Pro x64
  • Country: Country Flag
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!

#10
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
Fine quiksilver947! :rolleyes:

Edited by myselfidem, 23 June 2010 - 08:14 AM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users