Jump to content

cmdlines.txt help


Recommended Posts

Can someone tell me why my cmdlines.txt isn't working.

[Commands]
"OemPreinstall.cmd"
"REGEDIT /S SHOW_OPERATING_FILES.REG"
"COMPRESSION_STUFF.CMD"

My OemPreinstall.cmd works fine, but my REGEDIT /S SHOW_OPERATING_FILES.REG"

"COMPRESSION_STUFF.CMD will not install.

Link to comment
Share on other sites


Make sure those files are in the $OEM$ folder.

You can try calling those files from OemPreinstall.cmd instead. This way you can log it.

Add something like this to OemPreinstall.cmd.

If EXIST SHOW_OPERATING_FILES.REG (
Echo SHOW_OPERATING_FILES.REG exists! >> %systemroot%\temp\install.log
REGEDIT /S SHOW_OPERATING_FILES.REG
)
If EXIST COMPRESSION_STUFF.CMD (
Echo COMPRESSION_STUFF.CMD exists! >> %systemroot%\temp\install.log
Call COMPRESSION_STUFF.CMD
)

This will check if the file exists, and if it does, add a record into system.log and run the file.

Link to comment
Share on other sites

Make sure those files are in the $OEM$ folder.

You can try calling those files from OemPreinstall.cmd instead. This way you can log it.

Add something like this to OemPreinstall.cmd.

If EXIST SHOW_OPERATING_FILES.REG (
Echo SHOW_OPERATING_FILES.REG exists! >> %systemroot%\temp\install.log
REGEDIT /S SHOW_OPERATING_FILES.REG
)
If EXIST COMPRESSION_STUFF.CMD (
Echo COMPRESSION_STUFF.CMD exists! >> %systemroot%\temp\install.log
Call COMPRESSION_STUFF.CMD
)

This will check if the file exists, and if it does, add a record into system.log and run the file.

Please elaborate. What I see will definitely not work. Cmdlines.txt stuff needs to have quotations. I don't see any quotations.

Link to comment
Share on other sites

msdemich said to add it to OemPreinstall.cmd and not cmdlines.txt...

Like he said, check if you have SHOW_OPERATING_FILES.REG and COMPRESSION_STUFF.CMD in $OEM$ ?

If you don't, then that's the problem...

Link to comment
Share on other sites

msdemich said to add it to OemPreinstall.cmd and not cmdlines.txt...

Like he said, check if you have SHOW_OPERATING_FILES.REG and COMPRESSION_STUFF.CMD in $OEM$ ?

If you don't, then that's the problem...

Both my SHOW_OPERATING_FILES.REG and COMPRESSION_STUFF.CMD are in the $OEM$ folder. I don't understand what msdemich is saying to do. msdemich, could you please elaborate.

Link to comment
Share on other sites

He's saying to add his code to your OemPreinstall.cmd...

You know, rightclick OemPreinstall.cmd >> Edit, and then copy/paste msdemich code into the bottom of it and save it... Remember to also delete the two bottom lines from cmdlines.txt...

The code checks if the files are present in the $OEM$ folder and if they are, then a success message is written to install.log in '%windir%\temp\' and the files is run/merged...

Are you sure that the files themselves works as expected and are error-free ?

Link to comment
Share on other sites

Make sure those files are in the $OEM$ folder.

You can try calling those files from OemPreinstall.cmd instead. This way you can log it.

Add something like this to OemPreinstall.cmd.

If EXIST SHOW_OPERATING_FILES.REG (
Echo SHOW_OPERATING_FILES.REG exists! >> %systemroot%\temp\install.log
REGEDIT /S SHOW_OPERATING_FILES.REG
)
If EXIST COMPRESSION_STUFF.CMD (
Echo COMPRESSION_STUFF.CMD exists! >> %systemroot%\temp\install.log
Call COMPRESSION_STUFF.CMD
)

This will check if the file exists, and if it does, add a record into system.log and run the file.

Ok I used your install.log thing. It my 2 files exist. Look at this picture.

http://i255.photobucket.com/albums/hh133/C...DEUSF/pic13.jpg

Link to comment
Share on other sites

As you mention as posted here that you want to install from your %UserProfile% directories. The issue you are perhaps experiencing is that your %UserProfile% directories may not exist when Cmdlines.txt is executed. Only "Default User" and "All Users" profiles are available from Cmdlines.txt and any additional profiles created by the user are not available for use until they are logged into to at least once.

"C:\Documents and Settings\Default User\Desktop\7-Zip-v4.42.exe" is not recognized as an internal oe external command, operable program or batch file.

So perhaps 7-Zip-v4.42.exe is not in the "Desktop" directory of the "Default User" profile?

If you wish to continue with the idea of adding installers to your personal %UserProfile%, then consider adding the files when your account has been created and logged into at least once. The usual time to add files to your own profile would be using RunOnceEx or GuiRunOnce which occur when you are logged into your account.

:)

Link to comment
Share on other sites

So perhaps 7-Zip-v4.42.exe is not in the "Desktop" directory of the "Default User" profile?

:)

