Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

8051.

Solve : Letting a bat file show..?

Answer»

How can i let a bat file show which date it has been used for the LAST time?

if this is possible, please post a sample! yes, you can, you simply have it make a TEXT file every time it is opened; that it can read the file each time it is opened, then edit it when it is finished.....fireballs should be able to make a code. i am not familiar with f/ tokensecho %date% %time% >>"C:\temp.txt"

I'm sure there are better ways, but that is just something I thought of.
Basically, add that to the start of your batch file and it will add the date and time to the text file every time the batch file is opened.Homework again ?

Code: [Select]@echo off

if exist TMP for /F "tokens=1,2 delims=;" %%a in (TMP) do (
echo.Last Used: %%a %%b
)

echo %date%;%time%>TMP

pause >nulit works but after i opened it again it showed the date and time twice on the screen it works for me

Code: [Select]Last Used: 2008-09-21 13:13:24,94
You get every time STAMP by using :-
echo %date% %time% >>"C:\temp.txt"

You get the latest time stamp only by using :-
echo %date% %time% >"C:\temp.txt"

Regards
Alan
Solved the problem!

thanks

8052.

Solve : edit boot.ini?

Answer» HELLO,

I can't start my computer, I get an invalid boot.ini error.
So I tried to rebuild the boot.ini file. I succeded to make a new boot.ini file in notepad and copied it to C: and I can see it in the list but when I enter bootcfg/ rebuild I get; The COMMAND is not recognized.

Is the bootini file I copied below into C correct? I have only one operating system, win2k professional and I have 4 partitions. I wonder if the values of partitions are correct? Are the numbers in bold correct?

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect


Help much appreciated, getting desperate.Are you trying the BOOTCFG command from the Windows 2000 Recovery Console?Yes I am
Quote from: ccc
Code: [Select]bootcfg/ rebuild

No wonder it didn't work if that's how you typed it. You need a space after bootcfg and no space after the / thus:

bootcfg /rebuild

info here-

http://support.microsoft.com/kb/317521



Sorry I wrote wrong in the first post but inside Recovery Console I did write : bootcfg /rebuild like you said.
But I do still get the; the command is not recognized.

Did I write the bootini file CORRECTLY considering I have one operating system and 4 partitions?
Thanks.

Is BOOTCFG available in the W2k Recovery console? KB317521 refers to Win Server 2003, KB229716 shows that BOOTCFG is not available in W2k Pro, at least it doesn't show that it is available.

The boot.ini file shown seems to be spot-on provided that W2k is installed in the first partition of the only drive referenced i.e. drive zero partition one.

Good luckSo if I can't use bootcfg /rebuild then how can I fix the boot.ini error?
I did the chkdsk /r and it found one error and fixed it but still I get the "invalid system boot.ini error" when attempting to start the computer.
Thanks.

Here's an outside chance... You created and saved your new boot.ini file using Notepad, did you remember to enclose the filename.ext in double quotes to ensure the file is not saved by Notepad as boot.ini.txt?

Please post the old boot.ini so that we can try to locate what the problem with it is, and have a looksee for boot.ini.txt, a common oversight when using Notepad.

Please post the old boot.ini so that we can try to locate what the problem with it is, and have a looksee for boot.ini.txt, a common oversight when using Notepad.


[/quote]

When I first got the invalid boot.ini error and entered the Recovery Console, I could not find the boot.ini file.
No, my boot.ini file does not have the txt extension.

I no longer get the invalid boot.ini error when I reboot(does this mean my boot.ini file is correct?), but still the computer turns itself off after the startup page and auto restarts.

I'm confused about the 'bootcfg /rebuild', some say I have to do it, some say it's not possible in w2k? Do I need to do it even I managed to copy the boot.ini file to C: in Recovery Console?

if you don't get a MESSAGE saying there is a boot.ini error, I think you can now turn your attention to the other problems.Quote from: Dias de verano on September 22, 2008, 09:00:40 AM
if you don't get a message saying there is a boot.ini error, I think you can now turn your attention to the other problems.

OK, so maybe the boot.ini file is correct now. But what do I do now? The computer doesn't start and I don't get any error messages.

So far I have tried;
Chkdsk /R and it found errors and corrected them
Safe mode, VGA mode and all the modes in F8
Made new boot.ini file

Any suggestions much appreciated.Hi

I have no experience of "Chkdsk /R",
but several decades experience of computers not doing what they should.

If "Chkdsk /R" has found and fixed one error,
I will believe there was PROBABLY an error,
BUT I will NOT believe the error is fixed until I re-run "Chkdsk /R" and it then finds no errors.

Regards
Alan
Quote from: ALAN_BR on September 22, 2008, 02:34:58 PM
Hi

I have no experience of "Chkdsk /R",
but several decades experience of computers not doing what they should.

If "Chkdsk /R" has found and fixed one error,
I will believe there was PROBABLY an error,
BUT I will NOT believe the error is fixed until I re-run "Chkdsk /R" and it then finds no errors.

Regards
Alan


Thanks. You are correct. After I do the chkdsk /R it finds one or more errors and corrects them. Then I reboot the computer and it doesn't boot, and I go into Recovery Console and do the Chkdsk, and again it finds errors
Don't know what to do now, since there are no error message at startup.
Quote from: ccc on September 22, 2008, 03:15:00 PM
After I do the chkdsk /R it finds one or more errors and corrects them. Then I reboot the computer and it doesn't boot, and I go into Recovery Console and do the Chkdsk, and again it finds errors

You know what that says to me? It says your hard disk is failing. They don't last forever.

Quote
Don't know what to do now, since there are no error message at startup.

Buy a new hard disk. They have never been cheaper. Do a fresh install.

8053.

Solve : ping options are not working?

Answer»

hey! can any body help me my PING options are not working or may be i don't know how to use it when i type control-breakthen then this message APPEARS:
'control-break' is not recognized as an internal or external command,
operable program or batch file.there is no command LIKE this in pingWhy don't you try telling us what you have been typing to get ping working, what messages you have been SEEING, etc? Then we won't have to do all that hard mind-reading stuff.

To issue a control-break from the keyboard, like when you want to pause a continuous ping, started with ping -t, to SEE the statistics, you don't type "control-break". You hold down the Ctrl key and while you are holding it down, you press the Break key.

To stop it altogether you hold down Ctrl and press C.



lol good translate dias and also tell us how you are using the command. like if you are actually pinging a network device or you just using ping as a wait command.

8054.

Solve : batch generate txt log file?

Answer»

Hi i have a problem creating a batch file.
what am i trying to do?

from this FS
Code: [Select]folder tree
2008-02-20-NV\HF_20080220G
├───2008-08-22A_MIHAJ_KAD&OD_JS_#1
├───2008-09-17A_NG_FE_FIN
├───2008-09-18A_MIHAJ_OD_JS_#1 za podverzijo G
│ └───##FS

i am trying to :
create a txt file that contains:
- summary of subfolders with tags (FS, SQL and MENU)
- detailed list with summaries all in one file named after parent dir

so from example this would look something like
Code: [Select]VER: HF_20080220G

2008-08-22A_MIHAJ_KAD&OD_JS_#1 MENU
2008-09-17A_NG_FE_FIN SQL
2008-09-18A_MIHAJ_OD_JS_#1 za podverzijo G FS SQL

---------------------------------------------
2008-08-22A_MIHAJ_KAD&OD_JS_#1

text from berime.txt file on 2008-08-22A_MIHAJ_KAD&OD_JS_#1
-----------------------------------------------
2008-09-17A_NG_FE_FIN

text from berime.txt file on 2008-09-17A_NG_FE_FIN
-----------------------------------------------
2008-09-18A_MIHAJ_OD_JS_#1 za podverzijo G

text from berime.txt file on 2008-09-18A_MIHAJ_OD_JS_#1 za podverzijo G
-----------------------------------------------

I got stuck somewhere here:

Code: [Select]@echo off
cls
for %%i in (".") do (
set pot_NV=%%~fsi
set dat_ime=%pot_NV%\%%~ni.logx
echo VER: %%~ni >%dat_ime%
echo ****************************************** >>%dat_ime%
)


for /F %%j in ('dir *. /a:d /b') do (
if not %%~nj==##FS (
echo:%%~nj >>%dat_ime%
)
)

echo: >>%dat_ime%
echo: >>%dat_ime%
echo ************ po Hotfixih****************** >>%dat_ime%
for /F %%j in ('dir *. /a:d /b') do (
if not %%~nj==##FS (
echo ------------------------------------------ >>%dat_ime%
echo:%%~nj >>%dat_ime%
if exist %%~fsj\berime.txt (
echo: >>%dat_ime%
type %%~fsj\berime.txt >>%dat_ime%
echo: >>%dat_ime%
)
)
)

pause
echo on
@type %dat_ime%

in win2003 server this batch file is giving out ERR syntax of the command is incorrect ... don't know why (? i think that %dat_ime% is not set ?).

--- help with the err
--- and how can i set the FS, SQL or MENU tags?

with tags i came with

Code: [Select]for /F %%j in ('dir *. /a:d /b') do (
if not %%~nj==##FS (
echo:%%~nj >>%dat_ime%
for /F %%K in ('dir %%~fsj\*.sql /b') do (
echo: SQL >>%dat_ime%
)
for /F %%l in ('dir %%~fsj\##FS /a:d /b') do (
echo: FS >>%dat_ime%
)

)
)

but this turns out many SQL tags and i don't know how to brake for statement after first echo.

thanks for any info ...

P.s.:
system win 2003 server SP2 (32bit) ok.
found the err part
It was %%~FI (long path name) it should have been %%~fsi (short names)
and .logx where dos doesn't always GET 4 char ext

so i am here:
Code: [Select]@echo off
cls
for %%i in (".") do (
set pot_NV=%%~fsi
set dat_ime=%%~ni.log
)
set dat_ime=%pot_NV%\%dat_ime%

echo VER: %dat_ime% >%dat_ime%
echo ****************************************** >>%dat_ime%


for /F %%j in ('dir *. /a:d /b') do (
if not %%~nj==##FS (
echo:%%~nj >>%dat_ime%
for /F %%k in ('dir %%~fsj\*.sql /b') do (
echo: SQL >>%dat_ime%
)
for /F %%l in ('dir %%~fsj\##FS /a:d /b') do (
echo: FS >>%dat_ime%
)
)
)

