Search the Community
Showing results for tags 'Batch file'.
-
Hi, I am hoping someone can help. I am currently writing a batch file that checks for a version of software in the registry then if the right version checks the server entry in the registry. I've managed to get the version of software part working thanks to this topic http://www.msfn.org/board/topic/113643-batch-file-that-check-version-in-registry/ and Wise Owl's advice in it but have become stuck. This is my script so far Set "key=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1FDB8EC6-BAF1-42F9-8E09-4D9AB369F1B5}"Reg query %key% /v DisplayVersion|Find "4.8.0.887">Nul&&(Goto ServerCheck)"framepkg.exe" /Install=Agent /Silent:ServerCheckSet "key=HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent"Goto Stop)"framepkg.exe" /Install=Agent /Silent:StopPauseThe output from Set "key=HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent" is below. The part I'm looking to check is the ePOServerList REG_SZ and if CMCSU-EPO-01.cict.local is in the entry and if so go to Stop. Agent EnableVDIMode REG_SZ 0 Installed Path REG_SZ C:\Program Files\McAfee\Common Framework binsphash REG_SZ B7BB45E1B73318C7F725E0A385C1DCC9D215FFE4D9CD3FDBB502DFE3CDD12EDC LoggedOnUser REG_SZ wg_tech (Default) REG_SZ SMBiosUUID REG_SZ 00BC3E8C-6FB7-E111-8025-B05963090386 AgentGUID REG_SZ {AFC66908-0D2D-452D-B08A-650A52F6CFC6} AgentWakeUpPort REG_SZ 8081 IPAddress REG_SZ 192.168.16.99 SubnetAddress REG_SZ 192.168.16.0 SubnetMask REG_SZ 255.255.255.0 MacAddress REG_SZ e8e0b70cc45e ComputerName REG_SZ Y0185APH LastASCTime REG_DWORD 0x55642428 IPHostName REG_SZ Y0185APH.CWN PropsVersion REG_SZ 20150526074336 SequenceNumber REG_DWORD 0x2 ePOServerList REG_SZ CMCSU-EPO-01.cict.local|10.221.195.103|447;MDGH-EPO-AHN3.cict.local|10.221.195.102|447 LastPolicyUpdateTime REG_DWORD 0x55642428 LastPropsVersion REG_SZ 20150526074336 McTrayAllowUpdate REG_SZ 0
-
I designed a DOS-based program to change the Wi-Fi hotspot of a laptop on Win7 that takes in SSID and Password as input from the user and set them as the hotspot's. Then I saved it as a batch file. I want to make a GUI for a 'software' feel that takes those inputs in text-boxes and enters them in the Command Prompt after running the batch file. Can I do that using VB? If so, please help me and tell how.. Thanks
- 15 replies
-
- GUI
- Visual Basic
-
(and 5 more)
Tagged with:
-
Hi I'm doing a batch file that will check if ANY file exists in particular a directory. If so it creates an archive directory and archives said files before running the communications portion of the script to send and receive files. If no file exists it will use GOTO to jump directly to the communications. I need it to skip archiving if no files exist so that it does not create empty directories every time she task scheduler runs it. I know this will work if there is a file mask set, because I have tried it. My problem is that there is no real way to set any kind of file mask to look for (i.e. C:\filesout\partoffilename*.txt). The files that are being generated have no common naming convention. There is no way to change this in the app that creates the files. So I have tried (C:\filesout\*.*) This doesn't work as it runs the archive portion of the script even if no files exist. Any assistance would be greatly appreciated. Script below with comments. The part that's giving me issues is the (if exist "F:\EDIout\*.*") rem #####################rem #CD to EDI directory#rem #####################F:cd "F:\EDIout"rem ################################################################rem #First Check if files exist to be sent so we don't end up #rem #creating a bunch of empty directories. #rem #If not, bypass the archive step and go right to SND/RCV comms.#rem ################################################################if exist "F:\EDIout\*.*" (goto archive) else (goto comms):archiverem ########################rem #Set date and time Vars#rem ########################For /F "Tokens=1-7 Delims=/:. " %%d In ("%Date%%Time%") Do Set destDir=%%f-%%e-%%d_%%g.%%h.%%i.%%jrem #######################################rem #Check if dir exists. If not create it#rem #######################################if not exist "F:\EDIout\Archive\%destDir%" mkdir "F:\EDIout\Archive\%destDir%" rem ############################rem #copy files to tarchive dir#rem ############################copy "F:\EDIout\*.*" "F:\EDIout\Archive\%destDir%":commsrem #############################rem ## Comms Stuff goes next ##rem #############################