Jump to content

Yzöwl

Patron
  • Posts

    4,113
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

Everything posted by Yzöwl

  1. Well I just tried to create a shortcut to readme.txt in ERUNT, no error message, but it didn't work. I suppose because there is little benefit to be had in creating a shortcut to something in the same location as the file it links to.
  2. The problem is usually because the shortcuts can be located on one of many desktops! Here is a simple piece of code to go into your batch that will remove All Desktop shortcuts (*.lnk) for /d %%a in ("%AllUsersProfile:\All Users=%\*") do if exist "%%~a\Desktop\*" del /q "%%~a\Desktop\*.lnk" To test it first on your existing installation, to see what would be removed, nothing will be, open a cmd prompt and type or paste the following single line into it @echo off &&for /d %a in ("%AllUsersProfile:\All Users=%\*") do if exist "%~a\Desktop\*" echo Cleaning shortcuts from the "%~na Desktop" &&@echo del /q "%~a\Desktop\*.lnk"
  3. @ someuser77 First of all, it looks as if you have quotation marks in the wrong places. Also where are you creating your shortcut? it appears as if you are placing one in %SystemDrive% called Readme to link to a readme.txt file also located in %SystemDrive%! Here is a simple example along similar lines, to show you [Version] Signature = $Windows NT$ [DefaultInstall] UpdateInis = AddShortcut [AddShortcut] setup.ini, progman.groups,, "group2=""%16386%\ERUNT\""" setup.ini, group2,,"Readme,""""""%16422%\ERUNT\README.TXT"""""""This will place a shortcut in %USERPROFILE%\Start Menu\Programs\ERUNT called Readme to link to a readme.txt file located at %PROGRAMFILES%\ERUNT. Use the DIRIDs given in my original posting to try to help understand it. Hope it helps!
  4. I tested it first and it worked perfectly on my machine, which is a surprise, because both %% and ^% are a bit hit and miss when it comes to not expanding environment variables. There is a method to stop this happening There is no benefit in making your keys REG_EXPAND_SZ, REG_SZ would be fine, since the variable would expand to the correct value upon running the batch file. e.g. REG ADD HKLM\SOFTWARE\Classes\aspfile\shell\Edit\command /ve /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" \"%%1\"" /f
  5. You need to search this site, two different methods using inf files have been posted regarding this subject. One of the subjects has been discussed in the last few days. Try a search for +inf +shortcut
  6. Just a couple of things I noticed, firstly, the reg file, if used would probably have been better in a non-unicode format for non xp guys. Also is NotePad++ installed by default into %ProgramFiles%\Desktop Publishing\Notepad++, as is coded like that in all your hex strings. Additionally if anyone wishes to see what I mean a little better for now, see the batch version of it below! @echo off cmdow @ /hid :: Register files with Notepad++ REG ADD HKLM\SOFTWARE\Classes\.as /ve /d "Property.Script" /f REG ADD HKLM\SOFTWARE\Classes\.bsh /ve /d "Public.Script" /f REG ADD HKLM\SOFTWARE\Classes\.c /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.c /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.cc /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.cc /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.cpp /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.cpp /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.cs /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.cs /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.cxx /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.cxx /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.diz /ve /d "txtfile" /f REG ADD HKLM\SOFTWARE\Classes\.f /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.f /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.f2k /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.f2k /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.f90 /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.f90 /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.f95 /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.f95 /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.for /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.for /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.h /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.h /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.hpp /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.hpp /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.hxx /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.hxx /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.inc /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.inc /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.java /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.java /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.jsp /ve /d "jspfile" /f REG ADD HKLM\SOFTWARE\Classes\.lau /ve /d "Public.Script" /f REG ADD HKLM\SOFTWARE\Classes\.m /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.m /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.mak /ve /d "txtfile" /f REG ADD HKLM\SOFTWARE\Classes\.mak\PersistentHandler /ve /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f REG ADD HKLM\SOFTWARE\Classes\.mx /ve /d "Property.Script" /f REG ADD HKLM\SOFTWARE\Classes\.nfo /ve /d "txtfile" /f REG ADD HKLM\SOFTWARE\Classes\.nfo\PersistentHandler /ve /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f REG ADD HKLM\SOFTWARE\Classes\.nsh /ve /d "Public.Script" /f REG ADD HKLM\SOFTWARE\Classes\.nsi /ve /d "Public.Script" /f REG ADD HKLM\SOFTWARE\Classes\.nt /ve /d "Property.Script" /f REG ADD HKLM\SOFTWARE\Classes\.pas /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.pas /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.php /ve /d "phpfile" /f REG ADD HKLM\SOFTWARE\Classes\.phtml /ve /d "phtmlfile" /f REG ADD HKLM\SOFTWARE\Classes\.pl /ve /d "Public.Script" /f REG ADD HKLM\SOFTWARE\Classes\.pm /ve /d "Public.Script" /f REG ADD HKLM\SOFTWARE\Classes\.py /ve /d "Public.Script" /f REG ADD HKLM\SOFTWARE\Classes\.rc /ve /d "Property.Script" /f REG ADD HKLM\SOFTWARE\Classes\.sh /ve /d "Public.Script" /f REG ADD HKLM\SOFTWARE\Classes\.sql /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.sql /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.tex /ve /d "SrcCode" /f REG ADD HKLM\SOFTWARE\Classes\.tex /v "PerceivedType" /d "text" /f REG ADD HKLM\SOFTWARE\Classes\.vb /ve /d "vbsfile" /f REG ADD HKLM\SOFTWARE\Classes\aspfile\shell\edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\batfile\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\cmdfile\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\cmdfile\shell\Print\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\CSSfile\shell\edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\htmlfile\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\inffile\shell\open\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\inffile\shell\print\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" /p \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\inifile\shell\open\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\inifile\shell\print\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" /p \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\JSEFile\Shell\Edit\Command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\JSEFile\Shell\Print\Command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" /p \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\JSFile\Shell\Edit\Command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\JSFile\Shell\Print\Command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" /p \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\JSPFile /ve /d "Java Server Page" /f REG ADD HKLM\SOFTWARE\Classes\JSPFile\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\PHPFile /ve /d "PHP Script" /f REG ADD HKLM\SOFTWARE\Classes\PHPFile\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\phtmlfile /ve /d "Embedded Perl (ePerl) File" /f REG ADD HKLM\SOFTWARE\Classes\phtmlfile\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\Property.Script\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\Public.Script /ve /d "Public Script" /f REG ADD HKLM\SOFTWARE\Classes\Public.Script\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\SrcCode /ve /d "Programming Source Code" /f REG ADD HKLM\SOFTWARE\Classes\SrcCode\DefaultIcon /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\shscrap.dll,1" /f REG ADD HKLM\SOFTWARE\Classes\SrcCode\shell\Open\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\txtfile\shell\open\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\txtfile\shell\print\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" /p \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\txtfile\shell\printto\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" /pt \"%%1\" \"%%2\" \"%%3\" \"%%4\"" /f REG ADD HKLM\SOFTWARE\Classes\vbsfile\shell\Edit\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\vbsfile\shell\Print\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f REG ADD HKLM\SOFTWARE\Classes\xmlfile\shell\EditWithNP++ /ve /d "&Edit with Notepad++" /f REG ADD HKLM\SOFTWARE\Classes\xmlfile\shell\EditWithNP++\command /ve /t REG_EXPAND_SZ /d "\"%%ProgramFiles%%\Desktop Publishing\Notepad++\notepad++.exe\" \"%%1\"" /f
  7. @ Coolsights2000 Often %% is preferred i.e. %%WINPATH%%
  8. Sorry, you caught me mid edit. Because I noticed you here, I thought I would explain in a little more detail. Try what I used in the emboldened, italicized text! ****, done it again!
  9. evilvoice is correct, the caret is used to escape the character it precedes i.e in this case always ^%. However, your command should still work, because with the first percent character escaped, the second one will not function to expand the variable, therefore meaning that ^%WINPATH% should also be okay
  10. DeepBurner's link is invalid.Burnatonce is only for ISOs, eh? I like to burn audio, data and Video. <{POST_SNAPBACK}> DeepBurner's link works fine, if I right click and choose open in new tab, with Firefox, but i will fix my original to suit, thanks!Burnatonce
  11. You may also be able to set it before then, from detached.cmd, (T39), using the same 'reg add' etc. Might be worth a try!
  12. I have updated the code in my above reply to better reflect your requirements Also, just as a note, bear in mind that the directories may contain hidden thumbs.db or desktop.ini files which could bring unpredictable results. Run the batch as it is for now and check the results on screen for such anomalies first!
  13. No, I think inf and cmd can do everything I need, no need for all this GUI stuff at all, but each to their own! If however I was using one of these 'other' methods, I think I would try to do as much as possible in it, before 'calling out', more for troubleshooting and maintenance.
  14. To use the line above, open a cmd prompt and navigate to the directory you are wishing to count files in, then enter it at the prompt! The following batch file will currently show 'on screen' all of your directories containing only one file. onefile.cmd @echo off for /d /r "%~1" %%a in (*) do ( for /f "tokens=1" %%b in ('dir "%%a" /a-d 2^>nul ^| find "File(s)"') do if '%%b' equ '1' call :dostuff "%%~a" ) goto :eof :dostuff echo %1 goto :eofTo use this one open a cmd prompt and navigate to the directory containing this batch file. At the prompt type onefile "Drive:\Folder Path"where "Drive:\Folder Path" is the location of the directory you wish to 'count files' in. (you only need the quotes if there is a space in the folder path) If you can explain 'combine all folders' I may be able to help with the rest, otherwise if you wish to do it yourself, just replace the line echo %1, under the :dostuff label with your new commands. Just as a note, the qualifying directories within this section will remain named as %1
  15. You could try cmd2[pn]=['CMD /C COPY /Y "%CDROM%\\Install\\Nav2005\\symlcrst.dll" "%ProgramFiles%\\Common Files\\Symantec Shared\\ccpd-lc\\"']
  16. Or something like this REGEDIT4 [HKEY_CURRENT_USER\Software\Classes\.mp3] @="mp3file" [HKEY_CURRENT_USER\Software\Classes\mp3file\shell\open\command] @="\"C:\\Program Files\\Winamp\\winamp.exe\" \"%1\" && start \"C:\\folder\\gamename\\program.exe\""
  17. CDBurnerXP is too bloated, I would plump for Burnatonce or DeepBurner
  18. I think my next suggestion would be to try escaping the asterisks with carets i.e program ^*.^* although using cmd.exe as stated previously should give the correct arguments input >program *.* \*.\* ^*.^* output (echoed) *.* \*.\* *.* As you can see the carets were ignored in the output, hence my suggestion, but the original asterisk dot asterisk still worked!
  19. program *.com should run program with *.com as an argument, although you have no *.com in your folder! program *.* should run program with *.* as arguments, ie itself, textfile.txt and image.bmp! How about an explanation of your more precise requirements, your example seems too confusing to give a more precise reply!
  20. Rather try adding another oneREG ADD %KEY%\005 /V 1 /D "%cdrom%\Install\005-YzToolbar\7za.exe x YzToolbar.7z -o\"%ProgramFiles%\" -y" /for if your intention was to have a backslash i.e. FilePath\ then REG ADD %KEY%\005 /V 1 /D "%cdrom%\Install\005-YzToolbar\7za.exe x YzToolbar.7z -o\"%ProgramFiles%\\" -y" /fA backslash is used as an escape character for your internal quotation marks.
  21. @ Oleg_II More than likely IconPath = 11,,shell32.dll IconIndex = -177
  22. As an additional note to my previous response to this question, if the reg file merge procedure doesn't yet work at that stage of the install, you could use the same idea at a later stage of the install, using this in the winnt.sif instead [SetupParams] UserExecute = "REGEDIT /S A:\tweaks.reg"Hope this sorts it for you!
  23. @ Oleg_II The ProfileItems Directive will either use the AllUsersProfile (Documents and Settings\All Users), which is it's default, i.e. Name = 1by1 Playeror the CurrentUser (Documents and Settings\UserName), i.e. Name = 1by1 Player,1By its very nature the All Users will include all users, therefore satisfying your criteria. If you needed a DIRID for the Default User, you would either need to define a new one in your inf, or use 53,Default User
  24. The working directory is optional, if omitted, the working directory will default to the directory in which your exe resides, i.e %ProgramFiles%\1by1.
  25. @ ponghy Have you tried [OptionalSrcDirs] ..\DOTNETFX?
×
×
  • Create New...