Jump to content

Recommended Posts

Posted

Hi guys,

I have learned soooo much here over the last few weeks just by reading and trying out things ... wonderful !

I have finished and finetuned my first unattended Windows DVD which is also a Multiboot DVD and it works fine mostly.

However, two nasty problems remain and I cannot by the life of it find a solution so maybe someone can help out !

First problem:

I am trying to copy a few Nero plugin dll´s from CD to harddisk during the installation process. I am calling a cmd called copy.cmd from runonceex like this:

REG ADD %KEY%\022 /V 1 /D "%CDROM%\Setup\Nero\Plugins\install_nero_6.cmd /C" /f

The copy.cmd looks like this:

copy *.dll "%COMMONPROGRAMFILES%\Ahead\AudioPlugins"

Problem is ... the files never get copied! :rolleyes:

If I call the cmd by double clicking on it, then they get copied but it never works when calling the cmd from runonceex.

Second problem:

I have created a simply vb script:

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run ("trueimage.exe")

WScript.Sleep(2000)

WshShell.SendKeys ("{ENTER}")

WScript.Sleep(200)

WshShell.SendKeys ("%{n}")

...

If I call the script in Windows by doubleclicking on the vbs, Trueimage will start and the script works.

If I call the script from runonceex, I get a script error message that something cannot be found.

I then tried to call the setup.exe first, and then the script, like this:

REG ADD %KEY%\023 /VE /D "True Image /f

REG ADD %KEY%\023 /V 1 /D "%CDROM%\Setup\trueimage.exe" /f

REG ADD %KEY%\023 /V 2 /D "%CDROM%\Setup\install.vbs" /f

but then the exe opens, but nothing happens afterwars. I also tried the other way round.

I also tried calling csript like this:

REG ADD %KEY%\023 /V 2 /D "%windir%/system32/cscript.exe %CDROM%\Setup\install.vbs" /f

but again, it does not work.

Either the script seemingly does nothing or I get an error message.

So both of these problems have in common that the files I call work fine if started directly but do not during the runonceex process. :)

I would like to add that all my other apps install fine, both from CD and from %SYSTEMROOT% ( after having been placed in the $OEM$ folder ) so the %CDROM% variable definitely works.

Any ideas ??

Thanks for your help !

Alex


Posted

For your vbscript problem try to get the path of the script (if the script and trueimage.exe are in the same folder). Try this, maybe it will solve your problem.

You can use CScript or WScript

Set WshShell = CreateObject("WScript.Shell")
Set FileSysObj = CreateObject("Scripting.FileSystemObject")

ScriptPath = FileSysObj.GetFile(WScript.ScriptFullName).ParentFolder

Cmd = Chr(34) & ScriptPath & "\trueimage.exe" & Chr(34)
WshShell.Run Cmd

WScript.Sleep 2000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 200
WshShell.SendKeys "%{n}"

REG ADD %KEY%\023 /VE /D "True Image" /f

REG ADD %KEY%\023 /V 1 /D "WScript.exe %CDROM%\Setup\install.vbs" /f

You have a better chance to make it work like that.

:)

Posted

jdoe,

thank you very much ! I have no idea what this script of yours does ( I am complete newbie with scripts ) but it works fine now ! THANK YOU !

killerbee:

thank you but the problem starts earlier I guess ... I just tried it again and I always get the following messages:

"copy" could not be found ....

The same applies to other commands like "md" etc ...

This is very strange, isn´t it ? I tried searching for "copy" on my harddisk, but this is just a command in the cmd and no file so why does Windows not find it when called from a runonceex.md ??

Anyone ??

Thanks, Alex

Posted

Ok,

in case anyone else comes across this problem one day ... I had to tweak the command some more. This one works finally ! :)

REG ADD %KEY%\022 /V 1 /D "CMD /C copy /Y %CDROM%\Setup\Nero\Plugins\*.dll \"%COMMONPROGRAMFILES%\Ahead\AudioPlugins\\"" /f

Bye,

Alex

Posted

if you want some complexity....just make a SFX file. (self extracting archive). With that you can tell it where to extract the files to, and all you have to do is run the extraction EXE.

in the scheme of things it is more complex then the $OEM$ folder, but less so than xcopy (IMO)

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