Jump to content

Recommended Posts

Posted

I've recently had to resort to using .js for my unattended install, sure there are probably other ways but I've gotten some great assistance from brent24 and everything started looking great.

Now this is where the troubles start.

My .js files (I have three atm php.js, abyss.js and freepops.js) are just not being executed or just don't work for some other reason hidden from me.

If I go to cmd and execute them using:

%systemroot%\system32\cscript.exe //nologo %systemdrive%\install\Applications\FreePOPs\freepops.js

sometimes it works, sometimes it doesn't it's completely random. When it doesn't work I get:

C:\install\Applications\WHICHEVER\WHICHEVER.I.USE.js(13, 1) WshShell.Exec: The system cannot find the file specified.

I checked, rechecked and rechecked and the files are all there and there are no typos.

If I try to execute my .js files from RunOnceEx.cmd using for instance:

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%\015 /VE /D "FreePOPs 0.0.19" /f
REG ADD %KEY%\015 /V 1 /D "%systemroot%\system32\cscript.exe //nologo %systemdrive%\install\Applications\FreePOPs\freepops.js"

EXIT

Nothing happens BTW I did make sure those values are in the registry but when I restart I don't even see the Installing Applications thing (it might all happen so fast that I don't even see it).

And here's the strange part if I execute any of those three .js files manually...by clicking on them...everything installs perfectly...everytime.

Here is one of the files that I'm using - freepops.js:

function getWin(win, inc)
{
var cntr = 0;
while (!WshShell.AppActivate(win))
{
if (cntr==12) return true;
cntr++;
WScript.Sleep(inc);
}
return true;
}
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("FreePOPs-0.0.19.exe /S");
var timer = 1000;
while (oExec.Status == 0)
{
getWin("FreePOPs", timer);
WshShell.SendKeys ("n");
WScript.Sleep(timer);
}
WScript.Sleep(timer);
WScript.quit();

brent24 also suggested (thank you again for all your assistance) I try this in my RunOnceEx.cmd:

REG ADD %KEY%\005 /VE /D "A Test1" /f
REG ADD %KEY%\005 /V 1 /D cmd /c  %systemroot%\system32\cscript.exe > c:\test1.txt" /f
REG ADD %KEY%\006 /VE /D "A Test2" /f
REG ADD %KEY%\006 /V 1 /D cmd /c  dir /s %systemdrive%\install\Applications > c:\test2.txt" /f

Same result, nothing happens. Of course if/when I execute those same commands in cmd prompt they work.

Like I said above I'm sure other methods would work like AutoIt (know about it even read some documentation but don't know how to use it) or even taskkill/pskill (not for FreePOPs) but I really want to make this work...well it does but I can't be clicking on my .js files during my uA install ;)

Some additional info. I'm using Windows XP SP2 with quite a few components removed using nLIte (not that it makes much of a difference since manually it works), no firewall or antivirus that could be stopping that.

Any idesa, suggestions or even hunches are more then welcome.

EDIT: I forgot to put the leading quote with the test1 & test2.txt...added it later and it made no difference.

I also might add that installing any application using the RunOnceEx.cmd method works just great it's just the .js files I'm having trouble with.


Posted

I really hate doing this (replying to/bumping my post) but these three apps:

Abyss Web Server (http://www.aprelium.com/)

FreePOPs (http://www.freepops.org/en/) &

PHP 5.0.2 Installer (http://www.php.net/)

are the only ones I haven't been able to install.

Abyss uses the NSIS installer (switch /S) and the other two the Wise installer (switch /s).

In their own those apps shouldn't be that hard to install but they all have one or multiple popups and like I said previously pskill/taskkill will not work eps. with FreePOPs. I did search hopeing for other ideas but came up empty.

I would really appreciate it if someone took some time and helped me out at least a bit. Out of those three PHP is definitely the easiest to install it has one popup and that's it.

I'd really like to get to the bottom of why my .js scripts (which work otherwise - manual click) are not working but if someone can provide any other method of installing those three I'd gladly forget about .js and use that.

Posted

REG ADD %KEY%\005 /VE /D "Add TweakUI to Control Panel" /f
REG ADD %KEY%\005 /V 1 /D "%CDROM%\Software\AddTweakUItoControlPanel.vbs" /f

Here is a vbs file. Similar to js. It works?

Posted

MHz thank you for replying but I fail to see how that will help me, I believe my RunOnceEx.cmd is correct it even gets imported to the registry as stated before and what your example shows is the same except you are using .vbs (I don't have that kind of script that will install any of my apps in that manner) insead .js ...or am I missing something.

What I'm after is a way to install those three apps...or some sort of indication that my code is incorrect.

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