echo: >>%dat_ime%
echo: >>%dat_ime%
echo ************ po Hotfixih****************** >>%dat_ime%
for /F %%j in ('dir *. /a:d /b') do (
if not %%~nj==##FS (
echo ------------------------------------------ >>%dat_ime%
echo:%%~nj >>%dat_ime%
if exist %%~fsj\berime.txt (
echo: >>%dat_ime%
type %%~fsj\berime.txt >>%dat_ime%
echo: >>%dat_ime%
)
)
)

cls
echo LOG complete!
echo %dat_ime%
pause
echo on
@rem @type %dat_ime%

still looking for:
- how to continue a row in FOR statemen, so that i can have
Code: [Select]2008-09-18A_MIHAJ_OD_JS_#1 FS SQL
instead of
Code: [Select]2008-09-18A_MIHAJ_OD_JS_#1
FS
SQL

- a way to break FOR statemen, so that I don't get 'SQL' for every *.sql file there is in a specific subfolder
- how to find "MENU" in berime.txt in subfolder.

the LAST should look something like
Code: [Select] for /F %%k in ('%%~fsj\*.berime.txt') do (
???????
)

but i am stuck here. (don't know how to search for text "MENU" in txt file)

thanks for any info

8055.

Solve : Installing DOS on a Virtual Machine?

Answer»

I've been trying for awhile now to get MS-DOS, and eventually Windows, installed on a VIRTUAL machine, without hardly any luck. Having seen this site before, and its relative familiarity with DOS subjects relative to most, I thought it might be a good place to ask how to get MS-DOS 6.22 up and working.

So far I've been using Virtual PC 2007. I don't know if VMWare would be easier, but if the software costs too much I might as well just go buy a copy of XP and try to install it to dual-boot (which, given the difficulties I've had with VMs, I'm not sure I want to try).

I have an old, now-unused copy of MS-DOS 6.22 from 1995. Since my laptop doesn't have a floppy DRIVE, I copied each MS-DOS disk onto a USB Flash Drive, each disk having a seperate folder. I then used the Virtual Floppy Disk Control Panel available at http://chitchat.at.infoseek.co.jp/vmware/vfd21-050404.zip to create a virtual floppy drive and disk that Windows Vista, as well as the Virtual Machines, recognized. I copied the files on the original MS-DOS floppies onto the virtual floppy drive, and started up the Virtual PC. I expected to be able to install. To be short, it didn't work. I got errors such as, "Remove any disks or media", and could only get to an A:\ PROMPT when I had Vista create an MS-DOS startup disk out of my A:\ (virtual) floppy. MS-DOS simply would not install.

The only luck I had was using the file available from http://www.svrops.com/svrops/downloads/zipfiles/dos622.exe. It is an MS-DOS statup disk with utilities that is different from the one Windows creates, but not including a setup.exe - so you can't install DOS off of it. With that I was able to access C:\ - the virtual hard drive - by using fdisk and format c:. To install DOS, I then replaced the files on the A:\ drive (which the downloaded statup had replaced) with the Setup Disk #1 files, and typed setup.

The DOS setup started, and went OK, until it started to install. I get the following error, no matter what:

Quote from: MS-DOS Install

Please insert the following disk in drive A:\:

Setup Disk #1

When you are ready to continue, press ENTER.

The thing is, the exact copy of Setup Disk #1 is the entire contents of the A:\ drive. If I type dir from the command prompt, it runs through the exact contents of the original diskette. I read somewhere that the disk has to be labeled "DISK 1" in order for the setup to recognize it (six spaces so it uses all 11 characters), but when I set it up that way in Vista it still didn't recognize it. Whenever I try to use the label command in DOS, I get the old "Bad command or file name" error.

So...how exactly am I supposed to install DOS to a blank hard drive? I've figured out how to fdisk it and format it, with the downloaded startup disk, but I just can't get it to install correctly.

I did try FreeDOS, too. It used a CD ISO image, and install comparitively easily. It even worked. Unfortunately, though I was able to install Windows 3.11 with FreeDOS installed, I got an "Incorrect MS-DOS version" error whenever I tried to start Windows after it was installed - so I'd really rather have MS-DOS installed.

Thanks alot! I know there has to be some way to do this, but I haven't been able to stumble onto the right one!

Computer Info: OS: Vista Home Premium, HD: 136 GB, 7200 RPM, CPU: Core2Duo T7500, RAM: 2 GB 667 MHz.

VM Experience: None until I decided to try this.VMWare Player is free, isn't it? You can use the easyvmx website VM generator to make a DOS virtual machine to download. Then you can install FreeDOS or MS-DOS and run apps.

Ths thread mentions Vista but I've done this on XP just the same way.

http://www.easyvmx.com/cgi-bin/ikonboard/ikonboard.cgi?act=ST;f=2;t=82;&#top

8056.

Solve : dos help?

Answer»

hey all,

if i saved a txt file with a ip address in, say 127.0.0.1, and called it a.txt, could i use that data in a dos command??

i.e,

ping >a.txt would it do (ping 127.0.0.1)

if not, is there a way?

any IDEAS???if you have a SINGLE ip address in a file (and it is on the first line), you could do this

set /P MyIP=ping %MyIP%



Grahamhey cheers for that, it's just what i was after.

Having MASTERED that, i now find myself in a slightly different, but yet equally annoying position.

that is to say that i can write said IP address to a text file, "127.0.0.1 >a.txt", but i can't get it write that LAST value on the command line instead (which is what i really require).

i have been thinking along the lines of;

%1 >a.txt

but when run from a prompt "test.bat 127.0.0.1" it doesn't write the IP to the txt file.

any ideas?

cheers again.

any ideas?Running it that way, the IP address would be stored in %1. So if I understand what you want, then your test.bat could CONTAIN:
Code: [Select]@echo off
echo The passed value is %1
ping %1
Then you could run it
test.bat 127.0.0.1

Or if you really do want to write the passed value to a text file, then use the ECHO command like
Code: [Select]echo %1 >a.txt

8057.

Solve : Menu with run all ??

Answer»

Here is my Menu code:

Code: [Select]@echo off
D:
CD \Example\Samples
goto menu
:menu
echo.
echo What would you like to do?
echo.
echo Choice
echo.
echo 1 Run AntiAlias
echo 2 Run HDRLighting
echo 3 Run ShadowMap
echo 4 Quit
echo.

:choice
set /P C=[1,2,3,4]?
if "%C%"=="4" goto quit
if "%C%"=="3" goto ShadowMap
if "%C%"=="2" goto HDRLighting
if "%C%"=="1" goto AntiAlias
goto choice

:AntiAlias
start AntiAlias.exe
goto menu

:HDRLighting
start HDRLighting.exe
goto menu

:ShadowMap
start ShadowMap.exe
goto menu

:quit
exit
:end

How do i make a menu 1,2,3,4,5 .
5 will be Quit, 4 will run 1 for 20 minutes and STOP running (exit), then run 2 for 20 minutes and stop running, then 3 and running for 20 minuts and quit.

Thanks for sharing
Please post your os:
Is it maybe pure DOS?
And some Windowsversions are not shipped with the choice commmand.

uliOh sorry, I am USING Windows XP Professional , and use DOS cmd promp
Thanks for replying .Windows XP & DOS

Option 4 could get complicated. Before each program in option 4 runs it would need to start another batch file which would sleep for 20 minutes, and then continue by querying the task list and killing run 1; this would be repeated for run 2 and run 3.

What are you TRYING to accomplish? What happens if run 1, 2, 3 don't run 20 minutes?

8-)Oh I just try to see we can use this trick for DOS or not . And how we kill process when it is running , so i can learn. 1,2,3 we have to stop manual no way it can stop by itself , but nothing is impossible , only I never learn it beforeQuote

5 will be Quit, 4 will run 1 for 20 minutes and stop running (exit), then run 2 for 20 minutes and stop running, then 3 and running for 20 minuts and quit.

Option 4 will run sequentially as you REQUESTED.

Menu Code:
Code: [Select]@echo off
D:
CD \Example\Samples
goto menu
:menu
echo.
echo What would you like to do?
echo.
echo Choice
echo.
echo 1 Run AntiAlias
echo 2 Run HDRLighting
echo 3 Run ShadowMap
echo 4 Run All
echo 5 Quit
echo.

:choice
set /P C=[1,2,3,4]?
if "%C%"=="5" goto quit
if "%C%"=="4" goto All
if "%C%"=="3" goto ShadowMap
if "%C%"=="2" goto HDRLighting
if "%C%"=="1" goto AntiAlias
goto choice

:AntiAlias
start AntiAlias.exe
goto menu

:HDRLighting
start HDRLighting.exe
goto menu

:ShadowMap
start ShadowMap.exe
goto menu

:All
start Wait.bat AntiAlias.exe
AntiAlias.exe
start Wait.bat HDRLighting.exe
HDRLighting.exe
start Wait.bat ShadowMap.exe
ShadowMap.exe
goto menu

:quit
exit
:end

You will also need this second batch file (wait.bat):

Wait Code:
Code: [Select]sleep 1200
for /f %%x in ('tasklist /fi "imagename eq %1"') do (
taskkill /f /im %1
)

Using the start command creates separate threads and an additional layer of complexity.

Good luck. 8-)How do you do wait batch with all the kill threat ?I should have mentioned that the sleep command can be found in the Win 2003 Resource Kit. According to my pre-No Child Left Behind math 1200 seconds is 20 minutes.

One problem is neither window has a clue what the other is doing. If one of the executables ends early, the wait window will continue to wait and launch a kill for a task that doesn't exist, another wait window will get started along with a new executable. Slowly the entire run unit will unravel.

Why can you not let each job run to completion?

8-)

8058.

Solve : small prob with dvd r/w?

Answer» HI...
my dvd writer is being DETECTED in the CMOS settings...but it cannot be seen in my computer.....
this problem is coming many times...
is there any way by which i can access the contents of the dvd rom..even when it's not shown in my computer.??
can this be done using MS-DOS??I don't know....you can try creating a shortcut on the desktop. Have the location be the drive your cd is like 'E:\' or somethingList your system specs including your dvdrw. Then tell how it is jumpered.processor-pentium D core
ram-1gb ddr 400m
os-xp sp-2

abt dvd writer..
it's a pioneer dvd r/w
dont know the design code exactly....

ru asking abt jumper of dvd r/w...then no jumper is used....
it's been like that from the beginning...Quote
I don't know....you can try creating a shortcut on the desktop. Have the location be the drive your cd is like 'E:\' or something

@co2
The drive itself is not getting displayed in the "my computer"
no use of the shortcut...is ther a posibility that the dvd r/w has a problem and btw u can try

start E:\
on cmd

or watever the drive name isDoes it show up in Device Manager ? ?
If so right click it and select uninstall/remove and re-BOOT...

What happens now ? ?Quote

my dvd writer is being detected in the CMOS settings...but it cannot be seen in my computer.....

Quote
ru asking abt jumper of dvd r/w...then no jumper is used....
it's been like that from the beginning...


What is not clear though, is: Was the dvd drive EVER seen by Windows?

Has this drive been in the computer, and working, in the past? and this problem is something new?

Or, has this drive just been installed, and you are trying to get it working for the first time?

Quote
is ther a posibility that the dvd r/w has a problem and btw u can try

start E:\
on cmd

or watever the drive name is

Dude, you can make a shorcut to e:\, dont have to use command promptQuote
Quote

my dvd writer is being detected in the CMOS settings...but it cannot be seen in my computer.....

Quote
ru asking abt jumper of dvd r/w...then no jumper is used....
it's been like that from the beginning...


What is not clear though, is: Was the dvd drive EVER seen by Windows?

Has this drive been in the computer, and working, in the past? and this problem is something new?

Or, has this drive just been installed, and you are trying to get it working for the first time?


This dvd r/w is working in the past...
sometimes it's being displayed and sometimes it's not being displayed in the "my computer"...
@patio
when it's not being displayed it can not be seen in the device manager ALSO...but in cmos settings it can be seen...

when i keep any boot cd then it's reading that boot cd....

could this problem be related to windows OS??should i load OS again??


First try what i suggested when it IS showing up in Device Manager...ok...i've tried this...as of now it's working....
Thank you all for your suggestions Stop by anytime...
8059.

Solve : two questions: NET SEND/NET USER and CREATING ACC?

Answer»

HEY

i want to created an account on the computers and when i use

net user admin /add
it creates an acc only on that computer

how do i create an acc on the server(sfadmin)

SECOND QUESTION

i was wondering how i could create an admin account with msdos on the computer i tried net user /add and it didnt WORKI don't think you can create a user for the server from remote computer. You'd have to log on to the server.

Is your NETWORK ACTUALLY on DOS? I can't fathom a reason to use DOS to do this instead of Windows. In windows you can assign user groups and permissions etc.this may come a little bit late but beter late than never.

type:

net localgroup administrators usernamehere /add

(in cmd) and it will do you a adminQuote

HEY

i want to created an account on the computers and when i use

net user admin /add
it creates an acc only on that computer

how do i create an acc on the server(sfadmin)

SECOND QUESTION

i was wondering how i could create an admin account with msdos on the computer i tried net user /add and it didnt work

Is that you hehu ? ? ?

seems like him and creating a acc on a server is like hacking i supposeAnd it seems like I am locking this topic I SUPPOSE.
8060.

Solve : set font size ..?

Answer»

How do I can set font size while RUNNING that BATCH file ??
I can only set window size & font color...
---------------------------------------
@echo off
Mode 85,25
Color 07
...
---------------------------------------
any suggestion ?
You cannot set font size in a batch file. You can set font size and choose font (limited choice) from the "properties" menu of a command window.

8061.

Solve : MS-DOS and XML Files?

Answer»

Hi there,

Does ANYONE know how to VIEW XML FILES in dos in a TXT format? I am not interested in the formatting, just the text.
Kind regards,Is there a reason for viewing them as .txt ? ?

More info here...BASICALLY when using dos and trying to view an xml file in edit i get all the Welcome and I am wanting to remove the <*> in the document and just display the 'welcome text' - do you know if this is possible?

8062.

Solve : Password?

Answer»

Could you not put a code into a dos file to right click?POSSIBLY.
But I know very little DOS/command line, so I'd be no help and I don't know if it's even possible.
If it was, I bet that wouldn't work either.No, this is generally in the registry. Also depending on there server, it MIGHT be what is blocking the right click. If they clocked the right click, chances are they probably disabled your access to the registry.

8-)fffreakDo you know of any hacks you can do on SCHOOL computers?Yes, but sorry we cannot discuss this here. You will probably BREAK school rules and possibly the LAW if you attempt such.ok sorry

8063.

Solve : how to run a MS-dos game in a windows 2000 and run it slow (normal)??

Answer»

Hi guys I'm a Janitor Joe FAN, I'm trying after 20 years to play the game in my w2000 but the game is way to fast, any one know how to get it to run slower?, do I have to load MS-DOS at the start?...... have no clue.. help please!!!... TRY out DOSBox. Its a DOS EMULATOR for Windows. The mere fact that you're emulating DOS is PROBABLY enough to make the game run at normal speed.Yey!!! I'll try that, sounds so good, makes sense to me. OH!!!!! thanks so much!!!!, I'll let you know what happened.



Lili.

8064.

Solve : Unrecognised command in config.sys and an error on line 1?

Answer»

Hi guys. Been gone a LONG time. Recently I booted up our HP PAVILION 7285 PC in the basement, and although Windows 95 loaded, and I've been able to load MS-DOS based games from Windows, including those that require the CD, I have been getting notifications at startup that tell me that there is an unrecognised COMMAND in config.sys and an error on line 1 of that file. This happened after I had removed the NOEMS line from line 2, which was for EMM386. I had everything set up properly. (As of right now, Stonekeep, an RPG for MS-DOS, is active right now and I'm building up my stats, so I can't check on the PC at this time.) There may be a spare config.sys file in the D: drive which I had copied as a spare several weeks back, having all the lines that config.sys had before. The problem could lie with Himem.sys, but I do not know for sure. Since Windows loaded fine, it can't be Himem.sys. The errors don't stop windows from loading.How about posting lines 1 thru' 3 of your config.sys file It's as it's supposed to be, but with some modifications. Due to there already being a Windows folder when I had installed Windows, (I had to put HIMEM.SYS there originally before installing Windows 95) the main Windows folder ended up automatically named "Windows.000" during the installation several months back. Despite that folder name change, I never had any issues until I had removed the NOEMS line from EMM386 in an attempt to enable expanded memory. As far as I know, there's an unchanged Config.SYS in Drive D, which is USED to house files as backup. Later on, when my game has been saved and exited, I'll check to see what happens if I copy the CONFIG.SYS from the other drive.

Line 1: DEVICE=C:\WINDOWS.000\HIMEM.SYS
Line 2: DOS=HIGH, UMB
Line 3: DEVICE=C:\WINDOWS.000\EMM386.EXE NOEMSSorry about the double post, but I have to update the situation.

I copied the CONFIG.SYS from Drive D and put it in Drive C, thus the problem was resolved at bootup. I'm no longer getting any errors. I know this because I saw the CD-ROM drive detected under MS-DOS.

EDIT: It appears that I must remember to not change or add any entries to Config.sys, as that triggers the error. I'm going to leave it as it is. This means I'm even going to avoid trying to load the MOUSE driver in DOS, and MS-DOS games will have to be run from Windows.

8065.

Solve : difference between dot slash and dot backslash?

Answer»

What is the difference between registering a component in these 2 ways in a commandscript

1) regsvr32 /s ./Test.ocx
2) regsvr32 /s .\Test.ocx

What is the significane of ./Test.ocx(dot slash) and .\Test.ocx (dot backslash)?

REGARDS,
Alamelu N
well /&LT;< is like root to something
and \ i dotn know lollol, \ is for the root. (C:\docume~1\%username%\Desktop)
and / is for.....other stuff (like that and/or that)

You got it the wrong way, lordoftheplatim just alittle sleepyyeah......we're all sleepy man. EVERY minute of every day.

8066.

Solve : How to handle special characters in a string?

Answer»

Hey

say I have read into a variable var an encrypted string. Now this string contains all sorts of strange characters/symbols

when i try to write the string to a file

echo %var% >> add.ldif

it SOMETIMES shouts at me if there are certain characters like '|' in the string.
Since the openssl engine is completely handling the DES3 encryption for me I have no control whether such a character would be in the encrypted string or not.

Result my batch file WORKS half the TIME.

Now I know one option is to put "" around the variable and the whole string gets qoutes arond it but is there no way to write the string as-is without the ADDITIONAL quotes.

Thanks guysYeh i think you are talking about the same problem that i had a time a go i had to send in like maybe 3 NEW topics to find it out

if you are having problems with viewing symbols you shuld try use the "^" before the symbol;

like if you wana use | you just put ^ in front of it so it will look like ^|

i hope this was the answer of what you where looking for

8067.

Solve : I run Windows xp home?

Answer»

When I GO to MS-DOS, I can't run any commands all I get is C:\Documents and Settings\owner. and my name.

What happened to C:\ ( the reg. command Prompt??)

Joe

So you can't run any commands at all??

And BTW, to CHANGE the place that CMD starts in, right-click it, and change the Start in: VALUE to \ (or C:\; they both yield the same results in your situation).try type in "cd..&cd.."
and see if you will get in results of C:\>
if you did you got all the answers you need i think.

you moved to the directory C:\ as you wanted and cd.. is the name of MOVING to another directory in this case C:

eNy0Y!

8068.

Solve : I messed up and now i cant get out of dos!?

Answer»

Hi, i have a gateway2000 solo laptop model no: solo 2100. (pentium MMX 150)
It has windows nt and windows 95 on it, i set it to change from win nt to win 95 on reboot and after restarting it, the computer keeps ASKING for a backpack cd rom unit that i dont have and goes into ms dos! I have tried to get it to switch back to win nt but with no success (since i dont know much about ms dos), is there any way to run win nt from ms dos? Or will i have to re install windows? This laptop doesnt have a cd drive. At the C: prompt type in CD\WinNT and hit ENTER...
At the C:\WinNT prompt type in Win and hit Enter...

For Win 98 it would be:

Type in CD\Win and hit Enter
Then at the C:\Win prompt type in win and hit Enter.Quote from: patio on July 30, 2007, 03:13:06 PM

At the C: prompt type in CD\WinNT and hit Enter...
At the C:\WinNT prompt type in Win and hit Enter...

For Win 98 it would be:

Type in CD\Win and hit Enter
Then at the C:\Win prompt type in win and hit Enter.

i tried that but it just keeps telling me bad command or FILE name
8069.

Solve : Using PSEXEC in batch file to open apps on remote machine?

Answer»

Hello,

i need to AUTOMATE the backing up of skype and all it's messages on pc's.

my CURRENT script works fine as long as the application is shutdown.

i could just taskkill the prog but i still need to open it up again after the copy plus i would prefer to shut it down nicely.

i have tried:
psexec \\machine "C:\PROGRAM files\skype\phone\skype.exe" /shutdown

