Search the Community
Showing results for tags 'script'.
-
Hi, I am currently trying to make a change to an Edge flag (Override software rendering list) for a suite of older PC's to fix a display issue with a bit of cloud based software. I am able to make the change manually by going to each machine individually, and going to Edge://flags however I was wondering if there is a way to automate this process, whether this is a script of some sort, or a simple registry change. Can anyone offer any advice or recommendation? Thanks in advance.
-
Hi all Has anyone managed actually install office 2021 via GPO? Quite helpfully there is no msi for it... Im currently using the following script; setup.exe /configure "Server\software\NETWORK\Office 2021\Configuration.txt" I've tried booting from the network and I've tried booting locally. I've tried bat and powershell. Frustratingly the scripts run for other software packages and if I click them manually. And help would be greatly appreciated Chris
-
Hi All, I saw some similar posts about creating Papercut printer scripts here so I'm hoping you can help me out. I'm looking to create a printer script in Papercut that will discount any job sent to any printer during off-peak hours (M-R 4-8pm and Sunday 12-5pm). I asked for Papercut's assistance but all I was told was that I'm missing some semicolons and I should be all set. Can someone take a look at whet we've written and offer any insight? /** Discount printing during off-peak * * Encourage users to print during periods of low * activity by offering a discount of 20% during * the period between 4:00pm and 8:00pm M-R, and * the period between 12:00pm and 5:00pm on Sundays. */ var SUNDAY = 0; var MONDAY = 1; var TUESDAY = 2; var WEDNESDAY = 3; var THURSDAY = 4; function getMinutesSinceMidnight(hours, minutes) { return 60 * hours + minutes; } function printJobHook(inputs, actions) { //Set times for discounts. var START_OF_DISC = getMinutesSinceMidnight(16, 00); //4:00pm var END_OF_DISC = getMinutesSinceMidnight(20, 00); //8:00pm var SUN_DISC_START = getMinutesSinceMidnight(12, 00); //12:00pm var SUN_DISC_END = getMinutesSinceMidnight(17, 00);//5:00pm var day = inputs.job.date.getDay(); var hours = inputs.job.date.getHours(); var minutes = inputs.job.date.getMinutes(); var timeOfJob = getMinutesSinceMidnight(hours, minutes); var inDiscountDays = (SUNDAY >= day && day <= THURSDAY); var inDiscountTimes = ((timeOfJob >= START_OF_DISC && timeOfJob <= END_OF_DISC) || (timeOfJob >= SUN_DISC_START && timeOfJob <= SUN_DISC_END)); if (inDiscountDays && inDiscountTimes) { //Apply 20% discount: var newCost = inputs.job.cost * 0.80; actions.job.setCost(newCost); // Record that as discount was applied in the job comment. actions.job.addComment("20% off-peak discount applied"); } } Thanks, Max
- 1 reply
-
- javascript
- papercut
-
(and 1 more)
Tagged with:
-
Help please! I want to buy this script: iAuto - Automobile Classifieds Script | Vehicle and Car Dealer Software | WorksForWeb But it is not cheap. That's why I am a liitle bit afraid of getting unknown product. Has anybody used this script? Give me advice please!
-
Hi all, First, some context. I'm in a university environment, under a central IT department. For the most part I have control over the School's image, Group policy, and physical hardware. Not so much when it comes to an network infrastructure and network services. Now, for my question. I have a mobile laptop lab, which instructors borrow when their class needs the laptops. During exams the instructors ask if the internet can be disabled so ensure student integrity. I need a quick way to disable the internet access while still allowing connection to some network shares. Most people say configuring a proxy in Group policy or something like that but I rather something along the lines of a script that I can run to "turn it off" and script to "turn it back on." Because the laptops are wireless, group policy timing can be finicky and I only need to turn it off for a few hours at most. Any ideas? Thx
- 7 replies
-
- block
- group policy
-
(and 2 more)
Tagged with:
-
Hi All, Windows 10 PC network. Printers are mapped using a script called by GPO. Everything works fine on most machines but for one machine today that has stopped. Whenever the script calls this line: WshNetwork.SetDefaultPrinter Printerpath It throws up "The Environment is Incorrect". Problem is this only happens when it tries to map the default printer. Our two follow me queues for colour and mono printing map fine. Another computer in the same office mapping to the same printer works fine. The user can print to the requested printer via her ID card and follow me but her computer will just not map that printer as the default so she can print directly to it. I googled and found two answers but both are behind the experts.exchange paywall - can't afford £178!! Any ideas?
- 6 replies
-
- environment is incorrect
- gpo
-
(and 3 more)
Tagged with:
-
Dear All, Does anyone have a script that I can point at a named directory and it will delete any file that has not been accessed since dd/mm/yyyy All the staff at my school are hoarders and they do insist on keeping every photo, you tube clip and document they have ever produced. I have been threatening to do this for ages but they have not listened so now it's time for action. Thanks in advance Ian
-
Hi I'm trying to set a permission on a registry key for a program that requires to write where the database is held I've been told that REGINI.exe does this, but seems to complex, can some one help me write a simple logon script that will set the USERS group to full permission on a registry key upon computer bootup, i will use this script in a GPO Computer Start up Script I've tried Registry GPO under "Computer\Windows Setting\Security Settings\Registry" and doesn't work, the key is held under "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\RisingStars\Assessments" Hope some one can help!
- 10 replies
-
- log on
- permissions
-
(and 2 more)
Tagged with:
-
Hi folks, I'm no scripting guru so please bear with me on this. I have an urgent need to relocate users home directories from one location to another. Currently our \\UNCPath\user shared folders\ area contains both pupils and staff folders which is a nono and isn't the best practice. I need to move all the pupils home folders to a new location \\UNCPath\pupils\ I've generated a username_year_group_x.csv file containing a single column samaccountname for all users from each year group and I want to feed it into a script and use those usernames to move the corresponding folders to their new location. I know how to change the home folders from AD for all users but I just can't figure how to move the actual data! Hope someone can help me!
- 6 replies
-
- home folders
- move
-
(and 1 more)
Tagged with:
-
Below is an Apple Script I have done up that can be used as a login script to mount a share. You can add multiple shares if you wish to the script. The script will poll for the logged in user/password then mount the share. All you need to replace in the script below is "Server" & Share" the left should be left as is. To test, if you login using an AD user or even an OD user then run the script you will see the share mount. set MyName to do shell script "whoami" tell application "Finder" mount volume "smb://SERVER/SHARE/" & MyName & ";" & MyName & ":password" end tell
- 1 reply
-
- 2
-
-
- applescript
- mount
-
(and 2 more)
Tagged with:
-
This is going to be quite specific. I have a lovely flash animation that someone has made for me that does a sweep through a football line up. It allows me to pass the variables of the players to it via a single url using the pipe character to separate the names. I'm looking for a php script that can populate a database with the players for each years football teams in the positions (2 each for years 7,8 and 9 and general u13 u16 etc) and one that will generate the correct url for the flash depending on a variable passed to it (that corresponds to the team needed) via it's url. Wow that all sounds a little complicated but I'm hopeful that someone can help me with this flash url needs the following thetitle=Team Name thedate=A Date theplayers=RightForward|LeftForward|LeftMid|CenLeftMid|...etc then Subs
-
I want to start including a fact of the day or random quote on the desktop wallpaper on our PCs. We use BGinfo to create the image along with a few tech facts (like the computer name) so users can easily access this when they call the helpdesk but I'd like to put something a little more thought provoking like a random famous quote or a KS3/KS4 curriculum topic fact (like "accelleration=velocity/time" or "Henry VII 1491-1547" or "Noble gases : helium (He), neon (Ne), argon (Ar), krypton (Kr), xenon (Xe), and the radioactive radon (Rn)." or a message to do with the time of year "Merry Chistmas", "Happy Hanukke" etc. Does anyone know where I might get a list of famous quotes from? Does anyone know where I might get a list of one line facts from? I'm pretty sure I can knock up a VB script to choose an appropriate random message to display, I just need a list of messages. I took a quick look at wikipedia and wolfram alpha but extracting the information from the page was going to be time consuming. Any hints appreciated. CJ
-
Hello, Ive searched far and wide for a solution to this issue, and have stumbled across similar answers and some very unhelpful ones too. Basically, all of our computers have several media players installed. WMP, WinAmp and VLC. Winamp is currently the default, we would like to change this back to WMP. I know you can go onto a machine individually and reset the file associations or go through the "Set Default Programs and Access" option within control panel. But I am having difficulty trying to work out how to do this in a batch job. I thought of deploying a reg fix through an adm in group policy, but cant for the life of me find where this setting is stored in the registry. I also know that there is no out of the box gpo for this either. Any help/ideas would be much appreciated. This is where i miss having Impero's key/mouse stroke script creator!
-
Hi Does anyone have a VB Script to delete network printers at logoff without having to name each printer? I've got some staff profiles with some dud printers dating back a while. thanks J.
-
Hi Guys, Heres the situation: I manage the audio/visual systems at my Church. We record the sermons on Sundays and then people can buy a CD or download from the website. We used to do this using a CD recorder as part of our sound system, but this has just died (or depending on how you look at it ). We want to replace it with a bespoke digital recording system that I am designing. Its going to be a PC with a professional audio interface, running some sort of recording software (probably Audacity, or anther free/cheap package). The main problem we are encountering, is the time and number of steps it takes the sound operator to finalise the audio, convert it to mp3, burn it to CD, and then upload it to the website. I want to write a script that will pretty much do all that in one go. What it needs to do is: Prompt user to input details (title, speaker, sermon series, date, etc) Normalise the audio and set volume level Create an MP3 with the relevent ID3 tags: title, artist (speaker), album: (sermon series), etc. and give it a relevent name (yyyy-mm-dd-speaker.mp3) Copy MP3 to network server Burn that MP3 as an audio CD Create a low-bitrate MP3 Upload low-bitrate MP3 to website (this part I will have to liase with hosting company) Thanks for any help you can offer. David
-
I'm tearing my hair out over this one as it used to work reliably and now doesn't, I've tried 4 different methods of scripting network printer connections but none of them seem to work 100%. I can't use PaperCut Print Deploy because it doesn't support deploying printers based on Active Directory properties of the computer. Same for Group Policy Preferences. I have tried: objNetwork.AddWindowsPrinterConnection \\PRINTSERVERNAME\PRINTQUEUE cscript.exe %windir%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -ac -p \\PRINTSERVERNAME\PRINTQUEUE rundll32 printui.dll,PrintUIEntry /in /q /n \\PRINTSERVERNAME\PRINTQUEUE objShell.Run "%SystemRoot%\explorer.exe \\PRINTSERVERNAME\PRINTQUEUE", 0, True Can anyone suggest any other more reliable ways to deploy printers? It's not the PrintNightmare stuff as that would mean it wouldn't work at all, what is happening is it is randomly deploying some of the printers and not others.
- 7 replies
-
- deployment
- printers
-
(and 2 more)
Tagged with:
-
# Define the path to the setup.exe and configuration file $setupPath = "\\fileserv1\distribution point\office2024\setup.exe" $configPath = "\\fileserv1\distribution point\office2024\BeamOffice2024Pupil1.xml" # Run the Office Deployment Tool with the configuration file Start-Process -FilePath $setupPath -ArgumentList "/configure $configPath" -Wait -NoNewWindow Running the script, office says it can't find the configuration file. The config path is correct and readable. the config is valid as I can use it in a cmd window just fine. "\\fileserv1\distribution point\office2024\setup.exe" /configure "\\fileserv1\distribution point\office2024\BeamOffice2024Pupil1.xml" I'm wanting to add this to a startup script eventually. cheers!
- 3 replies
-
- office2024
- powershell
-
(and 1 more)
Tagged with:
-
I have the new coreldraw2020 standard (which doesn't allow me to use the msi) but can only deploy using the exe so an easy (\\pathto\setup.exe /qn) Do I use a script or batch file? put it in computer startup? how do I set the account that is installing it and how do I stop it from trying to install every boot after it is successfully installed.? cheers
- 10 replies
-
- batch
- coreldraw2020
-
(and 3 more)
Tagged with:
-
notes the pcs account needs to be able to write to its own description field in active directory (easily done with delegate control to either domain pcs or as i do an allpcs group containing domain pcs (as i dont like delegating control to a built in group) needs a share on network somewhere that auth users can write to in the main script its \\server\log$\pcs\ and the obvious disclaimer ive not had any issues but that dosent mean you wont so use it at your own risk records basic details in ad (make model, cpu,ram,hdd,serial, mac(s) basically stuff that dosent change often) and if you have existing info in the computers description before deploying the script add a # before it (so if your description field said staffab laptop change to #staffab laptop before deploying script) and it will keep that there (though the data after will not update after the first time until you manually remove the # at the very end of the line) it now only writes to ad when a change is detected it creates a csv file with more info in it in the format below (and copy and past that to a file called 01.csv if you want a nice formatted spreadsheet of all pcs make-model,cpu,ram,hdd size,hdd free,serial no,Windows Version,mac address(es),Windows experience ratings,last user,Network Speed,date collected the following batch file will concatenate all the individual files into 1 file (needs to be a drive letter you run it from not a unc path del all.csv /q copy "*.csv" "all.csv" /y main code itself Option Explicit 'On Error Resume Next dim outputstring, computermodel, cpu, ram, hddcapacity, hddfree, serialno, macaddress, operatingsystem, csvoutput dim stcomputer, colitems, objItem, colcpu, colPhysicalMemory, objPhysicalMemory, intMemory, colDisks, objhdd dim colComputerSystem, colOperatingSystems, objOperatingSystem, colBIOS, objBIOS, colnicconfig, objnicconfig dim objwmiservice, hddtemp, weidata, colWSA, operatingsystemno, Lastuser, oreg, spath, svalue, strvalue, svaluename dim adoutputstring, adoRecordset, adoConnection, objRootDSE, objNetwork, objComputer, existing dim pcname, wshShell, strDirectory, strFile, objFSO, objFolder, objFile, objTextFile, myDateString dim colnet,objnet, linkspeed, objWMIService2 stcomputer = "." myDateString = Date() Set objRootDSE = GetObject("LDAP://RootDSE") Set objNetwork = WScript.CreateObject("WScript.Network") Set objWMIService = GetObject("winmgmts:\\" & stcomputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") Set colcpu = objWMIService.ExecQuery("Select * from Win32_Processor") Set colPhysicalMemory = objWMIService.ExecQuery("Select * From Win32_PhysicalMemory") set coldisks = objWMIService.ExecQuery("Select * From Win32_LogicalDisk") Set colComputerSystem = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") Set colOperatingSystems = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") Set colBIOS = objWMIService.ExecQuery("Select * From Win32_BIOS") Set colnicconfig = objWMIService.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") Set colWSA = objWMIservice.ExecQuery("Select * From Win32_WinSAT") Set adoConnection = CreateObject("ADODB.Connection") adoConnection.Provider = "ADsDSOObject" adoConnection.Open "Active Directory Provider" Set adoRecordset = adoConnection.Execute(";(&(objectCategory=Computer)(name=" & objNetwork.Computername & "));adspath;subtree") Set wshShell = WScript.CreateObject( "WScript.Shell" ) Set objWMIService2 = GetObject("winmgmts:\\" & stComputer & "\root\WMI") Set colnet = objWMIService2.ExecQuery("SELECT * FROM MSNdis_LinkSpeed",,48) 'write file location pcname = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) strDirectory = "\\server\log$\pcs\" strFile = pcname & ".csv" 'make-model For Each objItem In colItems computermodel= objItem.Manufacturer & " " & objItem.Model 'wscript.echo computermodel Next ' Create the File System Object Set objFSO = CreateObject("Scripting.FileSystemObject") 'cpu info For Each objItem in colcpu cpu = objItem.Name 'wscript.echo cpu Next 'ram If Not colPhysicalMemory Is Nothing Then intMemory = 0 For Each objPhysicalMemory In colPhysicalMemory intMemory = intMemory + Int(objPhysicalMemory.Capacity) Next ram = (intMemory / 1024 / 1024 ) & " MB" 'wscript.echo ram End If 'hdd capacity for each objhdd in coldisks If objhdd.DeviceID = "C:" Then hddcapacity = int(objhdd.Size/1073741824) & " GB" hddfree = int(objhdd.freespace/1073741824) & " GB" 'wscript.echo hddfree end if next 'windows version For Each objOperatingSystem in colOperatingSystems operatingsystem = objOperatingSystem.Caption & " sp " & objOperatingSystem.ServicePackMajorVersion operatingsystemno = objOperatingSystem.Version 'wscript.echo operatingsystem Next 'serial no If Not colBIOS Is Nothing Then For Each objBIOS in colBIOS serialno = objBIOS.SerialNumber 'wscript.echo serialno Next End If 'mac address(s) If Not colnicconfig Is Nothing Then For Each objnicconfig in colnicconfig If macaddress <> "" Then macaddress = macaddress & " - " End If macaddress = macaddress & objnicconfig.MACAddress 'wscript.echo macaddress Next End If 'windows experience operatingsystemno = Left( operatingsystemno, 3 ) if operatingsystemno >5.5 then 'vista+ For Each objItem in colWSA 'weidata = "Overall -" & "na" & " - CPU - " & "na" & " - Memory - " & "na" & " - Graphics - " & "na" & " - Gaming graphics - " & "na" & " - hdd - " & "na" weidata = "Overall -" & objItem.WinSPRLevel & " - CPU - " & objItem.CPUScore & " - Memory - " & objItem.MemoryScore & " - Graphics - " & objItem.GraphicsScore & " - Gaming graphics - " & objItem.D3DScore & " - hdd - " & objItem.DiskScore next else 'xp- weidata = "Overall -" & "na" & " - CPU - " & "na" & " - Memory - " & "na" & " - Graphics - " & "na" & " - Gaming graphics - " & "na" & " - hdd - " & "na" end if 'last user if operatingsystemno >5.5 then 'vista+ Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & stcomputer & "/root/default:StdRegProv") If Err.Number <> 0 Then On Error Goto 0 Else On Error Goto 0 sPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" sValueName = "LastLoggedonUser" If oReg.GetStringValue(HKLM, sPath, sValueName, sValue) = 0 Then lastuser = sValue Else lastuser = "unknown" & stcomputer End If End If else 'xp- Const HKEY_LOCAL_MACHINE = &H80000002 Set oreg=GetObject("winmgmts:\\" & stComputer & "\root\default:StdRegProv") spath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" svalue = "DefaultUserName" oreg.GetStringValue HKEY_LOCAL_MACHINE, spath, svalue, strValue lastuser=strvalue svalue = "DefaultDomainName" oreg.GetStringValue HKEY_LOCAL_MACHINE, spath, svalue, strValue lastuser = strvalue & "\" & lastuser end if 'Scans data for Net Speed For Each objnet in colnet 'Removes "slow/unused links" if objnet.NdisLinkSpeed/10 > 1000 then linkspeed= objnet.NdisLinkSpeed/10000 & " Mbps" & "-" & linkspeed '& "-" & objnet.NdisLinkSpeed/10000 & " Mbps" end if next 'concatanate data for output outputstring = computermodel & "," & cpu &"," & ram &"," & hddcapacity& "," & serialno & "," & macaddress & "," csvoutput = computermodel & "," & cpu &"," & ram &"," & hddcapacity& "," & hddfree & "," & serialno & "," & operatingsystem & "," & macaddress & "," & weidata & "," & Lastuser & "," & linkspeed &"," & myDateString &"," ' wscript.echo outputstring ' Check that the strDirectory folder exists If objFSO.FolderExists(strDirectory) Then Set objFolder = objFSO.GetFolder(strDirectory) Else Set objFolder = objFSO.CreateFolder(strDirectory) 'WScript.Echo "Just created " & strDirectory End If If objFSO.FileExists(strDirectory & strFile) Then Set objFolder = objFSO.GetFolder(strDirectory) Else Set objFile = objFSO.CreateTextFile(strDirectory & strFile) 'Wscript.Echo "Just created " & strDirectory & strFile End If set objFile = nothing set objFolder = nothing ' OpenTextFile Method needs a Const value ' ForAppending = 8 ForReading = 1, ForWriting = 2 Const ForAppending = 2 Set objTextFile = objFSO.OpenTextFile _ (strDirectory & strFile, ForAppending, True) ' Writes result every time you run this VBScript objTextFile.WriteLine(csvoutput) objTextFile.Close If Err.Number <> 0 Then MsgBox "Query Error: " & Err.Description WScript.Quit End If If Not adoRecordset.EOF Then Set objComputer = GetObject(adoRecordset.Fields(0).Value) existing = objcomputer.Description if left (existing,1) = "#" and not right (existing,1) = "#" then outputstring = existing & " : " & outputstring & "#" if left (existing,1) = "#" and right (existing,1) = "#" then 'msgbox "data" wscript.quit end if if not objComputer.Description = outputstring then 'msgbox "diff" objComputer.Put "description", outputstring objComputer.SetInfo else 'msgbox "matches" end if End If If Err.Number <> 0 Then MsgBox "Write Error: " & Err.Description WScript.Quit End If
-
Hi there. I'll admit i'm a complete novice when it comes to scripting, so thought i'd try this forum out. There are a lot of scripts floating about the web relating to the automated setting of default printers. What we've got is six separate ICT suites, each with their own networked printer (although a number of different makes and models). What i'd like to know is whether it is possible to set a script to run on startup, that will assign the classroom printer as default, no matter if it is a pupil or a staff member logging on to the machine. The reason i'm looking to do this is two-fold: 1) Office 2010 keeps setting 'Send to OneNote' as the default print device. 2) Asking pupils and staff to simply select the correct printer from the drop-down menu is too mammoth a task. Many thanks in advance for anybody's help.
-
Hi, I have a teacher who uses a laptop in work but also takes it home. I need a script that she can run every time she enters the school or when at home. So here's what I need: When at home: - Check "Automatically detect proxy settings" - Uncheck "Use a proxy server..." When at school: - Uncheck "Automatically Detect Proxy Settings" - Check "Use a proxy server..." As long as the laptop remembers the proxy's IP address and port number, it should work.
-
Hi everybody ! I try to make a script in Papercut so I can change the information in the "job-originating-user-name" variable with, for example, %user_full_name% used by Papercut to make watermarks. I'm on a 10.7.5 iMac with CUPS 1.5.4 and Papercut NG 14.1 (build 26830) If needed, I may upgrade the CUPS software. The purpose of this is simple: I want to be able to print from an iOS device with a cover page where I see the username / full name instead of "guest" or "mobile". Please note that the cover page isn't included in the document or from the application where we print the document, but is added by the printer automatically. Thank you !
-
I have a very simple script to remove all network printers, however this does not remove old printers that are no longer attached to the network. How should I modify the attached script to remove 'all' printers? Go easy on me, scripts are not my forte remove-network-printers.vbs.txt
-
Hi, I've got a big folder with lots of subfolders that contain files with a specfic name e.g. PL0123_A, these names are also stored inside a access database. I need to make a script that will scan for all .dwg files in a directory recursively. Then i need to look up each files name in the Access database see what the description is for that file and append it to the filename by renaming. Does anyone have any advice on whats the best language to do it in? And how i would do it easily...some code snippets would be nice Thanks Jack
- 2 replies
-
- access
- microsoft access
-
(and 2 more)
Tagged with:
