Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

how do I write this PS script on vbs?

$
0
0
I am not a vbs scripter at all.  I have this code I've written in PowerShell that works perfect.  The problem is it has to run on Windows XP machines and none of our XP machines have PowerShell installed. 
  
$FilePath = "c:\Documents and Settings\All Users\Start Menu\Programs\Startup" 
Rename-Item "$FilePath\Machine Printer.vbs" "Machine PrinterBK1.vbs" 
Get-Content "$FilePath\Machine PrinterBK1.vbs" | Foreach-Object {$_ -replace "OlderPrinter", "NewPrinter"}   | Set-Content "$FilePath\Machine Printer.vbs" 
  
  
How do I covert this exact script to a VBS script? 

Viewing all articles
Browse latest Browse all 15028

Trending Articles