Use CSV and batch file for net user command
Hello Guys,
I am trying to load domain user id's from a csv file and parse them through the net user /domain command. I would appreciate it if someone could help me open the csv file and store each line as a variable so that it could be parsed.
Thanks in advance.
My apologies, I didn't notice that you specifically mentioned batch files in your question title.
I don't have much to offer, as my batch skills are extremely rusty.
I would personally be doing all of this via PowerShell, as the AD cmdlets can return any bit of information about your users that you'd like.
Don't retire TechNet! -
(Don't give up yet - 12,420+ strong and growing)
Similar Messages
-
Batch file for End Users SAP logon pad update.
Hi All,
We need to make sure that some of the new systems are updated in the end users logon pad. I know that on the logon pad itself a user can create an entry for the new Server but is it possible to create a batch file that will automatically update the logon pad, when ran.
If yes, then can someone guide me on the steps.the logon pad relies on a few files:
saplogon.ini
sapmsg.ini
and another one less used:
sapgraph.ini
so, all you have to do is to copy these files from a distribution server, upon the next saplogon restart, it will use the new config. -
How to use packages and jar files for applet?
Hi!
My applet takes a class say a.class.
Now this class depends on other classes that are packaged
in a directory and put separately.
I want to put this applet on the web.
So how do I manage the .class files in he package.
I have tried using jar file format.But I was not able to get it working.
Can someone please help me?
ThanksUse Archive instead of codebase:
<APPLET CODE="MyApplet.class" ARCHIVE="MyApplet.jar" WIDTH=400 HEIGHT=300></APPLET> -
Add the ability to use .xls and .xlsx files for Data Merge
Who wouldn't like that?!
Me! Me!
Or rather: I think the big empty part of Data Merge right now is its inability to handle XML input. Much as I detest XML, it seems like a lot of people would really like that to happen, it does appear to be a Web 2.0 -type technology that it's easy to get the InDesign Marketing team excited about.
It's easy enough to convert XLS/XLSX into CSV (or XML), so I think improving XML would be a better use of scarce resources...
(I can't believe I'm tossing out a vote in favor of XML. Kill me now!) -
Hi everybody,
I want to make some changes to IE settings of many PCs to be able to open a tool which willl be used by all users using the systems..
Since same settings are to be applied to different systems. I want to create a batch file for it .
Settings are :
1.Go to internet Options-- security--sites--trusted sites and and the site
https://abc.com under it
2.Set security level for this zone as Low
3.Check enable protected mode
4.Go to internet options--settings--privacy and uncheck Turn on Pop-up blocker
5.Go to tools--compatibility view settings and the site
https://abc.com under it . Check option - display intranet sites
in compatibility view
I did some research on net and found that all these settings are done by changing entries in registery.
The site http://support.microsoft.com/kb/182569 gave lot of info on what various codes mean . But since I am new to creating
batch files , it does not help me in writing commands. Little more research showed me that my commands would be something like
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" /.....................
However I cannot use trial and error as any unwanted change to registery may cause damage to my systems .
It would really be very helpful if anyone can help me with his/her expertise in batch files and reg files.
My target will be for IE8/9/10/11 preview . I am assuming the commands would be same for these versions which are comparitively new.
Thanks,
Mani
manISRTHi,
this is a very broad topic, with quite a few scenarios, and potentially lots of complexity.
Here are some thoughts I have written down for you to consider:
Firstly, you really need to understand the basics of IE Zones, and how it is that addresses are categorised into each zone.
There are default settings for each zone, and these are initially defined by MS, but you, or the user can, and may, have changed which zone is active, in which situation.
E.g., if you are dealing with pc's in your organisation and under your control, vs pc's not in your organisation and/or not under your control.
For pc's which are in your organisation, are they used only inside your office network, or are they also used outside your office network?
Are the pc's under your control managed by Active Directory (are they members of your organisation's AD Domain?
Does your office network use a network firewall or proxy, and the pc's inside gain access to the internet by "traversing" this proxy?
Is the website you mention, "inside" your organisation's network, or, "outside" your organisation's network?
If outside, how do your organisation's pc's currently become configured for internet access?
Do they have configurations applied to the pc's, such as proxy settings? If so, does this use Proxy Auto Configuration (PAC) or INS, such as wpad.dat or proxy.pac?
Note that if you adjust site-to-zone settings, and/or settings for a particular zone, other websites which are categorised into that zone will also attract the adjusted settings, so you need to ensure that any changes you make, are suitable for those other
websites too.
Is the website address part of your organisation's domain name, or a domain name that you already have particular settings for?
Is the website/address and the content upon it controlled by your organisation?
For compatibility view, depending upon the IE browser version, there are different methods available, you may not need to adjust the browser settings if the webpages are suitably constructed:
Does the website specify <!DOCTYPE ?
Does the website supply X-UA-Compatible metatag?
You can deliver most settings for IE in a few different ways:
- AD GPO (you can use Group Policy Admin Templates, or, Group Policy Preferences)
- IEAK (you can deploy a settings package with or without deploying a version of the browser)
- registry settings (which you can deploy using scripts or batch files)
- get the user to manually apply the settings via the user interface
Note that some settings may need to be applied per-user (HKCU) and some settings are per-machine (HKLM).
If you have a multi-user or hotdesk scenario (where more than a single user, uses the same machine), this might require you to re-apply the settings for each and every user.
E.g.:
Your organisation is wanting to use a hosted web application, accessed from inside your organisation, but it is hosted outside your ogranisation.
The address is http://contoso.websales.hosterxyz.com
You examine your existing pc configurations and determine that the IE Trusted Sites zone is not currently in use by any standard configurations.
The hosted web application requires IE Protected Mode to be disabled (because of some special functions/features).
You examine the default settings of the IE Trusted Sites zone, and observe that the Trusted Sites zone already has Protected Mode disabled.
You decide to categorise the website "http://contoso.websales.hosterxyz.com" as a Trusted Site.
On a test pc, you manually add the website "http://contoso.websales.hosterxyz.com" to Trusted Sites, and test the web application is operating correctly.
You then create an AD GPO, which adds this website address into the Trusted Sites zone, and link/apply/deploy this GPO within your AD.
Your organisations computers automatically read, process and apply this GPO, and all computers are now configured for this website as a Trusted Site.
Note that if you use the "classic" GPO methods (Admin Templates), users can no longer manually adjust websites in or out of the Trusted Sites zone, because when "classic" GPO is deployed, it removes the ability for users to adjust these
settings manually.
This may be suitable for your organisation, or, unsuitable - it depends upon the degree of "freedom" you wish/need to allow.
Alternately, you could use IEAK or GP Preferences, to deploy the Trusted Sites settings - these two methods allow the end-user to manually adjust if they choose. This means the end-user can remove the settings you deployed.
Again, this may (or not) suit your scenario.
Don
(Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!) -
HOw to create a Batch file for java application and whats the use of this ?
HI,
How to create a Batch file for java application ?
And whats the use of creating batch file ?
Thanks in advanceFirst of all, you're OT.
Second, you can find this everywhere in the net.
If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
Otherwise use:
javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
Don't specify the .class extension.
Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
Finally add dukes and give 'hem away.
Bye. -
Hi - I understand I need to convert AVI and MPEG files for use within IMovie 11. I have one particular file that has a watermark stating "Created with Flip4Mac WMV Demo". Can someone please recommend the best program for a novice? Thanks!
Hi Susan,
It is no simpler converting vobs to mp4 than mpg (mpeg2).
There is *always* a loss of quality converting video from one lossy-compressed format to another, e.g. mpeg2 to mp4.
So, if you want to not lose any quality, then converting vobs to mpeg2 (mpg) is the thing to do (since there will be no video/audio re-compression), assuming Lr5 will accept them (sorry, but I do not know). example commands:
Mac: ffmpeg -i myvideo.vob -sameq myvideo.mpg
Win: ffmbc -i myvideo.vob -sameq myvideo.mpg
If Lr5 won't accept them, then you can convert to mp4 with minimal quality loss using a command like:
Mac: ffmpeg -i myvideo.vob -sameq myvideo.mp4
Win: ffmbc -i myvideo.vob -sameq myvideo.mp4
You may need variations of these commands depending on encoding of vob.
Note: -i means -input-file; -sameq means -same-quality, as much as possible.
ffm... is smart enough to avoid re-encoding, if possible, when -sameq is used, and makes reasonable choices for audio/video codecs based on extension of output file.
Of course, you'll need to download/install ffm... program if not already on your machine, and execute commands in a terminal or command window.
Do keep us posted please .
Cheers,
Rob -
ast week I found records of purchases for 3 files using itunes, and left money for my credit card, do not make such purchases, what the **** is going on? itunes is not safe?
Contact iTunes support at the link below.
https://ssl.apple.com/emea/support/itunes/contact.html -
Maximum number of lines in Al11 for csv and txt files
Hello Experts,
I need to extract millions of records to a file in AL11 from several DSO - based on fiscal period and year. Can anyone tell me about the maximun number of lines a csv and txt file can hold in AL11.
Points will be assigned.
Kevin.Hi.
As per my knowledge there is no limit for text files but for csv file its 1048576 rows.
Hope this helps.
Regards
Sai -
How to create a Batch file for java application ?
HI,
How to create a Batch file for java application ?
And whats the use of creating batch file ?
Thanks in advance[http://static.springsource.org/spring-batch/]
Assuming you want to develop a batch application rather than actually just create a .bat file .. -
I have just bought a new Imac and it will not load my copy of FCE 3.5 as it says "PowerPC applications are no longer supported". So how do I get to use the version of FCE I am used to and have paid for ?
I do not have any experience with Final Cut, but if you have existing projects that you MUST access; then you are in need of a solution on your new iMac in Mountain Lion!
Unfortunately you got caught up in the minor miracle of Rosetta. Originally licensed by Apple when it migrated from the PowerPC CPU platform that it had used from the mid-1990's until the Intel CPU platform in 2006, Rosetta allowed Mac users to continue to use their library of PPC software transparently in emulation.
However, Apple's license to continue to use this technology expired with new releases of OS X commencing with Lion (and now Mountain Lion). While educational efforts have been made over the last 6 years, the fact is that Rosetta was SO successful that many users were caught unaware UNTIL they upgraded to Lion or Mountain Lion.
Workarounds:
1. Purchase a used Mac that will run Snow Leopard (with the optional Rosetta installed) and continue to run FCE on that Mac (you can actually use Screen Sharing with a "headless" used Snow Leopard Mac Mini and use the 27" screen from your iMac to view and work FCE in the Mac Mini environment);
2. Upgrade to an Intel compatible version of FCE and hope it converts your existing projects to its newer format correctly. There is much debate that the newer version of Final Cut are eliminating many needed features; for example Final Cut Pro X vs. Final Cut Pro 6 -- many users are staying with version 6;
3. Install Snow Leopard (with Rosetta) into Parallels and then install FCE in the Snow Leopard environment:
[click on image to enlarge]
Full Snow Leopard installation instructions here:
http://forums.macrumors.com/showthread.php?t=1365439
NOTE: STEP ONE of the instructions must currently be completed on a Snow Leopard or Lion Mac and the resulting modified Snow Leopard.cdr install file can then be moved over to your Mountain Lion Mac for completion of the remaining steps.
NOTE 2: Computer games with complex, 3D or fast motion graphics make not work well or at all in virtualization. -
<p>Also what are the limitations in terms of data size or performance related issues while using csv or text file?</p><p>Is it the best practice to use csv , text file to use as a datasource to improve performance?</p><p>Please Advice.... </p><p> </p>
<p>Hi,</p><p>Create Same Data Input for CSV and Text File ,Create 2 different reports one for CSV and One for Text ,run them one you have done that.</p><p>Go to Report Menu and Select Performance Information .Use the Data in that to check which one is good datasource to improve performance</p><p>Cheers</p><p>Rahul</p>
-
DSC powershell xwindowsprocess to execute batch file under different user account
DSC powershell run under "NT AUTHORITY\SYSTEM".
I am trying to execute a batch file under different user account using xwindowsprocess in DSC resource kit.
I created a custom dsc resource with 3 parameters namely Exepath, Arguments, Credential.
I received those parameter values in settargetresource method.
CallPInvoke
[Source.NativeMethods]::CreateProcessAsUser(("$ExePath "+$Arguments), $Credential.GetNetworkCredential().Domain, $Credential.GetNetworkCredential().UserName, $Credential.GetNetworkCredential().Password)
I tested it by invoking a batch file and writing username under which it executes to a text file.
After executing, the output text file still contains the "Systemname$".Configuration Sample_xService_ServiceWithCredential
param
[string[]]
$nodeName = 'localhost',
[System.String]
$Name,
[System.String]
[ValidateSet("Automatic", "Manual", "Disabled")]
$StartupType="Automatic",
[System.String]
[ValidateSet("LocalSystem", "LocalService", "NetworkService")]
$BuiltInAccount="LocalSystem",
[System.Management.Automation.PSCredential]
$Credential,
[System.String]
[ValidateSet("Running", "Stopped")]
$State="Running",
[System.String]
[ValidateSet("Present", "Absent")]
$Ensure="Present",
[System.String]
$Path,
[System.String]
$DisplayName,
[System.String]
$Description,
[System.String[]]
$Dependencies
Import-DscResource -Name MSFT_xServiceResource -ModuleName xPSDesiredStateConfiguration
Node $nodeName
xService service
Name = $Name
DisplayName = $DisplayName
Ensure = $Ensure
Path = $Path
StartupType = $StartupType
Credential = $credential
$Config = @{
Allnodes = @(
Nodename = "localhost"
PSDSCAllowPlainTextPassword = $true
#Sample Scenarios
$credential = Get-Credential
Sample_xService_ServiceWithCredential -ConfigurationData $Config -Name "Sample Service" -DisplayName "Sample Display Name" -Ensure "Present" -Path "C:\DSC\TestService.exe" -StartupType Automatic -Credential $credential
¯\_(ツ)_/¯ -
Macro to compare CSV and Excel file
Team,
Do we have any macro to compare CSV and Excel file.
1) In Excel we should have two text boxes asking the user to select the files from the path where they have Stored
2) First Text is for CSV file
3) Second Text box is for Excel file
4) We Should have Compare button that should run the Macro and Show the Differences.
Thanks!
KiranHi
Based on my understanding, we need to convert the 2 files into the same format before comparing two different formats files.
Here are the options:
1. Convert the CSV file and Excel file into 2-dim Arrays, then compare them, about how to load a CSV file into VBA array, you can search it from
internet or ask a solution in VBA forum.
VBA forum:
http://social.msdn.microsoft.com/Forums/en-US/home?forum=isvvba
2. Also you can import CSV file to Excel sheet, and then compare them.
Here is the sample code for your reference:
‘import csv file
Sub InputCSV()
Dim Wb As Workbook
Dim Arr
Set Wb = GetObject(Application.GetOpenFilename("csv file,*.csv", , "please choose a csv file", , False))
Arr = Wb.ActiveSheet.Range("A1").CurrentRegion
Wb.Close False
Range("A1").Resize(UBound(Arr), UBound(Arr, 2)) = Arr
End Sub
‘compare sheet
Sub CompareTable()
Dim tem, tem1 As String
Dim text1, text2 As String
Dim i As Integer, hang1 As Long, hang2 As Long, lie As Long, maxhang As Long, maxlie As Long
Sheets("Sheet1").Select
Columns("A:A").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("A1").Select
Sheets("Sheet2").Select
Rows("1:4").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("A1").Select
MaxRow = 250
MaxColumn = 40
For hang1 = 2 To maxhang
Dim a As Integer
a = 0
tem = Sheets(1).Cells(hang1, 1)
For hang2 = 1 To maxhang
tem1 = Sheets(2).Cells(hang2, 1)
If tem1 = tem Then
a = 1
Sheets(2).Cells(hang2, 1).Interior.ColorIndex = 6
For lie = 1 To maxlie
text1 = Sheets(1).Cells(hang1, lie)
text2 = Sheets(2).Cells(hang2, lie)
If text1 <> text2 Then
Sheets(2).Cells(hang2, lie).Interior.ColorIndex = 8
End If
Next
End If
Next
If a = 0 Then
Sheets(1).Cells(hang1, 1).Interior.ColorIndex = 5
End If
Next
Hope this will help.
Best Regards
Lan
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Distinguishing between CSV and Excel file formats
I am trying to distinguish between CSV and Excel files. Most of the files I need to process are CSV, but some have been opened and re-saved in Excel format. I know about the Excel toolbox available, but haven't used it yet.
I need to be able to open a spreadsheet file regardless of if it is in CSV or Excel format. Any help would be greatly appreciated.
Here are two example files, one CSV and one Excel. Both have .XLS file extensions.
Attachments:
20-4-XLS.xls 21 KB
20-5-CSV.xls 8 KBHi Paul,
I think the matter is not the extention (xls or csv or whatever) but the format of the data written in your file.
To see what I mean, open the xls file you posted with notepad... What does it look like ?
You have tobe sure of the format of the file you want to read so that you can develop an appropriate VI... if you want to be able to read different type of data format, do a test before reading the file and then use an appropriate routine for each format.
Hope this helps you...
BTW, to read the one named CSV, a simple "read from spreadsheet file" VI will do the job
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Maybe you are looking for
-
HP ENVY 4500: Wirelesss Setup Will Not Recognize Correct Password!
I recently attempted to establish a wireless connection for a HP ENVY 4500 and I could not get the printer to accept the CORRECT wireless network password. This is the second such printer like this that I have set up and I have one additional one to
-
Hello Everybody, I am working with Cisco Secure ACS 4.2 and it is integrated with Active Directory at a Windows 2008 R2 functional level, user accounts that are set with lockout parameters (3 incorrect attempts) are locked out prematurely after the u
-
I lost my ipod touch and never set up gps how to set it up with out having my ipod
i lost my ipod touch and never set up the gps. How do i set it up with out having my ipod touch
-
I need to retrieve messages from inbox of mobile phone (i.e both on SIM and on Phone) programmatically through codes. Can someone help please! Thanks
-
FF 4.0 Back Button&Stop/Refresh need HELP!!
It's oh so nice to complicate things with multiplicities of functions. Please delay the History function and let the Back button be a Back button, make it One Second so that it stops accidentally occurring. Make the Back button larger, make it a Squa