Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
What makes you think that the beginning of the disk is the best location for the swap file?
-
The variable shouldn't really be affecting the copy command, but to make it a little less complicated: The first for loop only gives you the location %PD_%. What you should do from there is move to that location. The second loop then could then have the "%PD_%" removed and the copy would then just state COPY "%_AppPath%\SetOfficeName.vbs" "%%?\%_startupDir%"The location then being relative to the current one. Attached is an example with 'less complicated' code! ProfDir2.cmd
-
Advanced Batch scripting Question ;)
Yzöwl replied to Valvaris's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Nevermind all that, just take a look at the del command and use it a little better in order to reduce all those lines. ::Syntax - DEL [/switches] names ::Example - DEL file1.ext file2.ext file3.ext file4.extWhere does %choice% come from? and why create a reg file, copy it, invoke it and delete it when you could just incorporate it in your batch file. -
batch programming
Yzöwl replied to ronmanp's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
As it was in your previous examples. e.g.if errorlevel 3 goto fin -
batch programming
Yzöwl replied to ronmanp's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
It's starting to look a little better, but what have you gone and done to the 'if errorlevel' commands? you've got whitespace you don't want in them now! -
batch programming
Yzöwl replied to ronmanp's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
I'm glad you got it working, however the batch file is not very well written, and will not work as you expect. For example, when you've ran the command under your deplacer label, you will be asked for your language choice. Similar behaviour will occur after most of your label sections have ran. -
batch programming
Yzöwl replied to ronmanp's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
As I've already suggested without response, I need to know what OS this script will be running! Based on the use of 'choice' I would have thought Windows 9x. In quick respose to your direct question however, change if not exist c:\corb.dir\nul mkdir c:\corb.dir\ goto deplacer to if not exist c:\corb.dir\nul ( mkdir c:\corb.dir goto deplacer) -
batch programming
Yzöwl replied to ronmanp's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
-
Check for OS Version in a script
Yzöwl replied to midiboy's topic in Unattended Windows 2000/XP/2003
Thanks for the information, jaclaz. It's sometimes difficult to remember that although the forum is English speaking, our OSes aren't necessarily so. (especially when the originator appears to use perfect English and doesn't state their origin/language in their profile!) @echo off&setlocal for /f "delims=" %%? in ('net config work^|findstr/i "\<soft"') do call :OSis %%? echo/%%WinOS%% is %WinOS% endlocal&goto :eof :OSis echo/%*|find "2000">nul 2>&1&&(set "WinOS=2000"&goto :eof) echo/%*|find "2002">nul 2>&1&&(set "WinOS=XP"&goto :eof) echo/%*|find "2003">nul 2>&1&&(set "WinOS=2003"&goto :eof) echo/%*|find "Vista">nul 2>&1&&(set "WinOS=Vista"&goto :eof) -
Check for OS Version in a script
Yzöwl replied to midiboy's topic in Unattended Windows 2000/XP/2003
I didn't see it a disrespectful...just incorrect! The last line of the batch file is endlocal&goto :eofThe piece of code within/below the OSis label has already been run from the call to it earlier within the 'for in do' command. -
Check for OS Version in a script
Yzöwl replied to midiboy's topic in Unattended Windows 2000/XP/2003
There's only one person who's made a little error there, and it's certainly not me!If you can guarantee that the command interpreter, (command.com / cmd.exe), is the original one for the said OS then use ther built in ver command. @echo off ver | find "95">nul if not errorlevel 1 ( set WinOS=95 goto OSis) ver | find "98">nul if not errorlevel 1 ( set WinOS=98 goto OSis) ver | find "Millennium">nul if not errorlevel 1 ( set WinOS=ME goto OSis) ver | find "NT">nul if not errorlevel 1 ( set WinOS=NT goto OSis) ver | find "2000">nul if not errorlevel 1 ( set WinOS=2000 goto OSis) ver | find "XP">nul if not errorlevel 1 ( set WinOS=XP goto OSis) ver | find "2003">nul if not errorlevel 1 ( set WinOS=2003 goto OSis) ver | find "Vista">nul if not errorlevel 1 ( set WinOS=Vista) :OSis echo.Your OS is %WinOS% -
Check for OS Version in a script
Yzöwl replied to midiboy's topic in Unattended Windows 2000/XP/2003
Will this do what you want? @echo off&setlocal for /f "delims=" %%? in ('net config work^|findstr/b Soft') do call :OSis %%? echo/%%WinOS%% is %WinOS% endlocal&goto :eof :OSis echo/%*|find "2000">nul 2>&1&&(set "WinOS=2000"&goto :eof) echo/%*|find "2002">nul 2>&1&&(set "WinOS=XP"&goto :eof) echo/%*|find "2003">nul 2>&1&&(set "WinOS=2003"&goto :eof) echo/%*|find "Vista">nul 2>&1&&(set "WinOS=Vista"&goto :eof) -
I've no idea what that command is supposed to do, why would you not be using:TREE/F I:\>list.txtIf you still require 'plain' ASCII then: TREE/F /A I:\>list.txt If you just wanted the directories and not their files listing then: TREE I:\>list.txtOr the ASCII version: TREE/A I:\>list.txt
-
Not only was that the advice given in the answer I linked to you, (please make sure third-party downloader/TSR programs are turned off), how did you solve the problem? This thread serves no purpose to the community if the solution is left unanswered.
-
Hello too! I am old. I am an owl. ...a wise owl Welcome to MSFNs Forums.
-
Make sure that you haven't got a 'Clear pagefile at shutdown' tweak applied. If you haven't added any registry tweaks, some programs such as SafeXP have this as an option. The registry file to fix it is this Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management] "ClearPageFileAtShutdown"=dword:00000000
-
Have you tried this?
-
Yes, colours, (note the correct English spelling, not American), are nice at times, but as is the case with most VBScripters, they seem to write far too much in order to get the job done! GSM has added half a dozen lines of code for colour changes, but used twice as many lines as mine for the same task, and mine wasn't optimized for size either!
-
Those files cannot work because this is the XP forum and the 'choice' command is not part of that OS. It is an outdated tool which is not only unsafe to use in a cmd console, it has been replaced by newer built-in commands @ECHO OFF SETLOCAL :Menu CLS SET "_=" ECHO/ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ECHO/º Main Menu º ECHO/ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ ECHO/º 1. INSTALL Java 6 update 3. º ECHO/º 2. INSTALL Real Alternative 1.60 º ECHO/º 3. QUIT PROGRAM º ECHO/ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ECHO/ SET/p "_=Please choose a Menu Number [1,2,3] " IF %_% GEQ 1 IF %_% LEQ 3 GOTO Item%_% GOTO Menu :Item1 CALL :Msg1 ECHO/your JRE6U3 command PING -n 6 127.0.0.1>NUL GOTO Menu :Item2 ECHO/ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ECHO/º Name: Real Alternative º ECHO/º Release Date: Wednesday, September 12, 2007 º ECHO/º Version: 1.60 º ECHO/º Operating Systems: º ECHO/º Windows 95, 98, 98 SE, ME º ECHO/º Windows NT, 2000, XP, 2003 º ECHO/º Windows Vista º ECHO/º License: Freeware º ECHO/ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ECHO/ SET/p "_=Do you want to install Real Alternative? [y/n] " IF /i %_:~0,1% NEQ Y GOTO Menu CALL :Msg1 START "" /wait REALALT160.EXE /verysilent /norestart /LoadInf=".\realalt.ini" GOTO Menu :Msg1 ECHO/Installing please wait... :Item3You will need to replace the items under the Item1 label with you actual JRE stuff.
-
Help me please VBS
Yzöwl replied to Batch User's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Since you believe that the problem lies with .openUrl, then we'll look at changing it. try replacing content = INet1.openUrl(bnet) If InStr(content,"Error Encountered")>1 Then MsgBox "Error! The Battle.net clan page was unreachable." Exit Sub End If with INet1.Open "GET", bnet, False INet1.Send If Err.Number <> 0 Or INet1.Status <> 200 Then MsgBox "Error! The Battle.net clan page was unreachable" Exit Sub End If content = INet1.ResponseText and use a similar idea in your ForumCheck subroutine. -
The way you currently have it set up is that the Model specific stuff is being set for installation on the next reboot after your initial first logon session.
-
Help me please VBS
Yzöwl replied to Batch User's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
What's that supposed to mean?Since your response did not mention your intention to do so; are you, or are you not, intending to format that code into something readable. Do you expect everyone who is willing to help to also be in posession of a code formatter/beautifier in order to begin to decipher and debug on your behalf. -
Help me please VBS
Yzöwl replied to Batch User's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
It would certainly help if you were to post formatted code! In the meantime I'll have to put put your 'code' into 'code tags' instead of 'quote tags'! The secret is in the name... PS Please ensure that your formatted code is placed inside 'codebox tags'