Jump to content

RunonceEX problem


djevil

Recommended Posts

I have just setup a a XP install disc with some applications added, I set in my winnt.sif file this code line

[GuiRunOnce]
%cdrom%\apps\Default.cmd

It now says that it can not find the file "%cdrom%\apps\Default.cmd"

anyone got any ideas?

Link to comment
Share on other sites


  • 3 weeks later...

don't want to create a new topic so I bump this one for a RunOnceEx related question:

I want to extract a 7z archive with RunOnceEx, it works if I put the command in a .cmd file and let RunOnceEx run the .cmd file.

@echo off
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\win51ip.SP2 set CDDRIVE=%%i:\

7za.exe x %cddrive%\InstallApps\systemdrive.7z -aoa -y -o%systemdrive%\

BUT

I don't want to work with .cmd files if it isn't necessary!

So I tried putting the command in RunOnceEx but it doesn't seem to work... just proceeds to the next item on the list:

REG ADD %KEY%\034 /V 1 /D "7za.exe x %cddrive%\InstallApps\systemdrive.7z -aoa -y -o%systemdrive%" /f

How can I get this to work?

Link to comment
Share on other sites

So I tried putting the command in RunOnceEx but it doesn't seem to work... just proceeds to the next item on the list:

REG ADD %KEY%\034 /V 1 /D "7za.exe x %cddrive%\InstallApps\systemdrive.7z -aoa -y -o%systemdrive%" /f

How can I get this to work?

When RunOnceEx runs that above line it's going to be looking for "7za.exe" , specify the path for it.

eg:

REG ADD %KEY%\034 /V 1 /D "%cddrive%\InstallApps\7za.exe x %cddrive%\InstallApps\systemdrive.7z -aoa -y -o%systemdrive%" /f

Good Luck

Cheers

Edit: Try one of these if you want. Tested them in windows but not in a UA

sysdrvun.exe = Place in same folder as your systemdrive.7z file along with 7za.exe. Launch sysdrvun.exe.

No cmd window at launch but the 7za.exe console window shows while extracting systemdrive.7z

or

sysdrvuq.exe = Place in same folder as your systemdrive.7z file along with 7za.exe and nircmd.exe. Launch sysdrvuq.exe. No cmd window and No 7za.exe consol window while extracting.

Made with QBFC.

Edited by smashly
Link to comment
Share on other sites

thanks for the files, but I have 7za.exe in my System32 folder... so it should work... :angry:

also have HIDE.EXE in system32 folder, I don't specify the path, just do "HIDE.exe "path\to\file\test.cmd"" /f and it works, launches the cmd file without showing a window..

Link to comment
Share on other sites

<snip>set CDDRIVE=%%i:\

7za.exe x %cddrive%\InstallApps<snip>

That will not work
either
%cddrive%InstallApps
or
set CDDRIVE=%%i:

BUT

I don't want to work with .cmd files if it isn't necessary!

RunOnceEx is a cmd file!
REG ADD %KEY%\034 /V 1 /D "7za.exe x %cddrive%\InstallApps\systemdrive.7z -aoa -y -o%systemdrive%" /f

How can I get this to work?

Have you defined the %cddrive% variable in RunOnceEx? If you have please check that it is correct as I showed you above, if not define it!
Link to comment
Share on other sites

odd...

that if you run

help for

you'll find this

To use the FOR command in a batch program, specify %%variable instead

of %variable. Variable names are case sensitive, so %i is different

from %I.

So the above is a paste or a copy by what you see?

From what i see there you have this mistake...

Second as a debug option run the RunOnceEx.cmd file in a running enviroment (ie not an installing one) and after check the RunOnceEx regsitry keys that are expanded ok. Try pasting them in the command prompt and see if you get errors.

Also check not to have copy pause move or other direct commands in the registry (you may have them in a .cmd file but not in the registry, since in the registry it can only run programs aka exe files or cmd files...)

Link to comment
Share on other sites

To use the FOR command in a batch program, specify %%variable instead

of %variable. Variable names are case sensitive, so %i is different

from %I.

So the above is a paste or a copy by what you see?

From what i see there you have this mistake...

Where?
@echo off

for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\win51ip.SP2 set CDDRIVE=%%i:\

Link to comment
Share on other sites

Strange, I just tested my original code, the 7za.exe command from RunOnceEx and it worked perfectly!

But it was just a strange thought... nevermind my question, I just don't want to see any windows, so I use Hide.exe (it is only 1.50 KB!) to start a cmd file that runs the command, works just like I want. it is standardly in my system32 folder.

thanks for the help but it was a stupid question!

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