You could query WMI to build a list of printers as shown in the example, then do some IF instr() to check if the printer is not installed, then AddWindowsPrinterConnection.
From my experience, a printer will not 'reinstall' if it is already installed - so there is no time wasted. The printer...
What lines are you getting errors on?
Does the Const Share_Name = "limitlogon$" have permissions for these users to write to the directory?
Would you try to change the limitlogon$ share to a non-hidden share with access for Everyone to Modify the files to see if that works?
The sample I gave you is a .vbs. Are you getting any error messages when you run this as a vbs?
I should have asked before, but do you have admin permissions on the two boxes?
CaSE matters here. Try this.
At line 35: StrUserName = lcase(WSHNetwork.UserName)
at line 41: If ((StrUserName = "cybercafe") OR (StrUserName = "ils")) Then
I troubleshoot issues like this by echoing out what is going into the IF then echo what has actually made it into the IF.
Example...
If you look at the AIM shortcut, are there any arguments after "C:\Program Files\AIM6\aim6.exe"?
What happens when you run "C:\Program Files\AIM6\aim6.exe" from the command prompt?
What happens when you try "C:\Program Files\AIM6\aim6.exe /?" from the command prompt?
If the script works when you manually run it, it should work as a part of a login script. I would recommend that you don’t put any echos in the script. If you want an echo, make it a single echo at the end.
You probably don’t want to click OK 3 times every time you log in.
Would something like this work for you?
RemoteExecute "Server1","\\server\share\object1.wsf"
RemoteExecute "Server2","\\server\share\object2.wsf"
'--Example--
RemoteExecute ".","C:\Program Files\Internet Explorer\iexplore.exe"
RemoteExecute ".","C:\Program Files\adobe\Reader...
My company was using about 20 100GB tapes up until a few weeks ago. We installed a new Quantum tape library and we are using 5 400GB tapes now.
Check this product out. It usually takes a little less time to run the backup and we fit more on one tape...
Hi,
You could also get a count of files using WMI.
'----Start----
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery("Select * from CIM_DataFile where Path = '\\Foldername\\' and Extension = 'IQ'")
WScript.Echo...
This is hexOffender's quote: "except now both apps are opening at the same time, do I have to dispose of the WshShell object and recreate it?"
The f4 will close the other app, then the mwph patient images.exe will open, like it looks like it should.
How does the script work for you, hexOffender?
Hello,
This is my first post, but I think I can help.
I modified your script just a little bit. I used chr(34) which is a vbscript constant for the quote ". The part that will make the script wait until the other application is the true in the following lines.
**cmdID = WshShell.run(...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.