djevil Posted April 11, 2006 Share Posted April 11, 2006 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? Link to comment Share on other sites More sharing options...
djevil Posted April 11, 2006 Author Share Posted April 11, 2006 Sorry for double post but I sorted it Link to comment Share on other sites More sharing options...
ZcWorld Posted April 14, 2006 Share Posted April 14, 2006 hi try this [GuiRunOnce]%source%\apps\Default.cmd%source% = cd/dvd rom you installing from Link to comment Share on other sites More sharing options...
ZileXa Posted May 3, 2006 Share Posted May 3, 2006 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? Link to comment Share on other sites More sharing options...
smashly Posted May 3, 2006 Share Posted May 3, 2006 (edited) 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, 2006 by smashly Link to comment Share on other sites More sharing options...
ZileXa Posted May 3, 2006 Share Posted May 3, 2006 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.. Link to comment Share on other sites More sharing options...
Yzöwl Posted May 3, 2006 Share Posted May 3, 2006 <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! Link to comment Share on other sites More sharing options...
lexxdark Posted May 3, 2006 Share Posted May 3, 2006 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...) Link to comment Share on other sites More sharing options...
Yzöwl Posted May 3, 2006 Share Posted May 3, 2006 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:\ Link to comment Share on other sites More sharing options...
lexxdark Posted May 3, 2006 Share Posted May 3, 2006 (edited) I thought that the help was refering for any kind of enviroment variable... but from what I see I'm wrong Edited May 3, 2006 by lexxdark Link to comment Share on other sites More sharing options...
ZileXa Posted May 3, 2006 Share Posted May 3, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now