Powershell script calling batch file, how to "echo" or otherwise pass in two or more values asked for by batch file

I've been having a lot of problems trying to get an old batch file we have laying around, to run from my powershell script. The batch file actually asks for two inputs from the user. I've managed to put together a powershell that echos a response, but of
course, that only will answer one of the prompts. As usual, I've simplified things here to get my testing done. The batch file looks like this:
@ECHO OFF
SET /P CUSTID=Customer Number:
SET /P DBCOUNT=Number of Live Databases:
ECHO Customer Id was set to : %CUSTID%
ECHO Database Count was set to : %DBCOUNT%
Two inputs, two echos to verify values have been set. Now, the powershell looks like this:
Param(
 [string]$ClientADG,
    [string]$ClientDBCount,
    [scriptblock]$Command
$ClientADG = '1013'
$ClientDBCount = '2'
$Response = $ClientADG + "`r`n" + $ClientDBCount
$Command = 'Invoke-Command -ComputerName localhost -ScriptBlock {cmd /c "echo ' + $ClientADG + ' | E:\Scripts\Setup\Company\DatabaseSetupTest.bat"}'
powershell -command $Command
Output looks like:
Customer Number: Number of Live Databases: Customer Id was set to : 1013
Database Count was set to :
As expected, as I'm only passing in one value. I can't figure out how to get a second value passed in for the second prompt. Instead of $ClientADG, I tried to mash the two value together in the $Response variable with a cr/lf or a cr or a lf in between,
but no go there either. The first input gets set to the second value, and second input is blank still. In the essence of time, I need to get this batch file called from Powershell to get some folks productive while I actually rewrite what the batch file does
in another powershell, so it can be integrated into other things. (I'm automating what a bunch of people spend hours doing into multiple scripts and eventually one BIG script so they can focus on doing their real jobs instead).
How do I get this right in powershell? I don't want to modify the batch file at all at this point, just get it running from the powershell.
Thanks in advance!
mpleaf

It's a "simple" test so I can figure out how to get the arguments passed from ps to bat. The bat file looks like this:
@ECHO OFF
SET CUSTID = %1
SET DBCOUNT = %2
ECHO Customer Id was set to : %CUSTID%
ECHO Database Count was set to : %DBCOUNT%
That's it. The PS script looks like this:
Invoke-Command-ComputerName myserver-ScriptBlock{cmd/c"E:\Scripts\Setup\Company\DatabaseSetupTest.bat
1013 2"}
That's it. The bat file exists on "myserver", and I'm getting the echo back, but without the values.
mpleaf

Similar Messages

  • Why would a commercial printer ask for Illustrator native files instead of InDesign files?

    Why would a commercial printer ask for Illustrator native files instead of InDesign files?
    For example, We create 32 hang tags for the same brand. Each hang tag looks identical except for a color bar calling out the different fits. We set the files up in InDesign with a Master Page congaing all the similar artwork. This process saves us a lot of time when making changes to the entire package of hang tags. So my question is... why can't the printer use InDesign. They are saying they convert our InDesign files to Illustrator before printing.

    A printer who insists on native files but can't take InDesign is not properly equipped. It suggests they haven't updated their capabilities in 15 years.

  • Premiere pro cs5 cannot be closed. I suppose there is a window opened asking for saving a file. I can not see any. What to do?

    How can I close premiere pro. There is a window opened asking for saving a file, which i Can not see.

    Or do this:
    or this

  • I changed my Apple ID two weeks ago and I Accidently forgot to sign out of my iCloud on my iPhone 5C. now it wont let me change the iCloud ID to match my new Apple ID. How do I change my iCloud ID even though it is asking for the old ID?

    I changed my Apple ID two weeks ago and I accidently forgot to sign out of my iCloud on my iPhone 5C. Now it wont let me change the iCloud ID to match my new Apple ID. How do I change my iCloud ID even though it is asking for the old ID?

    If the old ID is an earlier version of your current ID, temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iPhone when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • Imessage on my iMac has created two iMessage account both asking for Apple ID....and no option to - (delete) one of the two duplicate accounts....how can I delete one of them it just bothers me due to sign in issues....goes inactive when signed in on othe

    imessage on my iMac has created two iMessage account both asking for Apple ID....and no option to - (delete) one of the two duplicate accounts....how can I delete one of them it just bothers me due to sign in issues....when signed into one it signs out the other and goes inactive I just wanted to delete one of them so this issue doesn't happen....why doesn't it give the option to delete ONLY these two accounts

    1. Don't confuse "Apple ID" with iTunes Account ID.  You can have many Apple IDs but only one iTunes account active at a time.
    2. If you "changed" your iTunes account ID, you actually have 2 accounts - one under the old name plus the new name.
    3. You can't merge the accounts - they remain separate.  Apps purcahsed under the old account name will update ONLY WHEN THE PHONE IS SIGNED IN TO THE OLD ACCOUNT NAME  and visa versa.
    4. Likewise, you can sync only the apps, music, media purchased under the account the phone AND iTunes are signed in to.

  • How to ceate a new Country key,currency ,version and value type for report

    hi,
    can you please let me know How to ceate a new Country key,currency ,version and value type for report
    along with tables and tcodes.
    thanking you

    Not clear on your comments
    How to ceate a new Country key,currency,
       version and value type for report
    because in one line you are saying you want to create Country Key, which means your requirement is in some transaction whereas at the end, you say for report.
    Can you let us know you want to develop a report and if so, from which transactions, you want to take datas.  You have to be clear on this.
    thanks
    G. Lakshmipathi

  • How to create a unique key using two or more attributes?

    how to create a unique key using two or more attributes ?

    The following example illustrate how to create a unique key using two or more attributes/fields
    Scenario: Implementing Unique Key on ManagerID & Location ID in DepartmentEO(Department Table)
    Step#1: Open the Desired Entity Object “DepartmentEO”. Go to Overview tab & Click “General” Finger tab.
    Step#2: Expand “Alternate Keys” section & click “+”.
    Step#3: In the Pop-up wizard, Enter a name for alternate Key “Unique_Manager_X_Location”.
    Step#4: Select the desired attributes/fields from available list & Shuffle to right side.
    Step#5: Now go to “Business Rules” finger tab.
    Step#6: Select “Entity Validators” in the list & click “+” to add a new entity level validation rule.
    Step#7: In the Pop-up, Select “Rule Type” as Unique Key
    Step#8: In the “Rule Definition” tab select the key “Unique_Manager_X_Location”created.
    Step#9: Now go to “Failure Handling” tab, and click the Magnifier Icon .
    Step#10: If the key is not already created then in the “Select Text Resource” Popup, Using the functional design document, Enter display value, Key and Description. And click “Save & Select” Button.
    Step#11: Now Click “OK”.

  • "recover database until cancel" asks for archive log file that do not exist

    Hello,
    Oracle Release : Oracle 10.2.0.2.0
    Last week we performed, a restore and then an Oracle recovery using the recover database until cancel command. (we didn't use backup control files) .It worked fine and we able to restart the SAP instances. However, I still have questions about Oracle behaviour using this command.
    First we restored, an online backup.
    We tried to restart the database, but got ORA-01113,ORA-01110 errors :
    sr3usr.data1 needed media recovery.
    Then we performed the recovery :
    According Oracel documentation, "recover database until cancel recovery" proceeds by prompting you with the suggested filenames of archived redo log files.
    The probleme is it  prompts for archive log file that do not exist.
    As you can see below, it asked for SMAarch1_10420_610186861.dbf that has never been created. Therefore, I cancelled manually the recovery, and restarted the database. We never got the message "media recovery complete"
    ORA-279 signalled during: ALTER DATABASE RECOVER    LOGFILE '/oracle/SMA/oraarch/SMAarch1_10417_61018686
    Fri Sep  7 14:09:45 2007
    ALTER DATABASE RECOVER    LOGFILE '/oracle/SMA/oraarch/SMAarch1_10418_610186861.dbf'
    Fri Sep  7 14:09:45 2007
    Media Recovery Log /oracle/SMA/oraarch/SMAarch1_10418_610186861.dbf
    ORA-279 signalled during: ALTER DATABASE RECOVER    LOGFILE '/oracle/SMA/oraarch/SMAarch1_10418_61018686
    Fri Sep  7 14:10:03 2007
    ALTER DATABASE RECOVER    LOGFILE '/oracle/SMA/oraarch/SMAarch1_10419_610186861.dbf'
    Fri Sep  7 14:10:03 2007
    Media Recovery Log /oracle/SMA/oraarch/SMAarch1_10419_610186861.dbf
    ORA-279 signalled during: ALTER DATABASE RECOVER    LOGFILE '/oracle/SMA/oraarch/SMAarch1_10419_61018686
    Fri Sep  7 14:10:13 2007
    ALTER DATABASE RECOVER    LOGFILE '/oracle/SMA/oraarch/SMAarch1_10420_610186861.dbf'
    Fri Sep  7 14:10:13 2007
    Media Recovery Log /oracle/SMA/oraarch/SMAarch1_10420_610186861.dbf
    Errors with log /oracle/SMA/oraarch/SMAarch1_10420_610186861.dbf
    ORA-308 signalled during: ALTER DATABASE RECOVER    LOGFILE '/oracle/SMA/oraarch/SMAarch1_10420_61018686
    Fri Sep  7 14:15:19 2007
    ALTER DATABASE RECOVER CANCEL
    Fri Sep  7 14:15:20 2007
    ORA-1013 signalled during: ALTER DATABASE RECOVER CANCEL ...
    Fri Sep  7 14:15:40 2007
    Shutting down instance: further logons disabled
    When restaring the database we could see that, a recovery of online redo log has been performed automatically, is it the normal behaviour of a recovery using "recover database until cancel"  command ?
    Started redo application at
    Thread 1: logseq 10416, block 482
    Fri Sep  7 14:24:55 2007
    Recovery of Online Redo Log: Thread 1 Group 4 Seq 10416 Reading mem 0
      Mem# 0 errs 0: /oracle/SMA/origlogB/log_g14m1.dbf
      Mem# 1 errs 0: /oracle/SMA/mirrlogB/log_g14m2.dbf
    Fri Sep  7 14:24:55 2007
    Completed redo application
    Fri Sep  7 14:24:55 2007
    Completed crash recovery at
    Thread 1: logseq 10416, block 525, scn 105140074
    0 data blocks read, 0 data blocks written, 43 redo blocks read
    Thank you very much for your help.
    Frod.

    Hi,
    Let me answer your query.
    =======================
    Your question: While performing the recovery, is it possible to locate which online redolog is needed, and then to apply the changes in these logs
    1.   When you have current controlfile and need complete data (no data loss),
          then do not go for until cancel recovery.
    2.   Oracle will apply all the redologs (including current redolog) while recovery
         process is    on.
    3.  During the recovery you need to have all the redologs which are listed in the    view    V$RECOVERY_LOG and all the unarchived and current redolog. By querying  V$RECOVERY_LOG  you    can find out about the redologs required.
    4. If the required sequence is not there in the archive destination, and if recovery process    asks for that sequence you can query V$LOG to see whether requested sequence is part of the    online redologs. If yes you can mention the path of the online redolog to complete the recovery.
    Hope this information helps.
    Regards,
    Madhukar

  • I've installed elements 12 but it won't open it's asking for the exe file but all it does when located is install again.  I can't uninstall as it isn't present in control panel

    I've installed elements 12 but it won't open it's asking for the exe file but all it does when located is install again.  I can't uninstall as it isn't present in control panel.  When I open properties it asks to locate the exe or the other options don't work the target is invalid

    Hi sambanyc,
    What version of Adobe Reader have you installed on your Mac?
    Please try installing on a different Admin user account and check if that makes a difference.
    Regards,
    Rave

  • HT201303 How to I get by this security code that this is asking for?

    How to I get by this security code that this is asking for?

    Thanks, Stedman, that is helpful (I seem to be able to get past the "bubble" somewhat) but it is still there....I have, in the past, stroked across the music of choice and that was it...now the "bubble" with the choice name comes up and if I go all the way across I get a delete choice?  Can you help with this also or where would I go to research changes (I see there are 200!!!) in this upgrade?

  • Powershell script to get list of softwares installed as shown in registry on all the remote systems in a txt file

    Hi
    I need to know the command for getting list of softwares installed on all the remote systems in network  which are existing in their respective registry like HKEY_LOCAL_MACHINE\SOFTWARE of all other systems

    Hey
    Sorry this isn't powershell but it should do the job if you want to use it. The problem with using the Win32_Product WMI Class to enumerate the installed software (especially on Windows 2000 & 2003 Servers) is that the WMI class is NOT installed by default. Here is a VBScript i wrote to read a list of hostnames from a text file named "ComputerNames.txt" from the scripts directory and attempt to remotely enumerate all subkeys within the following registry key
    HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
    For each subkey enumerated it will attempt to read the value of the "DisplayName" key and output the results to a csv file.
    (the results should be the same as what you would see when you open Add/Remove Programs)
    Hope that helps
    Cheers
    Matt :)
    'Script Name : CheckInstalledSoftware.vbs
    'Author : Matthew Beattie
    'Created : 01/03/10
    'Description : This script reads a list of hostnames from a text file name "ComputerNames.txt" in the scripts working
    ' : directory. For each hostName it requests an ICMP response and if successfull attempts a remote registry
    ' : connection to enumerate and read the registry values of installed software. All results are logged to the
    ' : scripts working directory in a log file per computer name.
    'Initialization Section
    Option Explicit
    Const ForReading = 1
    Const ForAppending = 8
    Dim objFSO, wshNetwork, wshShell, hostName
    Dim scriptBaseName, scriptPath, scriptLogPath
    On Error Resume Next
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set wshShell = CreateObject("WScript.Shell")
    Set wshNetwork = CreateObject("WScript.Network")
    scriptBaseName = objFSO.GetBaseName(Wscript.ScriptFullName)
    scriptPath = objFSO.GetFile(Wscript.ScriptFullName).ParentFolder.Path
    scriptLogPath = scriptPath & "\" & IsoDateString(Now)
    If Err.Number <> 0 Then
    Wscript.Quit
    End If
    On Error Goto 0
    'Main Processing Section
    On Error Resume Next
    PromptStart
    ProcessScript
    If Err.Number <> 0 Then
    Wscript.Quit
    End If
    PromptEnd
    On Error Goto 0
    'Functions Processing Section
    'Name : ProcessScript -> Primary Function that controls all other script processing.
    'Parameters : None ->
    'Return : None ->
    Function ProcessScript
    Dim fileSpec, hostNames, regKey, keyName, results, result
    keyName = "DisplayName"
    regKey = "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall"
    fileSpec = scriptPath & "\ComputerNames.txt"
    'Ensure the "ComputerNames.txt" file exists within the scripts working directory.
    If Not objFSO.FileExists(fileSpec) Then
    MsgBox DQ(fileSpec) & " does not exist!", vbCritical, scriptBaseName
    Exit Function
    End If
    'Read the list of hostNames from the "ComputerNames.txt" text file within the scripts working directory.
    If Not GetScriptInput(hostNames, fileSpec) Then
    Exit Function
    End If
    'Attempt to read the registry from each hostname read from the list of hostnames.
    For Each hostName In hostNames
    Do
    'Ensure the system responds to an ICMP request.
    If Not CheckConnection(hostName) Then
    LogMessage 2, "Failed to respond to an ICMP Request"
    Exit Do
    End If
    'Enumerate and read the registry values.
    If Not GetRegValues(results, hostName, keyName, regKey) Then
    Exit Do
    End If
    'Log the registry values results.
    For Each result In results
    LogMessage 0, result
    Next
    Loop Until True
    Next
    End Function
    'Name : GetScriptInput -> Reads a text file to be used as Script input.
    'Parameters : items -> Output: An array of items in the script input file.
    ' : fileSpec -> The full folder Path, file Name and extention of the script input file.
    'Return : GetScriptInput -> Returns an array of items for script input and True or False.
    Function GetScriptInput(items, fileSpec)
    Dim scriptInputFile, itemsDict, item
    GetScriptInput = False
    Set itemsDict = NewDictionary
    If Not objFSO.FileExists(fileSpec) Then
    Exit Function
    End If
    On Error Resume Next
    Set scriptInputFile = objFSO.OpenTextFile(fileSpec, ForReading)
    If Err.Number <> 0 Then
    Exit Function
    End If
    On Error Goto 0
    Do Until scriptInputFile.AtEndOfStream
    item = scriptInputFile.ReadLine
    If item = "" Then
    Exit Function
    End If
    If Not itemsDict.Exists(item) Then
    itemsDict.Add item, ""
    End If
    Loop
    items = itemsDict.Keys
    GetScriptInput = True
    End Function
    'Name : CheckConnection -> Checks a remote host using WMI ping.
    'Parameters : hostName -> Hostname of computer system to verify network connectivity with.
    'Return : Boolean -> True if hostname replies. False otherwise.
    Function CheckConnection(hostName)
    Dim ping, response, replied
    Set ping = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
    ("select * from Win32_PingStatus where address = '" & hostName & "'")
    For each response in ping
    replied = Not IsNull(response.StatusCode) And response.StatusCode = 0
    Next
    CheckConnection = replied
    End Function
    'Name : GetRegValues -> Enumerates the subkeys in a registry key and the values of the keyName.
    'Parameters : hostName -> String containing the hostName of the system to enumerate the registry keys on.
    ' : keyName -> String containing the name of the registry key value to enumerate.
    ' : regKey -> Registry key to enumerate subkey names for.
    'Return : GetRegValues -> Returns True and an Array containing the registry key values otherwise False.
    Function GetRegValues(results, hostName, keyName, regKey)
    Dim objReg, regDict, rootKey, hive, keyValue, subKeys, i
    GetRegValues = False
    rootKey = regKey
    hive = GetRegistryHiveFromKey(rootKey)
    On Error Resume Next
    If hive <> 0 Then
    'Create a dictionary object to store the registry values in.
    Set regDict = NewDictionary
    If Err.Number <> 0 Then
    LogMessage 1, "Creating Dictionary Object"
    Exit Function
    End If
    'Connect to the remote registry.
    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & hostName & "\root\default:StdRegProv")
    If Err.Number <> 0 Then
    LogMessage 1, "Creating StdRegProv Object"
    Exit Function
    End If
    'Enumerate the subkey names within the regKey paramater.
    objReg.EnumKey hive, rootKey, subKeys
    If Err.Number <> 0 Then
    LogMessage 1, "Enumerating Registry Keys"
    Exit Function
    End If
    'Ensure the results are an array.
    If Not IsArray(subKeys) Then
    subKeys = Array(subKeys)
    End If
    'Read the registry key value for each subkey. Add the results to the dictionary.
    For i = 0 to UBound(subKeys)
    objReg.GetStringValue hive, rootKey & "\" & subKeys(i), keyName, keyValue
    If Err.Number = 0 Then
    If Not IsNull(keyValue) Then
    regDict(regDict.Count) = keyValue
    End If
    Else
    Err.Clear
    End If
    Next
    End If
    On Error Goto 0
    results = regDict.Items
    GetRegValues = True
    End Function
    'Name : GetRegistryHiveFromKey -> Get the hive ID from a registry key name.
    'Parameters: Input/Output: key -> Registry key name. Hive name will be removed.
    'Return : GetRegistryHiveFromKey -> ID of hive of given key name (0 if invalid).
    ' : -> The hive name is removed from the input key name.
    Function GetRegistryHiveFromKey (key)
    Dim pos, hive
    pos = Instr (key, "\")
    If pos = 0 Then
    pos = Len(key) + 1
    End If
    hive = Left (UCase (Left (key, pos - 1)) & " ", 4)
    key = Mid (key, pos + 1)
    GetRegistryHiveFromKey = Array(0, &H80000000, &H80000001, &H80000002, &H80000003, &H80000005, &H80000006) _
    (Int ((Instr("HKCR,HKCU,HKLM,HKU ,HKCC,HKDD", hive) + 4) / 5))
    End Function
    'Name : NewDictionary -> Creates a new dictionary object.
    'Parameters : None ->
    'Return : NewDictionary -> Returns a dictionary object.
    Function NewDictionary
    Dim dict
    Set dict = CreateObject("scripting.Dictionary")
    dict.CompareMode = vbTextCompare
    Set NewDictionary = dict
    End Function
    'Name : DQ -> Place double quotes around a string and replace double quotes
    ' : -> within the string with pairs of double quotes.
    'Parameters : stringValue -> String value to be double quoted
    'Return : DQ -> Double quoted string.
    Function DQ (ByVal stringValue)
    If stringValue <> "" Then
    DQ = """" & Replace (stringValue, """", """""") & """"
    Else
    DQ = """"""
    End If
    End Function
    'Name : IsoDateTimeString -> Generate an ISO date and time string from a date/time value.
    'Parameters : dateValue -> Input date/time value.
    'Return : IsoDateTimeString -> Date and time parts of the input value in "yyyy-mm-dd hh:mm:ss" format.
    Function IsoDateTimeString(dateValue)
    IsoDateTimeString = IsoDateString (dateValue) & " " & IsoTimeString (dateValue)
    End Function
    'Name : IsoDateString -> Generate an ISO date string from a date/time value.
    'Parameters : dateValue -> Input date/time value.
    'Return : IsoDateString -> Date part of the input value in "yyyy-mm-dd" format.
    Function IsoDateString(dateValue)
    If IsDate(dateValue) Then
    IsoDateString = Right ("000" & Year (dateValue), 4) & "-" & _
    Right ( "0" & Month (dateValue), 2) & "-" & _
    Right ( "0" & Day (dateValue), 2)
    Else
    IsoDateString = "0000-00-00"
    End If
    End Function
    'Name : IsoTimeString -> Generate an ISO time string from a date/time value.
    'Parameters : dateValue -> Input date/time value.
    'Return : IsoTimeString -> Time part of the input value in "hh:mm:ss" format.
    Function IsoTimeString(dateValue)
    If IsDate(dateValue) Then
    IsoTimeString = Right ("0" & Hour (dateValue), 2) & ":" & _
    Right ("0" & Minute (dateValue), 2) & ":" & _
    Right ("0" & Second (dateValue), 2)
    Else
    IsoTimeString = "00:00:00"
    End If
    End Function
    'Name : LogMessage -> Parses a message to the log file based on the messageType.
    'Parameters : messageType -> Integer representing the messageType.
    ' : -> 0 = message (writes to a ".csv" file)
    ' : -> 1 = error, (writes to a ".err" file including information relating to the error object.)
    ' : -> 2 = error message (writes to a ".err" file without information relating to the error object.)
    ' : message -> String containing the message to write to the log file.
    'Return : None ->
    Function LogMessage(messageType, message)
    Dim prefix, logType
    prefix = hostName
    Select Case messageType
    Case 0
    logType = "csv"
    Case 1
    logType = "err"
    message = "Error " & Err.Number & " (Hex " & Hex(Err.Number) & ") " & message & ". " & Err.Description
    Case Else
    LogType = "err"
    End Select
    If Not LogToCentralFile(scriptLogPath & "." & logType, hostName & "," & message) Then
    Exit Function
    End If
    End Function
    'Name : LogToCentralFile -> Attempts to Appends information to a central file.
    'Parameters : logSpec -> Folder path, file name and extension of the central log file to append to.
    ' : message -> String to include in the central log file
    'Return : LogToCentralFile -> Returns True if Successfull otherwise False.
    Function LogToCentralFile(logSpec, message)
    Dim attempts, objLogFile
    LogToCentralFile = False
    'Attempt to append to the central log file up to 10 times, as it may be locked by some other system.
    attempts = 0
    On Error Resume Next
    Do
    Set objLogFile = objFSO.OpenTextFile(logSpec, ForAppending, True)
    If Err.Number = 0 Then
    objLogFile.WriteLine message
    objLogFile.Close
    LogToCentralFile = True
    Exit Function
    End If
    Randomize
    Wscript.sleep 1000 + Rnd * 100
    attempts = attempts + 1
    Loop Until attempts >= 10
    On Error Goto 0
    End Function
    'Name : PromptStart -> Prompt when script starts.
    'Parameters : None ->
    'Return : None ->
    Function PromptStart
    MsgBox "Now processing the " & DQ(Wscript.ScriptName) & " script.", vbInformation, scriptBaseName
    End Function
    'Name : PromptEnd -> Prompts when script has completed.
    'Parameters : None ->
    'Return : None ->
    Function PromptEnd
    MsgBox "The " & DQ(Wscript.ScriptName) & " script has completed successfully.", vbInformation, scriptBaseName
    End Function
    'Name : PromptError -> Prompts when an unexpected script error occurs.
    'Parameters : None ->
    'Return : None ->
    'Function PromptEnd
    ' MsgBox "Error " & Err.Number & " (Hex " & Hex(Err.Number) & "). " & Err.Description, vbCritical, scriptBaseName
    'End Function

  • HT4061 I have video clips from a stills camera on my computer. When I sync my iPad to my computer and ask for the photo files to be transferred (including videos)  it does not transfer  them

    I have video clips from a stills camera on my computer mixed in with still pictures in various files. When I sync my iPad to the computer and ask for the files to be transferred to the iPad the video clips are not included (even when I tick the box to include videos). How do I rectify this.

    How to use your iPod to move your music to a new computer

  • Ask for help about file operation

    Hi,
    I have a text file A and it contains some sentences. As this file contains some white space or other useless characters, I also have a corresponding file B which record the exact position of the sentences.
    For example in File A:
    It's a nice day. I like it very much. Go home right now!
    In File B: (begin position, end position for each sentence)
    0, 15
    20, 39
    47, 64
    As I don't use the stream operation often, so have no idea how to extract the sentences by the position index.
    Thank you in advance.

    There are methods in the String, StringBuilder, and StringBuffer classes that can do what you need. This tutorial shows you how to use them:
    http://java.sun.com/docs/books/tutorial/java/data/manipstrings.html
    The StreamTokenizer and StringTokenizer classes may also be useful. Most of their functionality is included in the previously listed classes.

  • How do I use my WET54g with a wireless system that asks for username & password

    Hotels and other systems let you use theiur wireless for a fee.  You go onto your wireless laptop, and it automatically goes to a page where you pay and sign up (or it asks for a username and password), once that is done, you can use the network.
    How do I allow my WET54g to know this password information, and work on the network?
    thanks
    Michael

    The WET54g allows you to accept a wireless signal and connect it to a wired hub.  I want to intercept the wireless signal and use it on my hub.
    I know I can use one computer if I connect to the signal using my laptop's wireless card, but I want the WET54g to accept the signal.
    For example, currently at my office, I use the WET54g to intercept a wireless signal from the front of my building, to the back of my building about 300ft away (this way I didnt have to run wires).  The WET54g then is hooked up to a hub/switch where I have a bunch of other computers/servers.  Everything from the front of my building and back of the building are joined using this WET54g.  The WET54g is set up to find the signal from the front of my building, and therefore it works fine.
    I want to use the hotel signal, the same way, except there is no way to enter in the username/password into the WET54g, or maybe there is..  Does this make sense to you? 

  • TS3297 I redeemed 2 itune cards. I see a$20 credit on my screen. I can't figure out how to use it. When I go to purchase it asks for my credit card info.

    I have a $20 credit showing on my itunes account. When I go to purchase it asks for my credit card info. I want to use the credit i have. how do I access it/

    1-800-676-2775  apple support   tech support 1 800 275 2273
    If your computer is on one minute before it freezes, than you have one minute to secure your serial number.
    click the apple----->click about this Mac ------> click on version----> until you see the serial number.  You may have to do this a couple of times if it freezes before you have all the numbers.  A camera might help.
    Good Luck

Maybe you are looking for