• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Saturday, 19 Jun 2010 18:30

I am in the prosess of setting up a new domain. The new users wil be the same as in the old domain.

Our fileserver will continue to be in the old domain.  I need to give users in the new domain the same rights as in the old domain, on both files an directories. olddomain\users1 newdomain\user1 Unoftunately there has been given both individually rights and group rights.

Author: "Duttaracalcutta"
Send by mail Print  Save  Delicious 
Date: Saturday, 19 Jun 2010 08:33

Hi ,

We have a working 'Crystal Enterprise 10' installed on server machine for Reporting Purpous and because of some Infra issue we have to move the whole installation along with schedule reports and events to a brand new upgraded server.

Both old and new server having same os (Windows 2003) and service pack.

Lokking for a appropriate process to move the same,Thanks in Advance :-)

 

,Shantanu

 

Author: "s h a n t a n u"
Send by mail Print  Save  Delicious 
Date: Saturday, 19 Jun 2010 08:27

Hi,

As required by our biz team ,currently we have to monitor ceratin feilds of Oracle databse tables,we are using 'Toad' for this activity

In toad we have to connect each and every server and run a query and it will give a count of data in a specific field.

I found its bit tedious and I am looking for vbscript, which will query the oracle database and give a mesage box for the current count of the feild of specific table.

I am using Windows XP with Oracle 10g Client Installed in it and i nee to fetch the data from Windows 2003 server (Both32 bit and 64 bit with same versiion of oracle as in Client Machine)

Looking for a slotution and  thanks in Advance :-)

''Shantanu

 

 

 

Author: "s h a n t a n u"
Send by mail Print  Save  Delicious 
Date: Friday, 18 Jun 2010 21:35

I have a script to execute the command rundll32 printui.dll,PrintUIEntry /ge /c\\workstation /f c:\temp\printers.txt

This part works fine.  I can open and read the file in notepad, no problem.

I then try to read the file in vbscript, and it can not read it.  BUT, if I open the file in notepad, copy and paste to a new document, the script works fine.  I have tried to copy it to a new document, append it, open and close it, with vbscript to no avail.

I also noticed the txt file created by printui is larger than the one I create manually.

Heres the sub the writes the file and that reads the file.

I put the timers in during troubleshooting.  To make sure the file had time to create.

Sub WorkStationPrinters

strComputer = "\\" & ComputerName.value

Cmd = "rundll32 printui.dll,PrintUIEntry /ge /c" & strComputer &" /f c:\printers.txt"

Set oShell = CreateObject("Wscript.Shell")

oShell.Run Cmd,0,1

idTimer4 = window.setTimeout("ReadWSPrinters", 5000, "VBScript")

End Sub

Sub ReadWSPrinters

Const FOR_READING = 1

Const FOR_WRITING = 2

Const FOR_APPENDING = 8

strFileName = "c:\temp\printers.txt"

 

Set objFS = CreateObject("Scripting.FileSystemObject")

If objFS.FileExists(strFileName) Then

Set objTS = objFS.OpenTextFile(strFileName, FOR_READING)

strContents = objTS.ReadAll

objTS.Close

arrLines = Split(strContents, vbNewLine)

For Each strLine In arrLines

If InStr(strLine,"Printer") > 0 Then  

msgbox Mid(strLine,15)

End If

Next

'objFS.DeleteFile strFileName

Else

msgbox "Can not find " & strFileName

End If

window.clearTimeout(idTimer4)

End Sub

 

 

The c:\temp\printers.txt file looks something like this

 

Printer Name: \\server1\printer

Server Name: \\server1

 

Printer Name: \\server1\printer2

Server Name: \\server1

 

Thanks

Brian

Author: "Problem reading file from printui.dll,PrintUIEntr"
Send by mail Print  Save  Delicious 
Date: Friday, 18 Jun 2010 19:30

I would like to interact with the .cmd window via .Exec and Stdin and Stdout.  How can I issue multiple commands to the same .cmd window/session?  I don't want to do it by tieing a long string of &'s together.

My current code is below:

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")

