-
December 31st, 2005, 08:59 AM
#1
Many thanks gang for all your helpful suggestions.
I'll persevere with using Limited accounts, and have a look at Secure-IT and Kane's vbs.
Happy new year folks.
-
January 5th, 2006, 00:49 AM
#2
Banned
Kane,
Last time I tried to do this I wrote a batch file to execute the runas command with a text file containing the password piped to the stdin, it didn't work for some reason.
Is there a way to modify this script (VBS is new to me, batch files I know suck but are good enough to meet my normal needs) to accept a parameter?
For example if I type runadmin program name at the cmd prompt or in a short cut it'll run the program as Admin.
I've tried using %1 as a parameter to the runas command in your script as I would with a batch file but it didn't work.
-
January 11th, 2006, 14:46 PM
#3
You can run scripts from the command line using Cscript.exe. Launch CScript and use the name of the script file (and its path, if required) as a parameter.
cscript script.vbs
The windows script host displays the banner (you can hide the banner using //NOLOGO parameter) and then executes the script. You can find out the syntax by typing cscript at command line.
Launching a script file named, say, script.vbs, is equivalent to entering the following command in the Run dialog box
wscript script.vbs
The WScript host also defines several parameters that you can use to control how the script executes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks