|
Hi,
Why isn't the following code working? A DOS window opens quickly and closes, but the list of zip files is not given...
Thanks for any help you can give me!
<br />
Set objShell = CreateObject("Wscript.Shell") <br />
objShell.Run("unzip -l \tmp\test.zip") <br />
Set objShell = Nothing <br />
|
|
|
|
|
I found a solution, using the command processor. The following, leaves the DOS window open:
<br />
Set objShell = CreateObject("Wscript.Shell")<br />
objShell.Run("cmd /k unzip -l \tmp\test.zip"), 1, False <br />
Set objShell = Nothing <br />
|
|
|
|
|
Hi,
I am trying to convert the following NT Cmd Script to put into a vbs script:
del /Q \tmp\*.zip
When I try the following I get the message "The system cannot find the file specified"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "del /Q \tmp\*.zip"
Set objShell = Nothing
The filesystemobject does not understand wildcards, so that avenue seems to be closed for me.
Any suggestions or feedback would be greatly appreciated.
Thanks!
|
|
|
|
|
del isn't a program, it's a builtin command in the command interpreter, cmd.exe .
cmd /c "del" ought to do what you want.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thank you so much!!!
Now, how about converting the following to vbs, if you can happen to help me:
<br />
start \\hurricane\shared\bob\hotfixes\ <br />
set /p ZIP1=Enter file's name to be copied:<br />
xcopy /Y %ZIP1% \tmp\INETPUB_DEV.ZIP<br />
unzip -l \tmp\INETPUB_DEV.ZIP<br />
The following does not seem to work:
<br />
Set objShell = CreateObject("Wscript.Shell") <br />
objShell.Run("start \\hurricane\shared\bob\hotfixes\")<br />
ZIP1 = InputBox("Please enter the file to copy")<br />
objShell.Run("xcopy /Y " ZIP1 & " \tmp\INETPUB.ZIP")<br />
objShell.Run("unzip -1 \tmp\INETPUB.ZIP")<br />
Set objShell = Nothing<br />
Is the solution as simple as changing start to cmd /c "start" ,
xcopy to cmd /c "xcopy" , and unzip to cmd /c "unzip"
I'm sorry that I cannot readily see if such a change will work, I am having some system difficulties....
Thanks for whatever help you can give!
|
|
|
|
|
xcopy and unzip are programs; start is a built-in command like del .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thank you so very much for your help!
|
|
|
|
|
Hi, i have a problem with duplicate network drive. My computer (windows xp pro) have C: drive as the system and document drive, I have D: drive as the CDROM drive and E: drive is the map network drive that I mapped from the server. If i log on normally i could access the document on my E: drive on the server. But the problem occure when I plug my USB flash drive before i log on to windows. After I plug it and log on to windows, windows indicate me that could not connect to all network drive. In my computer, i can't find my flas drive but when i go through network drive then it will display the content of my flash drive instead of network drive whether I connecto the the network. If i disconnect USB then my network drive still remain and have the file on my server. But if i plug my flash after i log on to windows, windows will create drive F: for my flash drive without any problem.
My question is: why flash drive replace the network drive? Why don't it create another drive whether i plug my flash drive before i log on to windows?
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
When you're not logged in, the mapped drives don't exist, and their assigned drive letters are available for the taking. Plugging in a USB drive is a hardware change, and the system assigns the next available drive letter to it. Logging on causes Windows to enumerate user preferences, including drive mappings, so these are assigned after the USB device is added to the configuration. To get around this, I map drives on other hosts starting with a higher drive letter - R: for instance. I let Windows manage the lower drive letter assignments automatically, knowing that the upper letters are not likely ever to be reassigned by the system.
"My kid was Inmate of the Month at Adobe Mountain Juvenile Corrections Center" - Bumper Sticker in Bullhead City
|
|
|
|
|
Thank you very much for your information.
|
|
|
|
|
I have two VGA adapters in my PC. The problem is when I set the color depth of both devices\monitors to 8bits per pixel then GDI chooses the palette of the primary device as the default palette and uses it to render both the devices. Is it possible to force the GDI to render two devices with their respective palettes.
Muhammad Asif Fayyaz
Design Engineer
|
|
|
|
|
Try to consult with the manual that come with your VGA adapter. I think it might state about this issue to. Make sure that both of your VGA adapter card support multiple adapter card in a single PC. Try to read the information of your mainboard too whether it support both VGA card or not. Contact your nearest computer store of check the website of relate manufacturer to read it online documentation.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi, I have a problem while I need to config router. I just buy LinkPro Broadband ADSL/Camble SOHO Router (Sharing a Broadband Interent Connection). The product feature could view from here[^]. I read the manual before I try to config the router.
First I need to set my IP address to "Automatic obtain...". Then I connect my router to my PC for the first configuration (I use straight connection from PC to router). Then I try to access router by enter the following address in IE (http://192.168.1.1, I follow by the manual). But I have a problem, because I could not see the loging page of the router. It display an error and inform me that "Could not find the server or DNS error". I tried many time to config it but it did not work. Could one have an idea about that?
I need to share the internet connection in my home.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Off the top of my head: check that your network card is enabled. If your network card and router have Link LEDs on them, check that they're both lit - if not, try a different cable. Make sure you're using a direct, not a cross-over, Ethernet cable. Make sure you're not connecting to an uplink port, if it has any. Make sure you've connected to a LAN port (e.g. the port marked '1') and not to the cable modem port (marked 'WAN') - they appear to use the same connector according to the page you linked to.
If you're sure all that's correct, check that your network card is set to 'Half Duplex' if it offers Half Duplex and Full Duplex settings (this is on the Advanced tab in Device Manager). Full Duplex usually only works if the card and the router are from the same manufacturer - Half Duplex is the standard 10/100Mbps setting. If you're still sure it's all correct, right-click the connection in Network Connections and choose Repair - Windows should try to get a new address from DHCP.
If this still fails, try setting your IP address to 192.168.1.100 with a subnet mask of 255.255.255.0. That should enable you to get to 192.168.1.1 to configure it. Otherwise I can only suggest rebooting the router by unplugging the power and reconnecting. If this still fails, you may need to reset to the factory defaults, by pressing the RESET button on the back. This really is the last resort - I've heard of devices where the 'factory default' firmware actually does not work.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Dear Mike, thank you very much for your suggestion. I already done it as you recommend. It is not working, in IE i could not access the router login page but when I ping to it IP address 192.168.1.1 (my computer set to IP: 192.168.1.25) it reply. I try to use FTP by the following command "open 192.168.1.1" for testing purpose only. But it display an error message that "the connection was refused". Tomorrow I will return this router it the computer store and ask them to fix it for me.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Try telnet 192.168.1.1 80 and type
GET / HTTP/1.0
[cr]
[cr] i.e. press Enter twice after the GET line. If you can't type without seeing what you're doing, press Ctrl+], then set localecho at the Microsoft Telnet prompt (Windows XP - the syntax for Windows 2000 and earlier is different).
If you get a response, it's a problem with your Internet Explorer configuration. Make sure there's no proxy server set up by looking in Tools > Options, Connections tab, click LAN Settings. I've also heard of spyware which breaks IE in this area - you might want to try Ad-Aware[^] or a similar spyware remover.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thank you very much for your information.
|
|
|
|
|
Is there any way to keep non admin users from installing local printers in Windows 2000?
Greg
|
|
|
|
|
Read the bottom half of the page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinpro02/html/w9p0102.asp
|
|
|
|
|
Thanks. That helped me find the problem. Someone had put Authenticated Users in the Power Users group, which meant that anyone could add a local printer.
|
|
|
|
|
There is one policies in group policies: "Prevent user from installing printer drive ". Try to configure this policies and hope it would help you.
|
|
|
|
|
|
I treat all comparative reports with a large amount of distrust, especially when paid for by the companies that produce the products being tested.
While there is not likely to be any falsifying of results, you can be sure that the environment, including the tests themselves will have been skewed to present the correct product as the "winner".
my blog
|
|
|
|
|
Steven Campbell wrote:
when paid for by the companies that produce the products being tested
I totally agree with you. The test conditions themselves are fallacious like the results. And really speaking I dont like my favourite Linux systems being ranked below those I don't really love and admire
|
|
|
|
|
On the VeriTest website on the age about which reports get posted it says
"The reports we've posted on our Web site, however, represent only a small fraction of the tests we've performed and the test reports we've written—the fraction that our clients have chosen to publish. Each client determines, for each test, whether to have us post its test report."
I would be interested in seeing some of the comparisons Microsoft chose not to make public.
|
|
|
|