Sha99y Posted March 27, 2005 Share Posted March 27, 2005 Hi I have a problem with copying a shortcut in a start menu folder, because when i run the .cmd file, it sets a folder called "Men· inicio", i use the md "%userprofile%\Menú inicio\Programas\Accesorios\utilidades\cdimage" command.I don`t trying to do a windows unattended installation, i only want to do a silent app install.When i use this command writing it, directly in promp window, it works, but not by .cmd file.How can i solve it?Thanks a lot. I hope i have posted it well.Thanks again. Link to comment Share on other sites More sharing options...
echap2000 Posted March 27, 2005 Share Posted March 27, 2005 open wordpad..write what you wantThen, when you save, choose MS-DOS Document Text for type It'll automatically convert all special characters to an another format .(for ms dos ) and your problem wille be resolved Link to comment Share on other sites More sharing options...
Sha99y Posted March 27, 2005 Author Share Posted March 27, 2005 Thank you, thank you, thank you... it works It was driving me crazy!Thaks a lot echap2000 Link to comment Share on other sites More sharing options...
Sha99y Posted March 27, 2005 Author Share Posted March 27, 2005 I´m affraid i have another question in relation whit shotcuts, if shortcuts in start menu which are in my user folder has the following path "%userprofile%\menú inicio...", which path has the shortcuts which are in "al users" folder?Thanks a lot Link to comment Share on other sites More sharing options...
SiMoNsAyS Posted March 27, 2005 Share Posted March 27, 2005 del /f /q "%ALLUSERSPROFILE%\Men£ Inicio\Configurar acceso y programas predeterminados.lnk"del /f /q "%ALLUSERSPROFILE%\Men£ Inicio\Windows Catalog.lnk"RD /S /Q "%USERPROFILE%\Men£ Inicio\Programas\Accesorios\Accesibilidad"RD /S /Q "%USERPROFILE%\Men£ Inicio\Programas\Accesorios\Entretenimiento" Link to comment Share on other sites More sharing options...
Sha99y Posted March 29, 2005 Author Share Posted March 29, 2005 Thank you SiMoNsAyS, i`ll not try it now because i thought it would better to use an app which save changes, so i am trying to use wininstall, but really thank you anyway, who knows, maybe i will have to use it.See you, bye . Link to comment Share on other sites More sharing options...
ckislam Posted September 20, 2009 Share Posted September 20, 2009 Replace Special Characters by query to readable characters in batch filesI had the same issue recently when trying to retrieve the common programs path from the registry of a german windows.the retrieved path couldn't be readable.Here is how I solved it:@echo offSET LS=HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell FoldersSET CS=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Foldersfor /f "tokens=3* delims= " %%i in ('reg query "%LS%" /v "Common Programs"') do CALL :SPCHARS "ComProgs" "%%j"for /f "tokens=3* delims= " %%i in ('reg query "%LS%" /v "Common Startup"') do CALL :SPCHARS "ComStart" "%%j"for /f "tokens=3* delims= " %%i in ('reg query "%LS%" /v "Common Desktop"') do CALL :SPCHARS "ComDesk" "%%j"for /f "tokens=3* delims= " %%i in ('reg query "%LS%" /v "Common AppData"') do CALL :SPCHARS "ComAppD" "%%j"for /f "tokens=3* delims= " %%i in ('reg query "%CS%" /v "AppData"') do CALL :SPCHARS "AppD" "%%j"for /f "tokens=3* delims= " %%i in ('reg query "%CS%" /v "Programs"') do CALL :SPCHARS "Progs" "%%j"for /f "tokens=3* delims= " %%i in ('reg query "%CS%" /v "Startup"') do CALL :SPCHARS "Start" "%%j"for /f "tokens=3* delims= " %%i in ('reg query "%CS%" /v "Desktop"') do CALL :SPCHARS "Desk" "%%j"ECHO "%ComProgs%"PAUSEEXITREM MOVE THIS TO THE END OF YOUR BATCH FILES:SPCHARSREM Replaces Special Characters to Readable Characters in Batch FileREM VAR 1=Variable Name to SET, VAR 2=Variable Valueset t=FOR /F %%i in ("%~2") DO SET t=%~2SET t=%t:ä=„%SET t=%t:á= %SET t=%t:à=…%SET t=%t:é=‚%SET t=%t:è=Š%SET t=%t:í=¡%SET t=%t:ì=�%SET t=%t:ö=”%SET t=%t:ó=¢%SET t=%t:ò=•%SET t=%t:ü=�%SET t=%t:ù=—%SET t=%t:ú=£%SET t=%t:ß=á%SET t=%t:ç=‡%set %~1=%t%set t=GOTO :EOFEXITFor delims I used [TAB] followed by [sPACE] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now