Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
That's correct, you asked a specific question and I provided you with an exact and correct reply to that question. You on the other hand provided a solution which didn't answer your own question, and provided with it little or no information. You were asked directly if you could share your solution, and failed to do so, since 'this thread is for making questions' were we supposed to guess that you were using WinRAR and ResHacker?
-
I couldn't give you specifics because you didn't tell us which self extraction program, (SFX), you were using to pack your files. In fact you still haven't provided us with the name of your self extractor. Your solution is completely pointless to all those people searching for a solution who cannot tell from your script that you were using WinRAR. As a side note, the solution you have provided does not match your question, you have not given your shortcut the name you specified in your opening post and you have not provided a specific icon for the shortcut. (the shortcut will have the icon associated with the prisonbreak executable not GameIcon.ico)
-
CMD:Password should not be displayed
Yzöwl replied to sab's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
You're going to have to provide more information than that! What is the password used for?, Is it being verified against something?, Why does it need storing?, Why are you encrypting/decrypting it?, When you say string format are you suggesting that there are non alphanumeric characters?, Why a cmd file? -
How to merge two text files?
Yzöwl replied to tomasz86's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Are you trying to tell me that different system locales will output an integer differently, or is the wink and sarcasm about language included just to hide the fact that you hadn't looked at my advice and understood it. (you will note that I didn't provide you with code, that would have been in code tags, I gave you information you could use in order to solve the problem you were having, the exact pieces of code you needed were emboldened.) Please also note that user locales would take precedence over system locales so technically you would want the script to be non user locale dependent. -
How to merge two text files?
Yzöwl replied to tomasz86's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Well that would depend upon whether or not you thought for yourself or simply copied my statement exactly as I wrote it. n is never going to be anything other than n in any language Additionally, you cannot call something non language dependent which outputs English statements: -
How to merge two text files?
Yzöwl replied to tomasz86's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
What you'll could do is run XCOPY /DULY and STDOUT to a file. Then read that file as input looking for n File(s). If one or more files were indicated then create the temp folder, run the xcopy and repack. -
How to merge two text files?
Yzöwl replied to tomasz86's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
just a thought but why not get rid of the ECHO Processing %%I and remove the >NUL from the line below it! Then again you may be able to remove the FOR loop entirely and simply run XCOPY with an additional /U switch! -
Solved this problem without using thing party tools as you said, but without using VBS scripting but using SFX Archive. Thread can be closed, thanks for your reply ! Well first of all I think it was I who said: and: Also if you change the line I posted to include an additional set of double quotes, I'm sure that the original idea of using your third party utility would have worked, (I could have told you sooner had you explained exactly what had happened instead of 'its not working'; [actually it produces the shortcut perfectly just without the chosen icon]). Here's the minimum line you needed: xxmklink "%USERPROFILE%\Desktop\Prison.Break.The.Conspiracy" "C:\PrisonTest\prisonbreak.exe" "" "" "" "" "GameIcon.ico"where the path to gameicon.ico may need defining depending upon its actual location.
-
Looking at a couple of examples for that utility I'd suggest you try this: xxmklink "%USERPROFILE%\Desktop\Prison.Break.The.Conspiracy" "C:\PrisonTest\prisonbreak.exe" . "" 1 "GameIcon.ico" Some self extraction programs can create the icon too as part of the extraction routine and there are other methods of creating icons using Windows built-in tools without having to package a third party utility with everything else.
-
"Quotes" Question about CMD Batch
Yzöwl replied to Caml Light's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Microsoft's updates don't come in zip files! -
Batch script for imagex error
Yzöwl replied to yweiss's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Your exiting file suggested that there was likely a missing 'closing bracket', I took a quick look and noticed it almost immediately. It has now been fixed, please re-copy/paste it! Please also bear in mind that the file you posted, and the newer one, is not very well designed/structured. For instance, just because something has a .wim extension doesn't make it a valid wim image, but your script is validating only by extension. -
Batch script for imagex error
Yzöwl replied to yweiss's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
I've made a couple of minor changes to what you posted, give it a try and post back your findings: @echo off pushd %~dp0 if not exist "imagex.exe" goto _notexist :_main echo= echo= echo= echo= [I M A G E X A P P L Y M A I N M E N U] echo= echo= 1) Specify or change source path (the path to your .wim image file) echo= Source: [%_asource%] echo= echo= 2) Specify or change target path, where your image will be restored echo= Target: [%_atarget%] echo= echo= 3) Specify or change index you want to restore (a number, such as 2) echo= Index: [%_index%] echo= if "%_asource%"=="" goto _menu1 if "%_atarget%"=="" goto _menu1 if "%_index%"=="" goto _menu1 echo= 4) Apply your image now where ready echo= From [%_asource%] To [%_atarget%] echo= :_menu1 echo= Q) Quit. R) Reset all variables. echo= :_mainch set "_ok=" set /p "_ok=Enter your choice: " if "%_ok%"=="1" goto _getsrc if "%_ok%"=="2" goto _gettarget if "%_ok%"=="3" goto _getindex if "%_ok%"=="4" goto _apply if /I "%_ok%"=="q" (popd & goto :eof) if /I "%_ok%"=="r" goto _reset goto _mainch :_getsrc set _ok= echo= echo=Specify location of source image to restore with full path. set /p "_ok=Enter Source path: " if not exist "%_ok%" ( echo. echo --------------------------------------------------------- echo Path does not exist. Please input a valid location again. echo --------------------------------------------------------- goto _getsrc ) for %%A in ("%_ok%") do ( if /I "%%~xA"==".wim" ( set "_asource=%_ok%" (setx _asource %_ok%) goto _main ) else ( echo= echo=--------------------------------------------------------------- echo=Error: The path "%_ok%" does not seem to be a valid .wim image file. echo=--------------------------------------------------------------- goto _getsrc ) ) :_gettarget set "_ok=" echo= echo=Specify target to install source image with full path. set /p "_ok=Enter Target path: " if not exist "_ok" ( echo= echo=--------------------------------------------------------------- echo=Error: The path "%_ok%" is not a correct location. echo=--------------------------------------------------------------- goto _gettarget ) set "_atarget=%_ok%" (setx _atarget %_ok%) goto _main :_getindex set "_ok=" echo= echo=Specify image index with a number set /p "_ok=Enter Index number: " set "_index=%_ok%" (setx _index %_ok%) goto _main :_apply echo= echo= @echo on imagex.exe /apply "%_asource%" %_index% "%_atarget%" @echo off echo= pause popd goto :eof :_reset set "_asource=" set "_index=" set "_atarget=" goto _main :_notexist echo= echo=IMAGEX.EXE executable not found. Please ensure that %~nx0 echo=is in the same folder as IMAGEX.EXE before executing this script. echo=This script will now exit. echo= pause popd -
Read ini file using batch
Yzöwl replied to Geej's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
It's just my personal preference, I use them in exactly the same way as you use A and B, I just find that they stand out better than all of the other A's and B's for example. -
First of all, if you wish to add a pause you could use the ping command, alternatively I posted a method of adding a delay without using the ping command around 5½ years ago. However for your needs, you could just try the Start command with the Wait switch: ... START /WAIT net use /delete U: /yes START /WAIT net use /delete W: /yes START /WAIT net use U: \\SERVER\users\%UserName% START /WAIT net use W: \\SERVER\public NET TIME ...
-
Read ini file using batch
Yzöwl replied to Geej's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
You don't even need to use find if you only have one line under a single section heading. Type this single line into a console window to see what I mean: FOR /F "USEBACKQ EOL=[ TOKENS=*" %# IN ("X:\PATH TO\DIRECTORY\FOLDERSTROE.INI") DO @ECHO=%#Obviously you'll need to change the path accordingly. -
Read ini file using batch
Yzöwl replied to Geej's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Something like this should do what you need: @ECHO OFF SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION (SET VAL1=) FOR /F "TOKENS=1* DELIMS==" %%# IN ( 'FIND "Cabfolder1"^<FOLDERSTORE.INI 2^>NUL') DO SET "VAL1=%%$" IF NOT DEFINED VAL1 (COLOR 1A ECHO= Folder path not defined COLOR PAUSE GOTO :EOF) ECHO= %VAL1% ^<---is the preset folder. PAUSE -
CMD: Delete Empty Line
Yzöwl replied to Caml Light's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
A carriage return and line feed is the standard method for terminating a Windows text file, in fact some files not ending that way can be seen as corrupt. A solution to change a file after it has already been written may or may not be the more suitable option depending upon your 'real world' need. What data are you really outputting and what construct is being used to output it? -
One option is to boot from PE optical media, mount the remote registry of the damaged PC and using a vbscript extract the Product Key and Product Name from that registry.
-
Try reading the Rules, then provide a full question in an appropriate part of the Forum and with a subject title which references the message body. [Topic Closed]
-
Delete current directory content
Yzöwl replied to techbrainless's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Now that you are happy with the result of the supplied script, I'd just like to inform you that in line three alone there are two unnecessary switches and a potentially ineffective method used for the exception. Line four is not much better either! -
Delete current directory content
Yzöwl replied to techbrainless's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
You are going to have to explain where the batch file is going to be located, how it is going to be invoked and probably what you mean by current working directory! -
Profile clean batch
Yzöwl replied to serb87's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Deleting directories in Documents and Settings is not the same as removing non required profiles. Microsoft from Win2K provided a command line tool specifically for doing that, Delprof.exe. If you're using later operating systems then try Delprof2