and also tried:
psexec \\machine -i "c:\program files\skype\phone\skype.exe" /shutdown

and:
CALL psexec \\machine "c:\program files\skype\phone\skype.exe" /shutdown


as well as:
psexec \\machine c:\windows\system32\cmd.exe "c:\program files\skype\phone\skype.exe" /shutdown

also, the closest i could get to starting skype again, was the exe actually running on the machine, but not interacting with the desktop at all.


can anybody TELL me what to put in my batch file?

Kind Regards,
Wesley

8070.

Solve : jaz jackrabbit and time out problem?

Answer»

every TIME i try to run jazz jackrabbit on my computer (windows xp) it doesn't stay OPENED and times out. it WORKS with dosbox though. but i WOULD like to play it at full speed without dosbox.You can try right clicking the .exe and change the settings for it to run in advanced DOS mode...

No guarantees though.

patio. 8-)believe me, i've already tried it but nothing changes.I've got a vintage DOS box around for great games such as that!

Amazing what good programming could do with limited resources back then.where can i get it? if no where can you email it to me.Quote

where can i get it? if no where can you email it to me.

MS-DOS?
It was never free - not that I know of - so it cannot legally be shared.

Maybe something else would do it for you though? Check out:
http://www.freedos.org/
http://en.wikipedia.org/wiki/FreeDOS


Quote
where can i get it? if no where can you email it to me.

You want GX to e-mail you his old DOS MACHINE ? ?No *censored* way! Quote
No *censored* way!

Tip: When you Zip it, use extra compression.


Quote
Quote
No *censored* way!

Tip: When you Zip it, use extra compression.



Won't that flatten out the case a bit ? ?

patio. 8-)Quote

Won't that flatten out the case a bit ? ?

patio. 8-)

"The Case of the Flattened Dos Machine" .... sounds like an old Perry Mason episode.


Well, as long as it fits in my INBOX then.
8071.

Solve : Batch file problem: Command line dilemna?

Answer»

I wrote a batch script that does a few things:
1) Runs a password generator: InitToken.exe
2) Encrypts the password and writes it to file.
3) Takes 6 command line argumetns and together with the encrypted password attemtps to write all these to a file add.ldif under different fields for entry into an ldap database.

Now problem is in writing the encrypted password onto the add.ldif file. This seems to be an issue only when I pass the valid arguments to the batch file. If I do not pass any arguments to the batch file this works perfectly but ofcourse i need the arguments to fill in the other fields in the add.ldif file.

HERE IS THE SOURCE
--------------------------------------------------------------------------------------------------

@echo off
echo hey >> temp.txt
del temp.txt add.ldif
set var=""
InitToken.exe | FINDSTR /b "SO" >> temp.txt
For /F "tokens=1,2 delims= " %%a In (temp.txt) Do (
set var=%%b
)
del temp.txt
echo %var%
echo %var% >> temp.txt
openssl des3 -in temp.txt -out pass.des3
del temp.txt

echo dn: cn=%~1,dc=fork,dc=bomb,dc=me >>add.ldif
echo objectclass:top >> add.ldif
echo objectclass: adminauthsession >> add.ldif
echo cn: %~1 >> add.ldif
echo isams: %3 >> add.ldif
echo isrosi: %4 >> add.ldif
echo isauthadmin: %5 >> add.ldif
echo rosilogin: %6 >>add.ldif
echo adminemail: %2 >> add.ldif
echo etokensmartcardid: 23 11 b8 0d 2a 23 >> add.ldif
For /F "delims=" %%a In (pass.des3) Do (
set var=%%a
)
echo etokenadminpassword: %var% >> add.ldif

ldapadd -x -h fres.cdd.mortib.ca -D 'cn=Manager,dc=fork,dc=bomb,dc=me' -W -f

add.ldif

@echo on

--------------------------------------------------------------------------------------

Any suggestions other than porting this one function of adding the last password line into the file seperately in another batch file?

My first thoughts would be - what values are you passing into this batch ? it is possible that the token generator is creating characters that cannot be passed on the commandline, are spaces or tabs generated ?

GrahamThe token generator simply generates a random number between 1000 and 9999. This is then encrypted using the des3 encryption engine and becomes something like this:

Salted__b®µmðõwÌÝø)-+D«·s«*‹ˆó

I know this is a little iffy when writing into a TEXT file, but it sowrks just fine as long as I run
so_pin.bat

but not when I run it as it should be
so_pin.bat "Hisham Aziz" [emailprotected] FALSE FALSE TRUE shammer

with all the proper command line argumentsComment out the @echo off and paste the results of running that command line here


C:\PKI\Ver1\NSIS>so_pin.bat "Bob Jones" [emailprotected] FALSE FALSE TRUE bob

C:\PKI\Ver1\NSIS>echo hey 1>>temp.txt

C:\PKI\Ver1\NSIS>del temp.txt add.ldif

C:\PKI\Ver1\NSIS>set var=""

C:\PKI\Ver1\NSIS>InitToken.exe | findstr /b "SO" 1>>temp.txt

C:\PKI\Ver1\NSIS>For /F "tokens=1,2 delims= " %a In (temp.txt) Do (set var=%b
)

C:\PKI\Ver1\NSIS>(set var=7677 )

C:\PKI\Ver1\NSIS>del temp.txt

C:\PKI\Ver1\NSIS>echo 7677
7677

C:\PKI\Ver1\NSIS>echo 7677 1>>temp.txt

C:\PKI\Ver1\NSIS>openssl des3 -in temp.txt -out pass.des3
enter des-ede3-cbc encryption password:
Verifying - enter des-ede3-cbc encryption password:

C:\PKI\Ver1\NSIS>del temp.txt

C:\PKI\Ver1\NSIS>echo dn: cn=Bob Jones,dc=adminauth,dc=utoronto,dc=ca 1>>add.ld
if

C:\PKI\Ver1\NSIS>echo objectclass:top 1>>add.ldif

C:\PKI\Ver1\NSIS>echo objectclass: adminauthsession 1>>add.ldif

C:\PKI\Ver1\NSIS>echo cn: Bob Jones 1>>add.ldif

C:\PKI\Ver1\NSIS>echo isams: FALSE 1>>add.ldif

C:\PKI\Ver1\NSIS>echo isrosi: FALSE 1>>add.ldif

C:\PKI\Ver1\NSIS>echo isauthadmin: TRUE 1>>add.ldif

C:\PKI\Ver1\NSIS>echo rosilogin: bob 1>>add.ldif

C:\PKI\Ver1\NSIS>echo adminemail: [emailprotected] 1>>add.ldif

C:\PKI\Ver1\NSIS>echo etokensmartcardid: 23 11 b8 0d 2a 23 1>>add.ldif

C:\PKI\Ver1\NSIS>For /F "delims=" %a In (pass.des3) Do (set var=%a )

C:\PKI\Ver1\NSIS>(set var=Salted__╔╡æ╤º|ï⌐^M↑÷§⌠╓âxò┤&l╝u╥ )

C:\PKI\Ver1\NSIS>echo etokenadminpassword: Salted__╔╡æ╤º | ï⌐M↑÷§⌠╓âxò┤ & l╝u╥
1>>add.ldif
'ï⌐M↑÷§⌠╓âxò┤' is not recognized as an internal or external command,
operable program or batch file.

C:\PKI\Ver1\NSIS>

----------------------------------------------

Ok i ran this exact command twice. The first time around it worked with the cmd line arguments so thats not it. So clearly it is the des3 encrypted text that was a problem. Any way i can put some sort of marker around it say " " to tell the batch compiler that its a special phrase or something?I am not sure that you can.
The token generator has placed a pipe "|" character on the command line, the command processor sees this first and tries to parse it, in effect, 'forgetting' that it is all part of a string.

you can echo ^|> myfile - the ^ 'escapes' the control character. You might be ABLE to edit the string to replace | chars with ^| (likewise < & >), something like this
set var=%var:^|=^^^|%
set var=%var:^>=^^^>%
set var=%var:^<=^^^<%

try it and see
Graham

8072.

Solve : batch file not working when double-clicked.?

Answer»

I have a PERL script that takes 2 arguments. The script connects to a DATABASE to retrive some data. I want to use batch file to call this script.

in my batch file, i have:
c:\perl\bin\perl myperl.pl arg1 arg2

Problem: if i manually type in the batch filename in the dos-prompt, the script runs perfectly. But if I just double CLICK the batch file, on the popped up dos prompt window, I get an error saying access denied to connect to the database.

Can someone pls HELP? Thanks.@echo off
echo.
call c:\perl\bin\perl myperl.pl arg1 arg2
pause
exit


save that as a batch fileI think its better not to have the pause:

@echo off
echo.
call c:\perl\bin\perl myperl.pl arg1 arg2
pause
exitwhy no pause? u can see what errors u have when u put pause thereHi al.. THANK you for responding.. i found out the cause.. i have to add set USER=myUserName for it to work.

Again, thanks for the help.

8073.

Solve : network windows with computers MS_DOS?

Answer»

I have four computers that they only possess the SO DOS and WANTED that they were in net with the operational system Windows SERVER as serving… this is POSSIBLE?

tksIs this English? I don't understand what you're SAYING sorry.

8074.

Solve : Shortcut to CMD help?

Answer»

To all the DOS/CMD prompt gurus out there:

I have a shortcut to "cmd.exe" on my desktop, and I'd like it to do two things when I open it:
1 - Run a DOS command ("net use" to be exact)
2 - Change directory


I'm assuming, like most run-on-open CMD operations, that the CMD window will automatically close after it changes directories (TRY Start-->Run-->ipconfig if you want to see what I'm talking about). If your answers to numbers one and two will cause this to happen, please answer question three as well:
3 - How do I keep my CMD window up after opening a run-on-open CMD operation?





(Also, if you know of a way to accomplish this that uses something other than a desktop shortcut, like a batch file or VBmacro, that's acceptable as well - I don't care how it gets done, I just want it to get done!)From the run box you can try something like this: %comspec% /k ipconfig

where ipconfig can be any command or you can create a batch file and add a pause command at the end to keep the window open.

If you plan on writing a VBSCRIPT, use the exec method of the Script Shell object

Good luck.

It's not something I can run from the run box.


There's a script out on a network drive that I need to run under a different ID. To do this, I have a desktop shortcut to CMD that asks me what userID/pass I would like to run under.
When I run under an ID that isn't my own, I lose my drive mappings, so I must type
"net use g: \\hdcfs01\groups"
to link G: to the network drive. Then I need to type
"G:"
to change to that drive, followed by changing my directory
"cd\security\scripts\userfolders"
in that directory I have to run a script with a bunch of parameters
"cscript createfolders.vbe /user: /dest: /update"

I have to do this 5 to 8 times EVERY day, and quite frankly I'm getting tired of having to type all that crap out every time. Any suggestions?


(RUNNING XP btw...srry)Try creating a batch file with:

Code: [Select]net use g: \\hdcfs01\groups
G:
cd\security\scripts\userfolders
cscript createfolders.vbe /user:<userid> /dest:<networkdrive> /update
pause

Create a shortcut on the desktop for the batch file. Right click the shortcut and choose properties, then modify the target box by inserting runas at the beginning of the text. Runas has some parameters you can also supply in the target box. You will be prompted for the password when you run the file. Full details on runas can be found with runas /?

Maybe this will HELP. 8-)

8075.

Solve : Cannot change to directory in command?

Answer»

I am currently trying to CD to a FOLDER called "Lab Report" on the C drive. I can not do so, I either get the "too many parameters" error or the "invalid directory error.

I have tried:

CD Lab REPORTS - Too many Parameters Reports
CD Labrep~1 - Cannot find directory
etc

I cannot change the directory name. Any suggestions?TRY to put double quotes eg
cd "Lab reports" try a backslash...cd\dir nameQuote

Any suggestions?


I sympathize. I tried all this when in shell COMMAND:

C:> dir l*
Volume in drive C has no label.
Volume Serial Number is 07CF-0708

Directory of C:\

03/05/0708:51pLab Reports
1 File(s)0 bytes
978,223,104 bytes free

C:> cd "Lab Reports"
Parameter format not correct -"Lab

C:> cd Lab Reports
Too many parameters - Reports

C:> cd LabRepo~1
Invalid directory

C:>

I guess that is where you are. Try
C:> CMD

Then you can use "Lab Reports" with or without the Quote.

You can EVEN do CD L* (if you have no other directories that start with L)

Mac

Thanks Mac,

Worked like a bomb!
8076.

Solve : Need code to stop & unistall a XP service..???

Answer»

are there any codes to stop an XP service thats running then UNINSTALL it..Services can be stopped and started...they cannot be un-installed as they are an integral part of the OS...

What are you attempting to do ? ?stop the system restore service then uninstall it because i dont ever use it, but i would like to do this through cmd if possible though...Quote from: gumbaz on July 30, 2007, 11:03:53 PM

stop the system restore service then uninstall it because i dont ever use it, but i would like to do this through cmd if possible though...
patio has already STATED that it is an integral (i.e. built-in) part of your OS, so you can't get rid of it.

Anyway, System Restore is quite a SMALL and unobtrusive component of XP, so I can't see any reason for not wanting it anymore....Nope like the others said there is no way to uninstall it and really no point in doing so either. If you disable system restore the service doesn't RUN anymore and therefore doesn't take up any memory resources.
8077.

Solve : OMG I STILL DONT GET ANY HELP ! HELP ME!!?

Answer»

i need help with FOLOWING please:

echo echo %%ENG%% = %%ENGX%% >> falures.txt >> glosor.bat
The problem is here. ^ and here ^
i WANT to WRITE echo echo %%ENG%% = %%ENGX%% >> falures.txt in glosor.bat
is it possible to do it ANOTHER WAY?What exactly is it, you're trying to do?Quote

What exactly is it, you're trying to do?

Quote
What exactly is it, you're trying to do?

I think he want to append this:
echo %%ENG%% = %%ENGX%% >> falures.txt

to glosor.bat

Mac
Yep thats right is it possible??? =)
8078.

Solve : DATE?

Answer»

Hi EVERYONE,

I want to know the command in MS dos to know the creation DATE,access date and modified date .
After executing the command for above I want to copy the result in a word file and do some operations on the file.
Thanks in advance.You can use the dir command with any one of the following SWITCHES:

/tc - date created
/ta - data accessed
/tw - date written

If you redirect the OUTPUT to a file (word.doc) Word will open up the document after doing a fixup.

Good luck. 8-)

8079.

Solve : Delete old directories?

Answer» HI all,

I am having one FOLDER, FolderA. In this folder, every day, one folder will be like this
2007_03_01, 2007_03_02, 2007_03_03.......

Now I WANT to delete those directories, how to do this ...
I want to know how to do in these two options..

1. 3 days old directories, BASED on Directory property i.e. when it is
created
2. 3 days old directories, If i want to delete based on NAME of directory,
because these directory names are created based on date like said
before.

Thanks in advance,
Pal


8080.

Solve : Copying many files to floppy disks?

Answer»

I haven't used DOS for ten years but I'm sure I used to be able to do this. I have created a file which copies all files in a directory to a floppy DISK. What I cannot remember is how to copy the files to more than one floppy if they won't fit on a single one. I could use a Xip program but I'm trying to keep it simple for my wife who is a computer novice.I can't think offhand of any simple way.

If it were my problem, I would use ZIP to make all the files to be COPIED into only one file. First, chances are that now it will fit and will copy very fast. But next, there are ways to copy a single zip file to multiple floppies.

Nice to see someone besides me is still using floppies. My son bought a computer and it didn't even have a floppy drive. Everyone uses CD's today.

Mac
Here.

IBM's CHOPPER tool has been acquired by Lenovo, it would seem. But that's irreverent. Just download the CHOPPER.EXE file from their website and follow the instructions, command syntax, etc. It'll split up files into 1.44MB segments and GENERATE an UNCHOP.EXE file. After you copy all the segments from one place to another, dump all the segments and the UNCHOP.EXE into a single directory together, execute UNCHOP.EXE and it'll reassemble the segments back into the original file.

Nifty, eh?

Quote

Nice to see someone besides me is still using floppies. My son bought a computer and it didn't even have a floppy drive. Everyone uses CD's today.

There just isn't a practical use for floppies anymore. Plus the floppy disk itself is far too fragile. Even CD's and DVD's are too small to tote files back and forth. The best solution for all your data-toting needs is a thumbdrive. However, that's ASSUMING you're running an operating system that has USB ports and is old enough to have the drivers to run such a DEVICE easily.
8081.

Solve : user input of data to a command?

Answer»

hello all,


'm having issues with how running the command, net use \\xxx.xxx.xxx.xxx username admin password 123 (where xxx is a ip address entered by user) via a batch file.

also sc \xxx.xxx.xxx.xxx start {service} where {service} is a service entered again by the user.

any ideas?Well, when you say you are having issues, what do you mean by that? Do you need the user to input their IP data?hey,

yeah, i'm trying to write a batch file to save me typing the following when starting a service remotley;

net use \\xxx.xxx.xxx.xxx
enter user name; end21
enter password; spotty dog

and then

sc \\xxx.xxx.xxx.xxx start awhost32

I need the ip address, service and either stop or start to be entered by the user.

this is what i have so far but it's no-where near finished.

@echo off

:loop
echo.
echo.
echo. Welcome to the Remote services Program
echo.
echo.
echo. A. Enter a IP address
echo.
echo. B. Enter a Service to be started or stopped
echo.
echo. Q. Quit
echo.
echo.
echo.



SET Choice=
SET /P Choice=Choose your option and then press Enter (A,B or Q):

IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%
ECHO.
IF /I '%Choice%'=='A' GOTO IP
IF /I '%Choice%'=='B' GOTO Service
IF /I '%Choice%'=='Q' GOTO End
ECHO "%Choice%" is not valid. Please try again.
ECHO.

:IP



set /p '%IP%'="Enter IP Address of remote Pc: "

net use \\'%IP%' user end21 password 82mass30

goto loop

:service


set /p Service="Enter a service to be started or stopped: "

goto loop

:end

exit

what do u think??? any suggestions???
Just a first glance...

1. what's with all those single quotes?

2. IF NOT '%Choice%'==''

Did you mean IF NOT "%Choice%"==''" ?

3. This doesn't look right

set /p '%IP%'="Enter IP Address of remote Pc: "

In short, your batch needs a thorough overhaul.





thats why i have posted it on here.

any suggestions?I'll try and post something this evening when I have more time. What you done so far makes me think you are on the right trail, but maybe I could offer some help tidying it up a bit to make it work.
i would really appreactice that, thanks.

i look forward to seeing what u can do.try this
Quote


@echo off

:loop
echo.
echo.
echo. Welcome to the Remote services Program
echo.
echo.
echo. A. Enter a IP address
echo.
echo. B. Enter a Service to be started or stopped
echo.
echo. Q. Quit
echo.
echo.
echo.


:getchoice
SET Choice=
SET /P Choice=Choose your option and then press Enter (A,B or Q):

IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
ECHO.
IF /I "%Choice%"=="A" GOTO IP
IF /I "%Choice%"=="B" GOTO Service
IF /I "%Choice%"=="Q" GOTO End
ECHO "%Choice%" is not valid. Please try again.
goto getchoice
ECHO.

:IP

set /p IP="Enter IP Address of remote Pc: "

net use \\%IP% user end21 password 82mass30

goto loop

:service

set /p Service="Enter a service to be started or stopped: "

REM presumably some code to start or stop a service here?

goto loop

:end

exit
hi,

thanks. yeah that works, (without the user name and password bit) as that just brings up "the santax of the command is" and then DETAILS of how to use net use.

I've removed that bit, but yes that will work.

I'll tweak it a bit and get to stop or start the service later. I'll post the results here either later tonight or TOMORROW at work.

Many thanks!!!!right the finished thing.

if you know of a way to make look a bit neater, please let me know.

@echo off

:loop
echo.
echo.
echo. Welcome to the KFC Remote services Program
echo.
echo.
echo. A. Enter a IP address
echo.
echo. B. Enter a Service to be re-started
echo.
echo. Q. Quit
echo.
echo.
echo.


:getchoice
SET Choice=
SET /P Choice=Choose your option and then press Enter (A,B or Q):

IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
ECHO.
IF /I "%Choice%"=="A" GOTO IP
IF /I "%Choice%"=="B" GOTO Service
IF /I "%Choice%"=="Q" GOTO End
ECHO "%Choice%" is not valid. Please try again.
goto getchoice
ECHO.

:IP

set /p IP="Enter IP Address of remote Pc: "
net use \\%IP% /user:end21 82mass30

goto next

:service

set /p Service="Enter a service to be re-started: "

sc \\%IP% stop %service%

sc \\%IP% start %service%

goto loop

:next


echo.
echo.
echo.
echo.
echo. Welcome to the KFC Remote services Program
echo.
echo.
echo.
echo.
echo.
echo.
echo. A. Enter a IP address
echo.
echo. B. Enter a Service to be re-started
echo.
echo. Q. Quit
echo.
echo.
echo.


:getchoice
SET Choice=
SET /P Choice=Choose your option and then press Enter (A,B or Q):

IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
ECHO.
IF /I "%Choice%"=="A" GOTO IP
IF /I "%Choice%"=="B" GOTO Service
IF /I "%Choice%"=="Q" GOTO End
ECHO "%Choice%" is not valid. Please try again.
goto getchoice
ECHO.

:end

exitI don't understand why you have the Welcome to the KFC Remote services Program" section and the :getchoice section appearing twice. You can't have the :getchoice label twice anyway. Usually, if the same code appears more than once, it's time to stop typing and start thinking.


i've put that in twice so that when the command is run the "command compleated susscefly" is at the top if the command prompt. ( the second one has a few extra echo. on it.

it also makes it look a bit neater.

I should say the th user name and password isn't the real thing and i have sub'ed it for the end21 and 82mass30 for sercerity reasons.

thanks for all your help.

I'm very pleased with the way it works.Quote from: blastman on July 31, 2007, 12:15:27 AM
i've put that in twice so that when the command is run the "command compleated susscefly" is at the top if the command prompt. ( the second one has a few extra echo. on it.

it also makes it look a bit neater.

I meant why did you put all this in a second time? Is it even needed?

How does the code know which :getchoice label to GO to?

Quote
echo.
echo.
echo.
echo.
echo. Welcome to the KFC Remote services Program
echo.
echo.
echo.
echo.
echo.
echo.
echo. A. Enter a IP address
echo.
echo. B. Enter a Service to be re-started
echo.
echo. Q. Quit
echo.
echo.
echo.


:getchoice
SET Choice=
SET /P Choice=Choose your option and then press Enter (A,B or Q):

IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
ECHO.
IF /I "%Choice%"=="A" GOTO IP
IF /I "%Choice%"=="B" GOTO Service
IF /I "%Choice%"=="Q" GOTO End
ECHO "%Choice%" is not valid. Please try again.
goto getchoice
ECHO.

i see what u mean.

It does work but maybe this would be better;

echo.
echo.
echo.
echo.
echo. Welcome to the KFC Remote services Program
echo.
echo.
echo.
echo.
echo.
echo.
echo. A. Enter a IP address
echo.
echo. B. Enter a Service to be re-started
echo.
echo. Q. Quit
echo.
echo.
echo.



SET Choice=
SET /P Choice=Choose your option and then press Enter (A,B or Q):

IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
ECHO.
IF /I "%Choice%"=="A" GOTO IP
IF /I "%Choice%"=="B" GOTO Service
IF /I "%Choice%"=="Q" GOTO End
ECHO "%Choice%" is not valid. Please try again.
goto getchoice
ECHO.


remove the second :getchoice label to allow it to return to the first one.

I have put it in the 2nd time because when it is run, considering that the "command completed" line appears in the window, the 2nd one has a few extra (echo.) to move the "command completed" line to the top of the window making it easier for users to see if it has worked.

what do u reakon?? or do u think that a better laied out first menu would SUIT???Writing the same code twice is bad programming.
8082.

Solve : executing boot?

Answer»

I'm trying to access files on a hd that originally had win 98 on it, but has become unbootable. for some reason i cant GET the system to boot from a win 98 boot cd. The system just bypasses it like it was a non-system disk. If i put a different hd in it will boot from this cd with no problem. what happens is this: 1) it attempts to boot from cd rom and bypasses it. 2) it goes to boot from the hd and after a few seconds the WINDOWS98 gui flashes for a second and then goes to command prompt. since it didn't boot from the cd and windows did not load . . .i have no access to my cdrom drive.

What i would like to know is can i make a batch file OR add a line to autoexec.bat that will execute or force it to execute a cd boot. or at least can i put generic cd rom drivers from the win 98 boot disk on a cd and then make a batch file to execute and load the drivers so that i have cd rom access.

thanks

[emailprotected]Why not just hook up that HDD in a working machine as a slave and see if you are able to retrieve the data ? ?Go into bios and set the FLOPPY as the FIRST boot device.What kind of computer is it? Also, you shouldn't post your email anywhere, it will result in lots of SPAM.A few details of your hardware would come in handy... If you have a floppy drive you could use a bootdisk (bootdisk.com) to access files. The bootdisk also has a cdrom DRIVER which it will install if your cdrom is working properly.

8083.

Solve : VB. Net 2005 ------ Insert Databases?

Answer»

Hey guys....This is my problem.

I have CREATED a DataBase....Microsoft ACCESS...

I want to put i my FORM...but i don't know how

i have created a BindingSource and then i created a DataSet.......I also created the Querrys....everithing in the Visual Basic...

Now i don't know how to insert into the form....i mean.....By putting it in the text boxes....or to apear in the form like the microsoft access....

Can some one HELP?

Tks Guys....Any 1...Hellllppppp


8084.

Solve : I want to know about what you think about it.?

Answer»

What do you think about the Operative SYSTEMS? Why is this in the DOS section?
And why are all the options biased?
Your poll doesn't particularly make sense, and neglects to mention some OS's that MANY people use.Quote

What do you think about the Operative Systems?
oh im sorry wrong place i was reading if some ONE had some replies for my batch FILE so i just made a QUICK poll and when u say it i recognized that ive started a poll in dos the dos area is the only one i am in.OK, hopefully a moderator will move this.
8085.

Solve : need code to open the drive where the originating exe or autorun.inf is ran..????

Answer»

im making a batch file that im turning into a .exe with "Quick Batch File Complier"
this .exe along with a Autorun.inf will be auto copied to the root of every drive my PC has access to, by means of another lil app i made that CONSTANTLY runs in the background searching for new drives to copy these 2 files to.
-------------------------------------------------
the Autorun.INF code is this

[autorun]
UseAutoPlay=1
Action=View Files On Device
shellexecute=Autorun.exe

--------------------------------------------------
The Batch-Autorun.exe code is this

START -DRIVE that this .EXE is ran from- code that i need help with..!!!
START %MYFILES%\virus-scan.exe

--------------------------------------------------
so when the drive is double clicked on that these 2 files are in the root of, the root of the drive will be opened in a new explorer window and then my portable Virus-Scanner executes.

but I need some code for either the batch-exe file or the Autorun.inf file to open the drive where this originating exe is ran from.
i know it works when i assign a drive letter to the batch code like START F:\
but i WANT it to open the drive that this EXE is ran from no matter what the drive letter is that the device its on is assigned.
IS this possible at all or not.
Thanx for anyones help...
When a batch file is being run, the variable %0 holds the full path and file name of that batch file. It roughly means "my own path and name" as far as the batch file is concerned.

It is possible to extract, from a path and filename, just the drive letter by using the ~d qualifier, so that %~d0 (by the way that's a zero, not a letter O) expands to 2 characters: (1) the drive letter (2) a colon. ( : ) Add a backslash ( \ ) and you're good to go.

So if a batch file was on a CD-ROM in drive F, when the command START %~d0\ was PROCESSED, the variable would expand to F:\ and that drive would be opened in Windows Explorer.

This works ABSOLUTELY FINE in a normal XP command file. If it works in Gee-Whiz Batch Compiler I do not know. As you might guess, I don't like batch compilers.







8086.

Solve : enabling set command?

Answer»

Hi:
I'm having a problem with my computer which resulted in me not able to log in to windows due to the blue screen thing. I consulted the manufacture and they said format it but before I format it I wanted to copy some stuff of the hard drive to another one using the Recovery Console in Windows XP. My problem is that WHENEVER I use the copy command I get an error in dos under the recovery console that says "Access is denied". I figured that I have to use the set AllowAllPaths = TRUE command to enable coping without getting any access denied message. But when I type in the command I get a message that says set command is disabled and I have to use "Security Configuration and Analysis snap-in" to enable it. Now I have found some solutions on various cite but they all require me to log into windows which I'm not able to do. So if any one can help me to enable the set command while in MS-DOS.
Thank you in advance.
so are u saying that u cant use the
xcopy command because it says access denied?
there might be another way by going into the root of documents and setting via cmd
then into your account which should allow you to copy it onto ur driveWell thanks for the reply but the xcopy command is not available in the windows xp recovery console and almost everything I do it says "Access is denied" except going from one directory to another.
btw: It let me copy a file but not a folder nor a directory.can u try doing manualy? LIKE just copy and pasting it?
or i suggest u just back-up all your important files
while THINGS like msn messenger just leave it alone
because u can download those stuff againPressing F7 while the computer is starting up, you can choose how to start your computer. Start it in Safe Mode and then you can manually copy important files to wherever you want.
Because Windows is in Safe Mode, almost everything is turned off. Basically you just access your hard drive.
Not even the background will appear and the layout of the icons would usually be different.
This is usually the best time to delete things you can't delete normally because it was being used by a program.isn't it "F8"? thats what i use to view the boot menu.lol, yeah, its F8depends on the windows i supposeanother way,
you can download systemrescuecd from a good machine. BURN it onto a CD and boot your machine. Once booted , you can use ntfs-3g to mount the windows partition and start copying your files. there's also a tool called ntfsfix that can fix common errors with ntfsLordoftheplat, its F8. My typo. Hold F8 before Windows loads and you get the boot menu.mine is F12 weirdly...and F10Well I like to thank everyone for their replies. First of all, my computer does not boot at all, not even in safe mode. I guess that's why they told me to format it. second of all, I like to thank ghostdog74 for his idea ( I bet it will work) but in fact YESTERDAY my brother told me to remove the hard drive and install it on my home computer then I would see everything under windows. This trick worked perfectly. Well thanks again for your replies. there are diferent keys dependig on computers motherboard to boot safe mode.
sorry guys =)

8087.

Solve : BATCH that reads from a file.?

Answer»

how can i make a batch file read from another file to do a set of commands?
i need it to fix another computer.if you use < or sometimes << it is imput , and >> is output .. example

say you want to make a new file from scratch , type 00>>newfile.txt
the 00 in red is just needed so >> can work , so it can be anything.. you can also use > to redirect output to a file, say you wanted "dir" output to go to a file you could type Dir >directory.txt .

< can be used to put input in a file , say if you TOOK the directory.txt .. from using the >
and you typed del
dir >dir.txt |del <dir.txt


REM For loop example to pull each entire line from another file
REM Note that each line is executed independantly from all others

for /f "tokens=*" %%a in (file.txt) do CMD /C %%a
thanks guys.
that really helped!REM For loop example to pull each entire line from another file
REM Note that each line is executed independantly from all others

for /f "tokens=*" %%a in (file.txt) do CMD /C %%a

Hello!

I have a SIMILAR dilemma with the difference of that instead of running independent commands one after the other, I need to run commands that depend on the result of the previous one. How do you do that with a FOR loop?

If I'd rephrase the original question, that would say: How can you run more than one command with a word picked from a TEXT file?

For example I have a text file computers.txt that has the LIST of all active computers like this:

cp001
cp002
cp005
cp022
etc.

Then I want the batch file to pick the first computer NAME, then do these or any multiple commands with the same computer name:

a) if not exist "\\%computer%\c$\program files\eudora\nicknames\sample.txt" copy whateverfilename.txt "\\%computer%\c$\program files\eudora\nicknames\"

b) echo %computer%>>resultlog.txt

...then go and pick the next computer name from the file computers.txt and run the same commands again until it finished reading the last name from the text file.

Geza
Hi guys,

i have tried this to copy a given list of archives in list.txt to other disk:/dir but i could not copy files with spaced names:

FILE --- backuplist.bat
@echo off
for /f "tokens=*" %%a in (list.txt) do copy %%a d:\2\

FILE --- list.txt
c:\3\1.jpg
c:\3\2.jpg
c:\3\3.jpg
c:\3\4 4.jpg
c:\3\5 5.jpg

This only copies the first three files (1.jpg, 2.jpg and 3.jpg)
If i put alll the names in the file between "" ("c:\3\4 4.jpg") it works fine, but my list is pretty long!!! :-(
Could i avoid edit the whole file or do it automated???
Any idea???
TIA
create list.txt with quotes

if exist list.txt del list.txt
for /f %%F in ('dir /b c:\3\*.jpg') do (
echo "%%F" >> list.txt
)



8088.

Solve : DOS Results to Text file?

Answer»

First post on hear so be gentle

I have a batch file that consists of:

Copy VTR.bat "\\DWD37C98\c$\Documents and Settings\All Users\Start Menu\Programs\Startup\"
Copy VTRHome.url "\\DWD37C98\c$\Documents and Settings\All Users\Desktop\"
Copy VTR.bat "\\DWD37F68\c$\Documents and Settings\All Users\Start Menu\Programs\Startup\"
Copy VTRHome.url "\\DWD37F68\c$\Documents and Settings\All Users\Desktop\"

Multiple workstations on a NETWORK.

Example when run at command prompt:

C:\&GT;Copy VTR.bat "\\DWD37C98\c$\Documents and Settings\All Users\Start Menu\Prog
rams\Startup\"
1 file(s) copied.

C:\>Copy VTRHome.url "\\DWD37C98\c$\Documents and Settings\All Users\Desktop\"
1 file(s) copied.

C:\>Copy VTR.bat "\\DWD37F68\c$\Documents and Settings\All Users\Start Menu\Prog
rams\Startup\"
The network path was not found.
0 file(s) copied.

C:\>Copy VTRHome.url "\\DWD37F68\c$\Documents and Settings\All Users\Desktop\"
The network path was not found.
0 file(s) copied.

Here is the good bit

Where the network path is "not found" i would LIKE to write the information about the workstation to a text file.

Text file to read:
Copy VTR.bat "\\DWD37F68\c$\Documents and Settings\All Users\Start Menu\Prog
rams\Startup\"
Copy VTRHome.url "\\DWD37F68\c$\Documents and Settings\All Users\Desktop\"

This is so i can capture the user when they next log on to the network.

Clear as mud?

Can this be DONE?





8089.

Solve : Task?

Answer»

Again,

I want to kill a task which is open and it seems in Task MANAGER

with which command Can i close the task???

(windows Xp home Service pack 2)

plzzzTo END a task in task manager just select it and press delete.If you want to do this in a command prompt, which I ASSUME you do because this is in the DOS section, go to START - Run - type cmd - press enter - type taskkill /? for an explanation of the taskkill command.Ahh I overlooked the fact that this was the DOS section... *censored* you "Show UNREAD posts since last visit." link.

8090.

Solve : del temp-internet files?

Answer»

[highlight]@echo off
del "C:\Documents and Settings\*\Lokala inställningar\Temporary Internet FILES"
pause[/highlight]
what have i DONE wrong i want to delete all the data under all users without making a userlist i think the problem is in the "*" so if any one have a great solution please share it and BTW, correct my spelling my english sucks.. i think the problem is the "*" aswell. try putting %username% where the "*" is.but U know the username is not the one who is logged in.
its for a whole COMPANY so i have to delete all the temp internet files for all the users... so ... Try this:

del C:\%temp%

If you type echo %temp% It will show the path to your tempory internet files so it should work.you can try this
Code: [Select]@echo off
For /D %%a In ("C:\Documents and Settings\*") Do (
If Exist "%%a\Local Settings\Temporary Internet Files\*" (
del /s /P "%%a\Local Settings\Temporary Internet Files\*.*"
)
)
substitute /P with /Q for QUIET modefor the documents and setting isnt it ment to be like C:\docume~1Quote

Quote
you can try this
Code: [Select]@echo off
For /D %%a In ("C:\Documents and Settings\*") Do (
If Exist "%%a\Local Settings\Temporary Internet Files\*" (
del /s /P "%%a\Local Settings\Temporary Internet Files\*.*"
)
)
substitute /P with /Q for quiet mode


But it Doesnt work ;( why
the least you could do is show some output and the errors. It does no good just by saying it does not work.
my output:
Code: [Select]C:\temp>test.bat
Cleaning Administrator
C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Content.IE5\index.da
t, Delete (Y/N)? n
C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Content.IE5\CVE7I3YF
\01[2].htm, Delete (Y/N)? y
Deleted file - C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Conte
nt.IE5\CVE7I3YF\01[2].htm
C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Content.IE5\CVE7I3YF
\16CBBD6EAF1D8BF85827941DFF4F72[1].jpg, Delete (Y/N)?


Quote
Quote
Quote
you can try this
Code: [Select]@echo off
For /D %%a In ("C:\Documents and Settings\*") Do (
If Exist "%%a\Local Settings\Temporary Internet Files\*" (
del /s /P "%%a\Local Settings\Temporary Internet Files\*.*"
)
)
substitute /P with /Q for quiet mode


But it Doesnt work ;( why


ok strange it doesnt work for me Quote
for the documents and setting isnt it ment to be like C:\docume~1
8091.

Solve : Recovery of Yahoo IM session from hard drive?

Answer»

I know very little about MS-DOS but am wondering if SOMEONE can help me to recover a Yahoo IM session from 01/21/2007 from my hard drive (this was the first time I USED Yahoo IM and was very unfamiliar with it and hadn't yet changed my preferences to save my sessions). I urgently NEED some information from that session.

I have a Dell desktop running Microsoft XP.

Thank you for your help. Please let me know if you need additional information from me to enable you to PROVIDE any assistance you can.If your chat had not been logged, there is no log.
If the other participant(s) in the chat have a log, that's the only way you can get a record of it.
Unless you HAPPEN to have a keylogger or similar installed.
Sorry.Thas awesome

8092.

Solve : School and Batch Files?

Answer»

Quote

Could this time be better spent on your studies?

School is more important than this, lol. I make sure all my work is done before i 'fool around' with the computer.Quote
Could this time be better spent on your studies?

do hwk and batch at the same time
if u can multi taskHmmm i have the same problem the thing is if i unplug from my schools server i can't logon at all, i FIGURE its coz tehre is no server but thats because im not a wiz at comps but i do have a decent understanding.

and we play wc3 at my school I was going to unplug the cable at school but when i looked behind the computer, there was only the mouse, keyboard, MONITOR, power and internet so i didn't try.ok if u unplug the cable it means u uplug internet/local network
enough saidhey thanks man, i didn't KNOW that unplugging the cable will disconnect you from the network, thanks for telling us these things
Lets try the pretty big cable that's screwed into the computer.....

By the way, don't unplug anything from the comp. Too risky reaching down there without anyone noticing anyways...lol if some1 notices just say oh i was trying to fix my keyboard or mouse
or....trying to get the screen workings or....my comp DOESNT turn on so i was looking where the plug was etc etc
THAT ALWAYS WORK on non-ict teachersIt's people like this that make me annoyed . . .
"Hackers" I'm sure . . .
How about give up trying to crack your school's computers and work?
Knowledge of how to break things is not real knowledge, get what I'm saying?
It's not cool and it's not clever.
8093.

Solve : Start?

Answer»

I want to ask you how can i open a program with command START but it open when i will.

For example,
I want to open windows MEDIA player and i want to open i 20 second.

How it does it??


(i have windows Xp home service pack 2)Your question is not very clear. Do you want to start a program after a DELAY?

ping -n 20 -w 100 1.1.1.1 &GT; nul
start wmplayer.exe

Well, is that what you wanted?

8094.

Solve : Need help concatenating dos strings?

Answer»

I'm not sure the best way to contatenate two strings without the quotes DISPLAYING. For example:

@echo off
SETLOCAL
:: Check command line parameters
SET DorQ=%1
IF NOT DEFINED DorQ GOTO Syntax
echo input is %1
SET AString="\logfile.log"
echo will now string %DorQ% with %AString%
set fullpth=%DorQ%%AString%
echo %fullpth%

The output is:
C:\checkout>concat.bat "c:\csrDEVL"
input is "c:\DEVL"
will now string "c:\DEVL" with "\logfile.log"
"c:\DEVL""\logfile.log"

The result that I really want is:
"c:\DEVL\logfile.log"Two points...

1. Remove quotes from strings by using ~ MODIFIER. If using passed parameter string, if %1 has quotes, %~1 is the same string without quotes. For example:

set DorQ=%~1

2. It is not necessary, in batch programming, when defining a string variable, to use quotes. (unless you actually want them to be part of the string). This is a difference from e.g. BASIC. So this is allowed:

SET AString=\logfile.log













8095.

Solve : Delete pif from desktop?

Answer»

It isn't in the startup tab. :-?ok so i made the batch file for u
u just have to download it and follow the instructions
its quite simple and itz virus free
any1 can use it ****BUT IT ONLY DELETES FILE ON DESKTOP****
heres the link
http://www.wikiupload.com/download_page.php?id=93301
hope this helps
btw thx to carbon dudeoxide for the system root I can't download it from there....dunno why. Can't u just post the code here?i will send u the txt file dudeoxide...
i uploaded that file because the person who started this TOPIC
doesnt know how to use cmdI'm sure you can explain to him what to do. And i'm sure he knows how to save batch files.
Copy code to notepad --> File --> save as --> (on desktop) name[highlight].bat[/highlight] --> open it.

Maybe if you give us the EXACT name of the .pif and we can just create a batch file that would delete it automatically.Quote

How do you open a cmd prompt from desktop? And what is a batch file? Okay, I'm computer stupid, but I am never going to learn if I don't ask.


that is a prove....and im sure using a batch file that is aready made is way more simple..
AND HERES THE CODE:
and btw i like copyrighting stuff it SEEMS to sound better LOL


@echo off
title COPYRIGHT OF lordoftheplat(c)
color f1
echo.
echo please enter your pif filename including the name type eg:
echo (.pif .txt .exe .bat)
set /p a=filetype:
del C:\Docume~1\%username%\Desktop\%a%
echo.
echo.
pause
echo process completed
pause
exit
or you could change the end of this bit of lordoftheplat's thing:

del C:\Docume~1\%username%\Desktop\[highlight]*.pif[/highlight]but u should know tat would delete all the .pif files which might not be a good thing because if there are .pif files u want
and u deleted it..HEY Augusta, did it work? Did u get the .pif deleted??
8096.

Solve : MS DOS?

Answer»

please tell me immediately
Sorry but we can't tell you immediately because we don't have any information.

What are you trying to make into an EXE/COM and what OS are you using?Why bother? There would never be any need to do that. deva32, why are you trolling us with silly questions and a pointless poll?

The COM format is perhaps the simplest executable format of all; it contains no metadata, only code and data, and is loaded at offset 0x0100 of some segment and executed. Because of how the segmentation model works, there's no need for relocation.

Some recent COMPUTER VIRUS writers have hoped to capitalise on modern computer users' likely lack of knowledge of the COM command-file format, along with their more likely familiarity with dot-com Internet domain names. E-mails have been sent with an attachment named along the lines of "www.example.com". Unwary Microsoft Windows users who clicked on the attachment would not be visiting a web site at http://www.example.com/, but rather would find themselves running a carefully-crafted, and probably malicious, binary command called www.example and giving it full permission to do to their machine whatever its AUTHOR had in mind.
Quote from: deva32 on August 02, 2007, 02:26:22 AM

please tell me immediately


Go pound sand.
...Well, I think that contrex has a point here, and his ANGER is for the right reasons.
8097.

Solve : Help with .bat?

Answer»

u have to give me all the file typeHeres what they look like, i gave the locations in a PREVIOUS post.PROBLEM SOLVED

@echo off
echo mshack
pause
echo starting process
START C:\Docume~1\Robert\Desktop\MS\kaspersky.exe
start C:\Docume~1\Robert\Desktop\MS\DXWND
start C:\Docume~1\Robert\Desktop\MapleStory.exe
start C:\Docume~1\Robert\Desktop\MS.exe
msg * process finished
exitWow thanks man no problem

8098.

Solve : Help needed on batch file....?

Answer»

hey pals... i'm creatin a batch file for a application n need UR help...
OS : Windows xp
problem : i've created batch file.. but one of the instruction expects 3 input parameters after executing for SOMETIME.. the parameters r not to be given initially.. when i execute tat statement it executes... n after some 1-2 seconds it expects 3 yes/no parameters to complete execution... without the parameters the statement WONT be executed n it stops at that point n expects input..
pls help me on how to go about this batch file...You might try redirecting the input from a file. How the program was written will determine whether this technique will work.

yourprogram < input.txt

Each yes/no RESPONSE should be on a separate line in input.txt.

Good LUCK. 8-)thanks a lot!!!! i got it...

8099.

Solve : Using MS-DOS to Encrypt a Folder?

Answer»

Is there a command in MS-DOS to enable windows in-built Encryption on a specific folder and its contents ..
using Windows XP PRO SP2..Well, you could always set it as read-only with this:

attrib +r "path to folder" /S

But as for proper encryption, I haven't heard of anything built-in that does that.

You could probably download a program somewhere that allows you to encrypt through a Command Line Interpreter if you really needed to.Cipher.exe is the XP command-line encryption tool.

Quote from: contrex on July 29, 2007, 12:59:15 AM

Cipher.exe is the XP command-line encryption tool.



Is it included in XP too?

http://support.microsoft.com/kb/298009Quote from: WillyW on July 29, 2007, 09:01:09 AM
Quote from: contrex on July 29, 2007, 12:59:15 AM
Cipher.exe is the XP command-line encryption tool.



Is it included in XP too?

http://support.microsoft.com/kb/298009

Take a guess at why I wrote,

"Cipher.exe is the XP command-line encryption tool."?

Cipher.exe was included in all releases of Windows Xp and in Windows 2000 SP3 onwards.






Quote from: contrex on July 29, 2007, 11:07:03 AM
Quote from: WillyW on July 29, 2007, 09:01:09 AM
Quote from: contrex on July 29, 2007, 12:59:15 AM
Cipher.exe is the XP command-line encryption tool.



Is it included in XP too?

http://support.microsoft.com/kb/298009

Take a guess at why I wrote,

"Cipher.exe is the XP command-line encryption tool."?


Take a guess why I asked.

On that MS page, titled "Cipher.exe Security Tool for the Encrypting File System", it says, "(included with Windows 2000)".
A quick text search for 'XP' and it is not found on that page.

Quote
Cipher.exe was included in all releases of Windows Xp and in Windows 2000 SP3 onwards.

Excellent. As long as you are sure - that's good. The OP got good info.


Quote from: WillyW on July 29, 2007, 11:26:18 AM
Excellent. As long as you are sure - that's good. The OP got good info.

I SEE why you asked now. That page you found only mentions Windows 2000. Windows XP has everything Windows 2000 has, and more. There are other pages which make it clear that XP has cipher.exe. For example...

Quote
The release versions of Microsoft Windows XP and Microsoft Windows 2000 include the Cipher.exe command-line tool.

http://support.microsoft.com/kb/827014

There was a problem, fixed in XP Service pack 2, as follows:

The release versions of Microsoft Windows XP and Microsoft Windows 2000 include the Cipher.exe command-line tool. Cipher.exe can be used to manage Encrypting File System (EFS) data, but it cannot back up EFS certificates and registry keys.

But you can CHECK at home, folks! There's always good ol' command prompt...

Quote

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\>cipher /?
Displays or alters the encryption of directories [files] on NTFS partitions.

CIPHER [/E | /D] [/S:directory] [/A] [/I] [/F] [/Q] [/H] [pathname [...]]

CIPHER /K

CIPHER /R:filename

CIPHER /U [/N]

CIPHER /W:directory

CIPHER /X[:efsfile] [filename]

/A Operates on files as well as directories. The encrypted file
could become decrypted when it is modified if the parent
directory is not encrypted. It is recommended that you encrypt
the file and the parent directory.
/D Decrypts the specified directories. Directories will be marked
so that files added afterward will not be encrypted.
/E Encrypts the specified directories. Directories will be marked
so that files added afterward will be encrypted.
/F Forces the encryption operation on all specified objects, even
those which are already encrypted. Already-encrypted objects
are skipped by default.
/H Displays files with the hidden or system attributes. These
files are omitted by default.
/I Continues performing the specified operation even after errors
have occurred. By default, CIPHER stops when an error is
encountered.
/K Creates new file encryption key for the user running CIPHER. If
this option is chosen, all the other options will be ignored.
/N This option only works with /U. This will prevent keys being
updated. This is used to find all the encrypted files on the
local drives.
/Q Reports only the most essential information.
/R Generates an EFS recovery agent key and certificate, then writes
them to a .PFX file (CONTAINING certificate and private key) and
a .CER file (containing only the certificate). An administrator
may add the contents of the .CER to the EFS recovery policy to
create the recovery agent for users, and import the .PFX to
recover individual files.
/S Performs the specified operation on directories in the given
directory and all subdirectories.
/U Tries to touch all the encrypted files on local drives. This will
update user's file encryption key or recovery agent's key to the
current ones if they are changed. This option does not work with
other options except /N.
/W Removes data from available unused disk space on the entire
volume. If this option is chosen, all other options are ignored.
The directory specified can be anywhere in a local volume. If it
is a mount point or points to a directory in another volume, the
data on that volume will be removed.
/X Backup EFS certificate and keys into file filename. If efsfile is
provided, the current user's certificate(s) used to encrypt the
file will be backed up. OTHERWISE, the user's current EFS
certificate and keys will be backed up.


directory A directory path.
filename A filename without extensions.
pathname Specifies a PATTERN, file or directory.
efsfile An encrypted file path.

Used without parameters, CIPHER displays the encryption state of
the current directory and any files it contains. You may use multiple
directory names and wildcards. You must put spaces between multiple
parameters.

c:\>


Quote from: contrex on July 29, 2007, 12:02:12 PM
I see why you asked now. That page you found only mentions Windows 2000.

Exactly.

Quote
Windows XP has everything Windows 2000 has, and more. There are other pages which make it clear that XP has cipher.exe. For example...

Quote
The release versions of Microsoft Windows XP and Microsoft Windows 2000 include the Cipher.exe command-line tool.

http://support.microsoft.com/kb/827014
...


Thanks for the link to this other page at MS.


Did you notice something else amusing?

The page I found - the one that makes it seem like cipher.exe is not included with XP - says, "Last Review:February 21, 2007"

The page you just gave us the link for - the one that makes it quite clear that cipher.exe is included in XP - says, "Last Review:October 26, 2006"

Gotta luv 'em....


Thanks for clarifying.

Well, I've never heard of Cipher.exe before..... thanks contrex (heh, and I wasn't even the OP...)! I s'pose you learn something new everyday anyone know of any 3rd party encryption apps that work like cipher.exe does through cmd to encrypt entire folder contents but with different encryption types though...??
8100.

Solve : Desktop root?

Answer»

im making this PROGRAM which backup all my desktop items onto my E: drive and i dont know what the system ROOT is can any1 tell me please?
thx in advYou want the system root for the desktop? I know %systemroot% is C:\Windows. I don't recall anything that would lead to the desktop...
You could try C:\Docume~1\%username%\Desktop\
That would get you to the desktop.

For example, if you have a batch FILE on the desktop that's called 'random.bat' then you could type in command PROMPT:

start C:\Docume~1\%username%\Desktop\random.batOH so no WONDER... its like the school system server