RemovePrinterConnection(strName [, lForce] [, lUpdate]) Deletes a previous network
printer connection. If strName contains a local name, Windows only cancels that connection.
If strName contains a remote name, then Windows cancels all resources associated with that
remote name. Set lForce to True if you want to disconnect from a resource whether that resource
is in use or not. Setting lUpdate to True removes the connection from the user profile so that it
doesn??™t appear the next time that the user logs onto the machine.
Impersonating a User with the RunAs Utility
It??™s important to set security on your machine to prevent outside sources, especially those from
email or Web sites, to run scripts on your machine. Of course, setting security to prevent others
from executing virus-laden code also tends to keep your scripts from running??”at least with the
credentials of the current user. The RunAs utility provides a way for you to have great security and
still allow script execution too. You use this utility to run a particular application with credentials
other than those used by the current user. This utility uses the following syntax:
RUNAS [ [/noprofile | /profile] [/env] [/netonly] ] /user:
program
RUNAS [ [/noprofile | /profile] [/env] [/netonly] ] /smartcard
[/user:] program
The following list describes each of the command line arguments.
Pages:
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469