April 11, 200620 yr 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.cmdIt now says that it can not find the file "%cdrom%\apps\Default.cmd"anyone got any ideas?
April 14, 200620 yr hi try this [GuiRunOnce]%source%\apps\Default.cmd%source% = cd/dvd rom you installing from
May 3, 200620 yr 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 offfor %%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%\BUTI 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%" /fHow can I get this to work?
May 3, 200620 yr 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%" /fHow 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%" /fGood LuckCheersEdit: Try one of these if you want. Tested them in windows but not in a UAsysdrvun.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.7zorsysdrvuq.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 May 3, 200620 yr by smashly
May 3, 200620 yr thanks for the files, but I have 7za.exe in my System32 folder... so it should work... 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..
May 3, 200620 yr <snip>set CDDRIVE=%%i:\7za.exe x %cddrive%\InstallApps<snip>That will not workeither%cddrive%InstallAppsorset CDDRIVE=%%i:BUTI 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%" /fHow 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!
May 3, 200620 yr odd...that if you runhelp foryou'll find thisTo use the FOR command in a batch program, specify %%variable insteadof %variable. Variable names are case sensitive, so %i is differentfrom %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...)
May 3, 200620 yr To use the FOR command in a batch program, specify %%variable insteadof %variable. Variable names are case sensitive, so %i is differentfrom %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 offfor %%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:\
May 3, 200620 yr I thought that the help was refering for any kind of enviroment variable... but from what I see I'm wrong Edited May 3, 200620 yr by lexxdark
May 3, 200620 yr 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!
Create an account or sign in to comment