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. I'm glad you've got it sorted. Try to learn to optimize your code a little too! e.g. @echo off FOR %%i IN ( 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:\CD.txt SET "PP=%%i:\Software\Aimp2\Data" XCOPY %PP% "%PROGRAMFILES%\AIMP2\Data" /E/I/YAs you can see, since you weren't actually using %CDROM% you didn't need to create it as a variable!
  2. This command inside your NT Command Script should work fine. XCOPY Data %SYSTEMDRIVE%\Ztest\Data /E/Y/I. From the code you've provided it does appear that your Data folder is in the correct location in relation to the script and your runonceex command line appears to be correct. Try changing the command line to that which I've provided and report back with your results.
  3. I have removed the identical posting you've made on this subject from the Windows XP Forum area. Please do not make multiple posts with identical content. As for your topic, could you please try to explain better what you are trying to do. You appear to have both asked a question and answered it in the same post. If there is something which is not working then tell us what it is you've done and what the result is so that we are better equipped to help you.
  4. solutions: Try typing the key in correctly Report a bug through the official 'beta tester' channels Telephone Microsoft for help
  5. You just need to change your installation methodology a little. Currently the most irritating thing must be the length of time that the console window is visible due to the wait during the DMP installation. Therefore don't install DMP from install.cmd, install it directly from runonceex.cmd, then run the additional associated registry entries from runonceex too using a registry file with `regedit /s`. That way you'll only get a cmd window for the rmdir command, but it will flash on and off so quickly it'll be hardly noticeable. The only other window, if you really need it, would be caused by your appending of date and time to the log. Of course both of these could still be done using vbs or similar without producing console windows too.
  6. What is wrong with: cscript //nologo "%appdata%\Microsoft\Network\connections\cm\rdrukvpn\vpn_reg.vbs"
  7. I've already answered this question for you yadzil.If you cannot be bothered reading through the handful of responses since your question was asked, why should we bother answering them. If you still cannot be bothered, then click on your name in the previous paragraph and it'll take you there.
  8. Here you go, I've made it in such a way as to hopefully help you understand it better. @Echo off Setlocal Enableextensions :: Create a variable for required key Set "Key=HKLM\SOFTWARE\Classes" Set "Key=%Key%\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" Set "Key=%Key%\shell\Control Panel\command" ::Create a variable for the command you wish to run Set "Cpl=rundll32 shell32,Control_RunDLL" ::Add key to registry using Reg.exe Reg add "%Key%" /ve /d "%Cpl%" /f>Nul
  9. You can use any one of several methods of hiding console windows, but the fact remains that you should be looking at reducing them or removing them completely. I will guess that correctly coding the ellusive install.cmd would be the most appropriate measure to take in the first instance. The MSFN community is a two way deal, you want us to give you help, we would like you to help us to help you by providing us with something too. If you're worried about allowing the whole world to see your file content, just upload it as an attachment as I previously asked. This way only your fellow members will be able to access the file.
  10. I cannot see any start /min commands there at all! From what you've posted, you should only have two command windows open one for install.cmd which will stay open during its execution, may be a while one for the rmdir command which will flash open and off very quickly At the moment I am guessing that you are asking for a fix for problems arising from install.cmd, but posted a registry export form a different files execution. So why not post the runonceex file and install.cmd instead of giving mixed messages to us and sitting back waiting for the guesses to come in.
  11. Okay, just post the runonceex file as an attachment, and we'll be able to understand you better and be in a better position to help!
  12. Hello and welcome to the `House Of Fun`, MSFN. It's open all hours too!
  13. Also is anything working, ignore the installation procedure and run an existing program instead. If it still doesn't work then it's more than likely an IE7/runonce issue or similar.
  14. The key is for local machine meaning it will run regardless of which of the IT staff log in. Your last two lines from the example given should be sub-keys of %KEY% we usually use numeric sub-keys in order to control order, though for one key I suppose you could choose any sub-key name.
  15. Welcome to the MSFN Forums. Remember, membership is for life, not just for Christmas
  16. Welcome to the MSFN Forums. I hope that you don't take two years thinking about hanging around, go on take the plunge, stay with us, you know it makes sense.
  17. Although not a direct answer to your question, I thought that this may interest you!
  18. The command used in the supplied reg is missing a switch, uses a variable requiring a different data type and can be shortened. Change this:;-------------------------------------------------------------------------------------------------------------------------------- ; Adds Device Manager to right click of My Computer [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\DevMgr] @="Device Manager" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\DevMgr\command] @="mmc.exe %%SYSTEMDRIVE%%\\WINDOWS\\SYSTEM32\\devmgmt.msc" ;-------------------------------------------------------------------------------------------------------------------------------- To this:;-------------------------------------------------------------------------------------------------------------------------------- ; Adds Device Manager to right click of My Computer [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Device Manager\command] @=hex(2):6d,00,6d,00,63,00,2e,00,65,00,78,00,65,00,20,00,2f,00,73,00,20,00,25,\ 00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,00,5c,00,\ 73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,65,00,76,00,6d,\ 00,67,00,6d,00,74,00,2e,00,6d,00,73,00,63,00,00,00 ;-------------------------------------------------------------------------------------------------------------------------------- Or shorter still: this:;-------------------------------------------------------------------------------------------------------------------------------- ; Adds Device Manager to right click of My Computer [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Device Manager\command] @="mmc -s devmgmt.msc" ;-------------------------------------------------------------------------------------------------------------------------------- If it still doesn't work it's not the command that's at fault, it's your system.
  19. You really need to use RegRead but look for error descriptions. YourKey = "HKCU\Software\Testing\Test" If Not RegKeyExists(YourKey) Then WScript.Echo "Your key does not exist in the registry" Else WScript.Echo "Your key exists in the registry" End If Function RegKeyExists(sRegKey) Dim oShell, RegReadReturn Set oShell = CreateObject("WScript.Shell") RegKeyExists = True sRegKey = Trim (sRegKey) If Not Right(sRegKey, 1) = "\" Then sRegKey = sRegKey & "\" End if On Error Resume Next RegReadReturn = oShell.RegRead(sRegKey) If Err Then If Left(err.description,7) = "Invalid" Then 'key not found... RegKeyExists = False 'ElseIf Left(err.description,6) = "Unable" Then 'no default value set, but key exists... 'Else 'unexpected error End if Err.clear End if On Error Goto 0 End Function
  20. Hello and welcome to the MSFN Forums. I'm happy to supply knowledge, but I'm not rich!
  21. The DIRID %01% is correct, it obviously references D:\$OEM$\ because that is the location of the running inf file. I think that you're confused, the SourcDisksNames section is not setting a variable for the root source of the inf, it is identifying the souce disk for use with a SourceDisksFiles section for any files to be transferred to the PC during the installation.
  22. No this is an error caused by the forum software and some browsers, I'm sure that those backslashes existed before posting.
  23. Well done! I've had a play, but have so far been unable to work out how to use an error file. For those who need to see what it creates, using this test file: ROE_Test.cmd @Echo off Setlocal Set "_=Reg add" Set "k_=HKLM\SOFTWARE\Microsoft" Set "r_=%k_%\Windows\CurrentVersion\RunOnceEx" Set "l_=%k_%\IE Setup\Setup" >Nul %_% "%l_%" /v "RunOnceExLogFile" /d "..\RunOnceEx.log" /f >Nul %_% %r_% /v Title /d "Testing" /f >Nul %_% %r_% /v Flags /t reg_dword /d 48 /f >Nul %_% %r_%\001 /ve /d "Test with Notepad" >Nul %_% %r_%\001 /v 1 /d "||notepad.exe" >Nul Ping -n 4 127.0.0.1 Rundll32 iernonce,RunOnceExProcess >Nul Reg delete "%l_%" /v "RunOnceExLogFile" /f produces the following log: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx] "Title"="Testing" "Flags"=dword:00000030 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx01] @="Test with Notepad" "1"="||notepad.exe" ਍⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪䈠来湩氠杯楧杮⨠⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪പ䐊瑡㩥ㄠ⼱㈲㈯〰‷洨⽭摤礯祹⥹吉浩㩥ㄠ㨷㄰㈺″栨㩨浭猺⥳਍਍䡛䱋㩍潓瑦慷敲䵜捩潲潳瑦坜湩潤獷䍜牵敲瑮敖獲潩屮畒佮据䕥嵸਍剒彁䕄䕌䕔㴠ㄠ਍剒彁䅗呉㴠ㄠ਍剒䕁彘低䕟剒剏䑟䅉佌升㴠〠਍剒䕁彘剅佒䙒䱉⁅‽റ刊䅒塅䱟䝏䙟䱉⁅‽റ刊䅒塅也彏塅䕃呐佉彎剔偁䥐䝎㴠〠਍剒䕁彘低卟䅔啔当䥄䱁䝏㴠〠਍剒䕁彘䝉低䕒剟䝅䙟䅌升㴠〠਍剒䕁彘䡃䍅彋呎䅟䵄义㴠〠਍剒䕁彘啑呉䥟彆䕒佂呏也䕅䕄⁄‽രഊ䐊瑡㩥ㄠ⼱㈲㈯〰‷洨⽭摤礯祹⥹吉浩㩥ㄠ㨷㄰㈺″栨㩨浭猺⥳਍敓瑣潩㩮〰റ䘊汩㩥※畆据楴湯㬺䄠杲㩳潮整慰⹤硥㭥䄠瑣潩㩮桓汥䕬數⁣潃浭湡൤䐊瑡㩥ㄠ⼱㈲㈯〰‷洨⽭摤礯祹⥹吉浩㩥ㄠ㨷㄰㈺‵栨㩨浭猺⥳਍਍慄整›ㄱ㈯⼲〲㜰⠠浭搯⽤祹祹ऩ楔敭›㜱〺㨱㘲⠠桨洺㩭獳ഩ⨊⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪湅⁤潬杧湩⁧⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪਍Note that I've placed the log file into the parent directory of %systemroot%, in this case %systemdrive% and I've removed the log file location too, since it was only required in the test.
  24. Hello and welcome to the MSFN Forums. I'm sure you'll find help with what you need but don't forget to use the search facility first!
  25. Hello and welcome to the MSFN Forums. I'm sure that you'll learn everything you want and more!
×
×
  • Create New...