'The tool is launched
'Set oExec = WshShell.Exec("cmd /c dir C:\backup_Restore & ls")
Set oExec = WshShell.Exec("cmd /c dir C:\backup_Restore")
Set oExec = oExec & WshShell.Exec("cmd /c ls")
Set oExec = oExec & WshShell.Exec("cmd /c cd C:\CME")
Set oExec = oExec & WshShell.Exec("cmd /c ls")

'We wait for the end of process
Do While oExec.Status = 0
   WScript.Sleep 100
Loop

'We scan and display the command output flow 
Do While oExec.StdOut.AtEndOfStream <> True 
     totalline = totalline & oExec.StdOut.ReadLine & vbcrlf
Loop

Wscript.echo totalline
Author: "Mr. Eon"
Send by mail Print  Save  Delicious 
Date: Friday, 18 Jun 2010 18:33

This script is to manage the administrators group in windows 2000, but displays the error:

 

Line:25

Cha 1

Error: Type Mismatch

----------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

'Option Explicit

Dim objWMI, objItem, colItems,objNetwork
Dim strComputer, strUserName,CurrentComputer, VerOS, VerBig, OS, OSystem,objGroup,objGroup1,objGroup2,objGroup3,objUser1,objUser2,objUser3
Dim strGroup




' Initialise Groups with Const
Const allowadm = "cn=adm_local"


' Create objects and extract strGroup values

Set objNetwork = CreateObject("WScript.Network")
Set objUser = CreateObject("ADSystemInfo")
Set CurrentComputer = GetObject("LDAP://" & objUser.ComputerName)
strGroup = LCase(CurrentComputer.MemberOf)
strUserName = objNetwork.UserName


  

'If InStr(strGroup, lcase(adm_local)) Then

    If (VerBig = "5.0")  Then


        On Error Resume Next

            Set objGroup = GetObject("WinNT://" & strComputer & "/Administradores,group")
            Set objuser1 = GetObject("WinNT://" & strComputer & "/administrador,user")
            Set objUser2 = GetObject("WinNT://" & strUserName,user)
            Set objUser3 = GetObject("WinNT://" & strComputer & "/paqueta,user")
            Set objGroup1 = GetObject("WinNT://" & "paqueta/Domain Admins,group")
            Set objGroup2 = GetObject("WinNT://" & "paqueta/SPG - ServiceDesk N1 Users,group")
            Set objGroup3 = GetObject("WinNT://" & "paqueta/SPG - ServiceDesk N2 Users,group")
 

' Remove Users 

            objGroup.Remove(objUser1.ADsPath)
            objGroup.Remove(objUser2.ADsPath)

' Add Users and Groups

            objGroup.Add(objuser1.ADsPath)
            objGroup.Add(objGroup1.ADsPath)
            objGroup.Add(objGroup2.ADsPath)
            objGroup.Add(objGroup3.ADsPath)

    End If
'End If

   
WScript.Quit

 


Eduardo José Kieling -- MCITP Server Administrator -- http://br.linkedin.com/in/eduardokieling
Author: "Eduardo J. Kieling"
Send by mail Print  Save  Delicious 
Date: Friday, 18 Jun 2010 17:53

does anyone know how I can email the results via an html or text attachement.

 

ption Explicit

Const strOU = "DC=XXX,DC=XXX"

Const HKLM = &H80000002
Dim objFSO, objFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(objFSO.GetParentFolderName(Wscript.ScriptFullname) & "\xxxxxx_versions.txt", True)

Dim objConnection
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject"

Dim objCommand
Set objCommand = CreateObject("ADODB.Command") 
objCommand.ActiveConnection = objConnection 
objCommand.Properties("Page Size") = 1000


' Get all names of all computer accounts
objCommand.CommandText = "SELECT name FROM 'LDAP://" & strOU & "' WHERE objectCategory='computer'" 
Dim objRS
Set objRS = objCommand.Execute 

' Loop through computer names and check McAfee definition versions
Dim objReg, strDAT, strMajor, strMinor
On Error Resume Next
WriteOut "Hostname" & vbTab & "Engine version" & vbTab & "DAT version"
Do Until objRS.EOF
	Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & objRS("name") & "\root\default:StdRegProv")
	If Err.Number = 0 Then
	
		objReg.GetDWORDValue HKLM, "SOFTWARE\McAfee\AVEngine", "EngineVersionMajor", strMajor
		objReg.GetDWORDValue HKLM, "SOFTWARE\McAfee\AVEngine", "EngineVersionMinor", strMinor
		objReg.GetDWORDValue HKLM, "SOFTWARE\McAfee\AVEngine", "AVDatVersion", strDAT
		WriteOut objRS("name") & vbTab & vbTab & strMajor & "." & strMinor & vbTab & strDAT
	Else
		WriteOut objRS("name")
	End If
	Set objReg = nothing
	objRS.MoveNext
Loop



Sub WriteOut(strText)
	'Write text to file
	objFile.WriteLine strText

	' Write text to screen if running under cscript
	If Instr(1, Wscript.FullName, "cscript",1) Then
		Wscript.Echo strText
	End If
End Sub

 

 

 

Author: "casaestrada"
Send by mail Print  Save  Delicious 
Date: Friday, 18 Jun 2010 16:40
I have a powershell script (Thanks mjolinor)  that creates a csv file I need to send to an ftp server then I need to delete the local copy.  My question is would it be easy to just include the ftp and delete commands in the powershell script or should I just create a batch file with the commands and call it from my script.  Can some one give me an example? 
Author: "CooperKevin"
Send by mail Print  Save  Delicious 
Date: Friday, 18 Jun 2010 09:32

Hi,

I have the following XML file. This file is generated from a Dell tool (omreport.exe) to get information on your scsi controllers.

--

XML in next post due to character limitation.

---

When I import this file with the following statement I got a powershell object that I can traverse;
  [xml]$ControllerList = get-content $ControllerPath

Problem is that Powershell is making it very hard for me to retrieve actual data. Example;
> $ControllerList.Oma.Controllers.DCStorageObject[0].ControllerNum

type                                    #text                                 
----                                    -----                                 
u32                                     0                                     

I haven't found any way to get the Controller number that is stored in the #text record. Powershell thinks that the #text is a comment.

Is there any way that I can make Powershell know that this specific # is not a comment? I can't change the way the output is generated except making it a csv file (and even that one is not correct to begin with... darn Dell)

I'm hoping to solve this puzzle before i'm going on a holiday tomorrow.

Author: "VincentK"
Send by mail Print  Save  Delicious 
Date: Friday, 18 Jun 2010 07:30

Hello Scripting Guys!

Im trying to come up with a script that will modify a text file that contains URL's so that I can import it into my proxy.

