Hello: Basically, you change the ComSpec system environment variable to "%SystemRoot%\system32\cmd.exe". So, if your system root is C:\Windows, the ComSpec variable would need to be changed to "C:\Windows\system32\cmd.exe".
How you change a environment variable depends on which OS you're using. I'm using Windows 2k, so did this: 1. Right-click My Computer 2. Click Properties 3. Click the Advanced tab 4. Click Environment Variables 5. Select ComSpec in the System Variables section 6. Click Edit Of course, you need to make sure that Cmd.exe is actually on your system before you do this. The same basic procedure is also used on NT. How you get to the environment variables is a little different. However, it shouldn't be too hard to figure out. Let me know if you have any problems. Dean -----Original Message----- From: Jeffrey [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 3:30 PM To: Dean Theophilou; [EMAIL PROTECTED] Subject: RE: using a command which includes spaces in the system() functio n How do you specify which one to use through the 'system' call? --- Dean Theophilou <[EMAIL PROTECTED]> wrote: > You could also use "Progra~1" instead of "Program > Files". However, the real > problem is that you're using "Command.com" rather > than "Cmd.exe". Cmd.exe > understands long file names, so my suggestion is > that you use that if you can. > > Dean Theophilou > > > -----Original Message----- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On > Behalf Of > Swartwood, Larry H > Sent: Friday, February 22, 2002 3:00 PM > To: [EMAIL PROTECTED] > Subject: RE: using a command which includes spaces > in the system() > functio n > > > > You could also use Win32::GetShortPathName() first. > This is untested but I > have done used this approach before. > > Example: > $path = Win32::GetShortPathName('C:\Program > Files\WinCVS\Examdiff.exe'); > system( $path); > > Larry S. > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: > http://listserv.ActiveState.com/mailman/mysubs > > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ===== ------------------------------------ Jeffrey Hottle nkuvu at yahoo dot com __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs