I'm building a small asp site to allow other members of staff to create advertisements in SMS2003, I've got that part sorted, but I need to restrict certain parts of the site to members of an AD group.
I can get the username via:
Set objADSysInfo = CreateObject("ADSystemInfo")
strUserName =...
basically you are trying pipe the results to a file that has a space in the path statement, if you amend the finalcommand statement it should work:
finalcommand = command & """" & path & filename & """"
or you could simply use
command = "CMD /c DIR p:\ /S > ""C:\Documents and...
Normally when you boot up a PC, the Ctrl-Alt-Del screen appears before the operating system has finished loading all the services. Enough has been loaded to enable it to process a logon request but some elements that aren't required for logon may still be loading.
By adding a startup script...
There is an In() option in SQL but as far as I know there isn't in VBScript, you try the Select statement:
myVar = 3
Select Case myVar
Case 1
Wscript.Echo "A single value"
Case 2,3,5
Wscript.Echo "Multiple Values"
Case Else
Wscript.Echo "any other value"
End Select
Sounds like a perfect job for Robocopy. It will copy the files and create a log file so you can check if there were problems. Robocopy comes with the Windows Server 2003 resource kit, it is now standard on Windows Vista.
You could setup a basic vbscript, using the run command, if you have one...
I had a quick look for the error code 80004005 in google, there are a few different errors, but they seem to point to the field you are trying to write to as being unavailable or un-writeable.
Check the values you are attempting to place in this field, make sure that they are suitable.
Also...
The following subroutine will send emails via an SMTP server
You can include an attachment by adding this line: objEmail.AddAttachment "C:\file.ext"
Sub SendEmail(strTo, strFrom, strSubject, strMsg)
schema = "http://schemas.microsoft.com/cdo/configuration/"
SmtpServer = "" '<<< Put your...
Yes, if all the files are in the same folder then you could just use the folder names:
msi.InstallProduct "AdobeAcrobatReader8.0AcroRead.msi", "TRANSFORMS=AcroRead.mst"
if that doesn't work you can get the script to figure out where it is and insert the path into the function:
Set objShell =...
Hi After a bit more testing I have refined the code a bit, you don't need the Set objMatch line
tmpStr = "111.111.111.11 71836520 72412347 144248867"
Wscript.Echo RexReplace(tmpStr, "\s+", vbTab)
Function RexReplace(Source, Pattern, Value)
Set objRegExp = New RegExp...
You could use a regular expression to search for multiple spaces, then replace those spaces with a Tab, you can then use the split routine on the line.
tmpStr = "111.111.111.11 71836520 72412347 144248867"
'Setup Regular Expression pattern
Set objRegExp = New RegExp...
I give my vote to RoboCopy too. It's part of the Windows Server 2003 Resource Kit Tools, so it's hardly a third party app.
It's a very powerful command line utility, there's no install just copy it to your hard drive. They have now developed a GUI front end to help you generate the command line...
At my firm, we have around 1000 users, and each one of them gets the same mandatory profile.
Obviously some software in only available on certain PCs, so for those, we hide the icons in the Start Menu and use the Logon Script to unhide them.
The same logon script also applies Current User...
Suspect that its the MSComDlg.CommonDialog that's causing the problem, as far as I know it's not part of the windows OS (I could be wrong) so it's not always available.
You could try this instead
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "All Files|*.*"...
I'm not familiar with the PSExec tool, however when I've had trouble executing a command, I have usually echoed the command, so that I can test it manually.
That way I can see the result first hand and work out if there is anything wrong with the command before tearing apart my script.
Hi I'm fairly new to Citrix, but I have to setup a single Citrix Presentation XP FR3 server on our network, but I need to use an MS SQL 2005 server as the data store.
I have tried installing the presentation serevr, but I get an error when I get to the database setup screen. It only seems to be...
Sorry, I haven't got time to put a whole script togther, but hopefully you can use these elements as a starting point.
strComputer = "."
Set objWMIService = GetObject ("winmgmts:\\" & strComputer & "\root\cimv2")
Set colPrinters = objWMIService.ExecQuery ("Select * From Win32_Printer")
For...
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.