In particular I will need to; - add a category to the top of the file, modify the URL so that only the domain remains, (strip leading http:// and trailing path) and at the end of the file add an END.

The a sample of the text in the input file is;

http://site1.com/Timesheet_old/howitworks.php
http://site2/miniblog/gmcdonald/assets_c/2008/06/anz.html
http://www.site3/fraud_application/directory/statement.php
http://site4.com/reinforces.html

The output file should look like;

define category one
site1.com
site2
www.site3
site4.com
end

I'm new to power shell scripting and I don't know where to start.

Thank you

Author: "MMethorst"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 23:47

Hello,
 I'm starting to dive on this world of VBScript by the book Microsoft® VBScript Step By Step , and I can see, it's a very useful language, but the community is so much small and decentralized and this could be a problem to the development for this language, but anyway, I want to know where I can get some resources to make Windows GUIs(not on web), because my friend said that is something called WScript, that is for this.

Best Regards,
 Nathan Paulino Campos

Author: "Nathan Campos"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 19:51

Where can I find info on:

  1. Reading in the contents of a .txt file I've created, the format of each line is:  6-17-2010 at 1:35:53 PM - izagorskiy on COM-CIINTERN - Logged on
  2. I would like each piece of data to be inserted into its each column (perhaps with a column header).

I would prefer to do this with Powershell so I can get more familiar with it.....

Any idea on where I can get the info to get started on something like this???

Author: "Steve Grosz"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 18:44
Hi, new to powershell and perl. I am trying to use powershell to read a text file and then pass the read file information to a registry location to create a reg key. The only problem is that the registry key I am designing must be greater than 45kb. Is there any way I can either split up the file into smaller pieces or somehow change the maximum amount allowed to be passed in powershell. Or any work-around at all would be help full. The values must all be passed at once because you canot modify the registry key once it is created. Or at least not that im aware of. Help please.
Author: "RaynMan77"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 17:43

I'm hoping someone can offer a little insight into the error of my ways here. Basically I've got the following PowerShell script:

Get-ChildItem -path c:\Website\ | Where { $_.name -eq "folder" } | ForEach {./SetFolderPermission.ps1 -path $_.Fullname -Access "NETWORK SERVICE" -Permission Modify}

The idea is that it it assigns Modify permissions to the relevant user (network service). The ps1 script is taken from here: http://www.powershell.nu/2009/02/13/set-folder-permissions-using-a-powershell-script/ what I can't work out though is why the child files don't inherit correctly i.e.:

c:\Website\folder\   <--Permissions right
c:\Website\folder\somethingelse\   <--Permissions right
c:\Website\folder\file.text   <--Permissions not inherited at all

Setting it through the GUI however works fine.

Can anyone help?

Thanks

Tim

Author: "Tim Gaunt"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 16:56

I need some help and not sure which script language would be best.  I have an automated process that is creating a CSV file with 6 fields.  I need to read this file and pull out 2 of the fields and add some stactic data then export it to another CSV file.  I would then like to excute an FTP to send the new CSV file up to a print server that will read the file and print a label.  I have been playing with a windows power shell script using the import-csv and export-csv cmdlets, but for some reason I keep getting the length of my field instead of the actual string.  Here is my simple script can you guys give me some advice maybe VBscript would be easier.  Right now I'm just trying to get my $ITEM varible to display in the print.csv file when I run the script now it gives me the length of the field which is 4.

$path = "c:\test\extline1.csv"
$ITEM = "test"
Import-csv -path $path
export-csv -path C:\test\print.csv -inputobject $ITEM

Author: "CooperKevin"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 15:37

I know that this may sound very basic but i can not seem to find how to get the Quest commandlets to be useable in powershell.  I downloaded them from the web before the scripting games started but i did not try to use them.  I have been playing with Powershell today and tried to use some of the Quest commandlets but apparently there is somthig else that I need to do to activate them.

I also have powershell 2.0. installed.

I am working on an XP SP3 machine.

Anyone have a link or some pointers that I could use to get started?  Any help would be appreciated.

Thanks

 

Author: "JRussell97"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 13:17
When I run ocsetup Printing-Foundation-LPRPortMonitor  I get it in quiet mode by default....  how do I get it to show a progress bar so students do not think it is locked up?
Author: "trey5498"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 13:16

Hi all,

I want to create a VBscript which reads lines from a file and create a variable for the printer line called & Printer or what so ever. Below you can find an example of my file.

[Preferences]
LastExitOption=LOGOFF
OutlookNoOpenDialog=|
Printer=\\PrintServer\PrinterName

My variable & Printer should only contain the printserver and printerName (\\PrintServer\PrinterName).

Hope someone can help me!

 

 

 


Dynares Groep B.V.
Author: "Dynares"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 12:28

I am trying to map printers through a vbs script but when the script runs no printers are added.  We are trying to do this based on group membership.  Below is whay I have so far and from what I can see in other posts appears correct but I must be missing something.  This script will be called in a logon script.  Any assistance will be great. 

 

'Printer vbs for logon script

On Error Resume Next

'determines the user who just logged on
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")

strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)

For Each strGroup in objUser.MemberOf
    strGroupPath = "LDAP://" & strGroup
    Set objGroup = GetObject(strGroupPath)
    strGroupName = objGroup.CN

'Mapping of printers by group and set default printer for that group
    Select Case strGroupName
        Case "Domain Users"
           objNetwork.AddWindowsPrinterConnection "\\initechdc2\hp4500test"
           objNetwork.SetDefaultPrinter "\\initechdc2\hp4500test"
       

'==========Add addtional case sections for each group above================
       
    End Select
next

Author: "bgpau96"
Send by mail Print  Save  Delicious 
Date: Thursday, 17 Jun 2010 11:18
I am looking for help in developng C# script which uses wmi to connect to remote computers and collect various data
Author: "Sheikh Zubayr"
Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader