![]() |
VBScript question
Right, I have a very simple script file which installs some printers for a workstation. Now I want to run this for every user, but not through a login script.
I tried using AT and PSEXEC to push the script out to the clients, but the don't like (or simply won't) execute VBScript. Can a script file be compiled into an .exe binary or do I need to re-write it in VB (or whatever else)? Code:
'VB script to add printers |
Have you tried using Microsoft Package and Deployment App to create an EXE from your script ?
|
How do you want it to run.. if your using something like at then did you use /interactive..
What OS are on the remote machines? what rights do you have on them.. I have a script that will remotely execute things?? |
Code:
strComputer = "webserver" |
Jods,
No, I've never heard of those otherwise I would have :) David, Machines are all XP and I have full admin rights to our domain and PC's. If I save my code as .vbs it runs perfectly. Rather than asking the users to run it I want it to launch on their workstations (as the current logged in user). Basically as if I walked up to the desktops and just asked the user to run the VBScript. Stefan |
David,
Tried your little app, but it runs the process as my userid and not the currently logged in user. Stefan |
Even tried using Dameware, but all the remote commands want to use my username and profile. I need to use the currently logged on users profile/environment to launch the utility.
Oh, well looks like I'll need to get them to run the file themselves. Stefan |
stick it as a shortcut in the startup folder.. urgh.
David |
Bored? Work in IT?
I'm bored...
Save the following as something like lock.vbs ammend the computernamehere to the target pc's hostname.... then type cscript lock.vbs and there pc locks.. funny as fook watching their faces.. David Code:
strComputer = "ComputerNameHere" |
Doesnt quite do what you want, but its better than adding printers!
|
Don't worry I'm as fed up as you this afternoon (he says with copy of Evo in front of him). Now, who shall I try this out on .............. :)
Stefan |
Just did it to all the development lads PC's on mass. You'd think butter wouldn't melt in my mouth when I looked over at all the commotion :D
|
LMFAO.
|
The task scheduler should be able to launch VBS. Did you explicitly prefix the command with the CSCRIPT.EXE interpreter? Not sure how this will work with the currently logged on user. I agree /interactive will get it to run on the desktop, but still not sure who's HKCU reg hive gets updated.
You say you don't want to run it as part of the logon script - any reason? |
Nog, I didn't. cscript.exe should work with the vbs file - good thinking :)
The users never logout. I keep telling them Microsoft like reboots :) Stefan |
force a reboot on them all..
David |
All times are GMT +1. The time now is 03:12 AM. |
© 2024 MH Sub I, LLC dba Internet Brands