Yep your right. Someone on my forum was able to figure that out for me. So I redid a lot of my stuff.

I had a lot of mismatches with my two different desktops. I redid everything to make life easier. I put everything on the c drive in a folder called COOL_STUFF. So it's "%SYSTEMDRIVE%\COOL_STUFF\.

Here's my cmdline.txt

[Commands]
"OemPreinstall.cmd"
"REGEDIT /S SHOW_OPERATING_FILES.REG"
"COMPRESSION_STUFF.CMD"
"REGEDT32.EXE /S SHOW_OPERATING_FILES.REG"
"SHOW_OPERATING_FILES.cmd"

Here's my COMPRESSION_STUFF.CMD

pause
"%SYSTEMDRIVE%\COOL_STUFF\7-Zip-v4.42.exe"
"%SYSTEMDRIVE%\COOL_STUFF\WinRAR-v3.71.exe"
pause

Here's my SHOW_OPERATING_FILES.REG.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Hidden"=dword:00000001
"SuperHidden"=dword:00000001
"ShowSuperHidden"=dword:00000001

This time with everything redid my 7-Zip-v4.42.exe and WinRAR-v3.71.exe did nothing. There was no error message and after my computer restarted those 2 programs weren't installed. Also SHOW_OPERATING_FILES.REG said they installed and after my computer restarted the reg tweaks didn't work. I had to click yes and ok, so I don't understand why they weren't installed.

Link to comment
Share on other sites

Try this:

COMPRESSION_STUFF.CMD

@Start "" /wait %SYSTEMDRIVE%\COOL_STUFF\7-Zip-v4.42.exe
@Start "" /wait %SYSTEMDRIVE%\COOL_STUFF\WinRAR-v3.71.exe

Start should at least be recognized!

Or a little more 'error trapping':

COMPRESSION_STUFF.CMD

@Echo off
Pushd %SystemDrive%\Cool_Stuff 2>%SystemDrive%\C_S.log||Goto :Eof
For %%# In (7-Zip-v4.42 WinRAR-v3.71) Do (If Exist %%#.exe (
Start "" /wait %%#.exe) Else (>>%SystemDrive%\C_S.log Echo:%%# did not exist))
Popd

If you have a C_S.log file in the root your system drive then there was a problem finding the installation files.

Link to comment
Share on other sites

Does anyone have any ideas? This is driving me crazy.

Try the idea that Yzöwl offers. If it fails then could you explain your setup some more so we may try to help you better.

Some unknowns to consider

  • Are you using "OEMPreInstall=Yes" in Winnt.sif and adding these installers to "$OEM$\$1\COOL_STUFF" ?
  • What does OemPreInstall.cmd contain or do ?
  • Your installers use no switches so are they SFX archives that use a suitable extract and execute setup method ?

Known issues to consider

  • Certain HKCU tweaks may not be accepted at T-12 stage of setup (cmdlines.txt). Add those certain tweaks at logon.

Attaching any files mentioned above (mask any sensitive information) may also help to diagnose the issue.

Link to comment
Share on other sites

The issue you are perhaps experiencing is that your %UserProfile% directories may not exist when Cmdlines.txt is executed. Only "Default User" and "All Users" profiles are available from Cmdlines.txt and any additional profiles created by the user are not available for use until they are logged into to at least once.

I believe MHz is right; the user has not been created yet at the cmdlines.txt phase (since it runs before restart and OOBE). Furthermore, if the User part of the registry hive isn't created yet, which resides in your %UserProfile% folder, then HKCU reg entries will not import here. Its best to run those reg tweaks at RunOnceEx phase, which happens AFTER the restart.

This page may help with adding reg entries and running programs at the RunOnceEx phase:

http://unattended.msfn.org/unattended.xp/view/web/31/

Are you sure that your COOL_STUFF folder is created and the files copied properly on setup? Do you put it in the $OEM$\$1 folder on your install CD or do you create the folder and copy the files another way? As Mhz mentions, the winrar and 7zip installers need either command-line switches or to be packaged so as to be silent installers. You can find some of these packages made by the community here: http://www.ryanvm.net/forum/viewforum.php?...f364be897813270.

Link to comment
Share on other sites

  • 3 weeks later...
Try this:

COMPRESSION_STUFF.CMD

@Start "" /wait %SYSTEMDRIVE%\COOL_STUFF\7-Zip-v4.42.exe
@Start "" /wait %SYSTEMDRIVE%\COOL_STUFF\WinRAR-v3.71.exe

Start should at least be recognized!

Or a little more 'error trapping':

COMPRESSION_STUFF.CMD

@Echo off
Pushd %SystemDrive%\Cool_Stuff 2>%SystemDrive%\C_S.log||Goto :Eof
For %%# In (7-Zip-v4.42 WinRAR-v3.71) Do (If Exist %%#.exe (
Start "" /wait %%#.exe) Else (>>%SystemDrive%\C_S.log Echo:%%# did not exist))
Popd

If you have a C_S.log file in the root your system drive then there was a problem finding the installation files.

Ok I'm about to start doing your idea. I stopped doing this for like a month to give my mind a break.

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